.. include:: /global.inc .. include:: /banner.rst Retrieving information with the API ================================================= This topic guide explains how to retrieve information from the Cool Farm Tool. From CFT 1.3.0 onwards, users are able to use the Multiple Farms API functionality. This has caused some changes to the API endpoints for inspecting farms and assessments on both accounts with multiple farms and on those with only one farm. A new endpoint, labelled as :ref:`GET / farms` has been created to enable those users with Multiple Farms to retrieve information on their farms and assessments. This endpoint is also functional for those users who have 1 farm, and should be implemented as the standard endpoint for any new API users to the tool. The current endpoint, :ref:`GET / farm` is now deprecated and in a future version will be removed. Users without multiple farms functionality are still able to use this endpoint, until the feature is removed (advance warning will be provided). Users with multiple farms will see an error message if they try to use this endpoint, and will be directed towards the :ref:`Using the farms endpoint` to retrieve the information they require. All URLs start with ``/api/v1/``. Using the farm endpoint *(deprecated)* -------------------------------------- .. http:get:: /farm/ .. note:: Please be aware that we recommend discontinuing the use of this endpoint and you should instead request the same data from :ref:`Using the farms endpoint with a slug`. Users with multiple farms are **required** to use the :ref:`Using the farms endpoint`. Return a single object which contains all the information entered on the "Farm Settings" page for your farm. **Example request** .. sourcecode:: http GET /farms/(str:slug) HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "name": "test farm", "slug": "65809166", "country": { "id": 826, "iso2": "GB", "name": "United Kingdom", "_uri": "http://127.0.0.1:8088/api/v1/country/826/" }, "territory": null, "average_temperature_value": 15, "average_temperature_unit": "°C", "products": [ { "_uri": "http://127.0.0.1:8088/api/v1/product/C2D2DD80/", "slug": "C2D2DD80", "name": "alfalfa_2022", "api_supported": true } ], "information": { "cft_version": "EXAMPLE" } } Using the farms endpoint ------------------------ .. http:get:: /farms/ Retrieve all data entered on the “Farm settings” page, as well as a summary list of all crop and livestock products. Calling this endpoint without a slug will return a list of all farms. **Example request** .. sourcecode:: http GET /farms/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "name": "test farm", "slug": "65809166", "country": { "id": 826, "iso2": "GB", "name": "United Kingdom", "_uri": "http://127.0.0.1:8088/api/v1/country/826/" }, "territory": null, "average_temperature_value": 15, "average_temperature_unit": "°C", "products": [ { "_uri": "http://127.0.0.1:8088/api/v1/product/C2D2DD80/", "slug": "C2D2DD80", "name": "alfalfa_2022", "api_supported": true } ], "information": { "cft_version": "EXAMPLE" } } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` Using the farms endpoint with a slug ------------------------------------ .. http:get:: /farms/(str:slug)/ For the farm associated to the slug this will retrieve all data entered on the "Farm settings" page, and a summary list of all crop and livestock products. **Example request** .. sourcecode:: http GET /farms/(str:slug) HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "_uri": "/api/v1/farm/", "name": "Magdalen Farms", "country": { "_uri": "/api/v1/country/826/", "iso2": "GB", "name": "United Kingdom", "_uri": "http://127.0.0.1:8088/api/v1/country/826/" }, "territory": null, "average_temperature_value": 15, "average_temperature_unit": "°C", "products": [ { "_uri": "/api/v1/product/396357AE/", "slug": "396357AE", "name": "chickens_2014" }, { "_uri": "/api/v1/product/A47B1D80/", "slug": "A47B1D80", "name": "dry_bean_2013" }, { "_uri": "/api/v1/product/25D376B4/", "slug": "25D376B4", "name": "rice_2013" } ], "information": { "cft_version": "EXAMPLE" } } :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` Retrieving calculation data for your assessments ------------------------------------------------ .. http:get:: /farm/assessments/(str:slug)/ Retrieve results for the crop or livestock assessment specified by ``slug`` Please note that you aren't required to specify a farm for this endpoint. **Example request** .. sourcecode:: http GET /farm/assessments/.../ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "reporting_year": 2022, "name": "alfalfa_2022", "has_co_products": false, "residue_management": "Burned in field", "crop_type": "Alfalfa", "product_fresh": { "unit": "tonne", "value": "10.00000000" }, "product_dry": { "unit": "tonne", "value": "10.00000000" }, "seed_amount": { "unit": "", "value": "NaN" }, "field_size": { "value": "100.00000000", "unit": "ha" }, "growing_area": { "soil_type": "None", "soil_organic_matter": "1.72 < SOM <= 5.16", "soil_organic_matter_custom": "None", "soil_moisture": "moist", "soil_drainage": "poor", "soil_ph": "pH <= 5.5", "label": "silt (medium), moist" }, "fertiliser_applications": [], "ghg_results": { "product_yield": [ "0.1", "tonne / ha" ], "emissions_total": [ "55917.38416354984265026199382", "kg CO2e" ], "emissions_area": [ "559.1738416354984265026199382", "kg CO2e" ], "emissions_product": [ "5591.738416354984265026199382", "kg CO2e" ], "pie_graph": { "percentages": [ { "name": "Residue mgmt", "value": "16.88920694944657838570696493" }, { "name": "Soil / fertilisers", "value": "83.11079305055342161429303507" }, { "name": "Crop protection", "value": 0 }, { "name": "Land management", "value": "0" }, { "name": "Energy & processing", "value": "0" }, { "name": "Water waste", "value": 0 }, { "name": "Transport", "value": 0 } ], "values": [ { "name": "Residue mgmt", "value": "9444.002732099000501493757366" }, { "name": "Soil / fertilisers", "value": "46473.38143145084214876823645" }, { "name": "Crop protection", "value": 0 }, { "name": "Land management", "value": "0E-9" }, { "name": "Energy & processing", "value": "0.00000" }, { "name": "Water waste", "value": 0 }, { "name": "Transport", "value": 0 } ] }, "pie_graph_area": [ { "name": "Residue mgmt", "value": "94.44002732099000501493757366" }, { "name": "Soil / fertilisers", "value": "464.7338143145084214876823645" }, { "name": "Crop protection", "value": 0 }, { "name": "Land management", "value": "0.0" }, { "name": "Energy & processing", "value": "0" }, { "name": "Water waste", "value": 0 }, { "name": "Transport", "value": 0 } ], "pie_graph_unit": [ { "name": "Residue mgmt", "value": "944.4002732099000501493757366" }, { "name": "Soil / fertilisers", "value": "4647.338143145084214876823645" }, { "name": "Crop protection", "value": 0 }, { "name": "Land management", "value": "0.0" }, { "name": "Energy & processing", "value": "0" }, { "name": "Water waste", "value": 0 }, { "name": "Transport", "value": 0 } ] } }, { "information": { "cft_version": "EXAMPLE" } } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` :statuscode 404: cannot locate ``slug`` .. http:get:: /product/(str:slug)/ Retrieve results for the crop or livestock product specified by ``slug`` **Example request** .. sourcecode:: http GET /product/.../ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "general": [ { "name": "Crop type", "value": "Rice" }, { "name": "Reporting year", "value": 2013 }, { "unit": "tonne", "name": "Fresh product", "value": "50.00000000" }, { "unit": "tonne", "name": "Finished product", "value": "50.00000000" }, { "unit": "kg / ha", "name": "Product yield", "value": "5000" }, { "name": "Growing area", "value": "10.00 hectares, medium, moist" }, { "unit": "hectare", "name": "Size", "value": "10.00000000" }, { "name": "Name", "value": "rice_2013" } ], "machinery": { "bar_graph": [ { "name": "disc gang", "value": "257.994738580000000000000000" } ] }, "direct_energy": { "diesel": "1000.00000000" }, "fertilisers": [ { "reference": "Represents 2007 technology globally. Based on: International Fertilizer Industry Association (IFA, 2009). Fertilizers, Climate Change and Enhancing Agricultural Productivity Sustainably. IFA, Paris.", "is_custom": false, "CO2": "212.53", "name": "Compound NPK - 15% N / 15% K2O / 15% P2O5", "total_CO2e": "212.53" }, { "reference": "Emissions from production are attributed to another\n production or waste system ", "is_custom": false, "CO2": "0.00", "name": "Pig manure - 0.7% N", "total_CO2e": "0.00" } ], "transport": { "bar_graph": [ { "name": "road (HGV)", "value": "176.9137818419333768778576094" } ] }, "co_product": { "table": [], "bar_graph": [] }, "total_emissions": { "total": [ { "per_product": "1100.95", "per_tree": "nan", "CO2": "3942.43", "N2O": "7.99", "name": "Total", "total_CO2e": "55047.53", "per_area": "5504.75", "CH4": "1948.95" } ], "table": ["..."], "bar_graph": ["..."] }, "summary": { "emissions_product": [ "1100.950602056338736161477241", "kg CO2e" ], "emissions_total": [ "55047.53010281693680807386203", "kg CO2e" ], "emissions_area": [ "5504.753010281693680807386203", "kg CO2e" ] }, "type": "crop", "field_management": { "table": ["..."], "pie_graph": {"..."}, "max_percentage": [ { "name": "paddy", "value": "93.82087027823590679133421277" } ] } } :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` :statuscode 404: cannot locate product with this ``slug`` .. http:get:: /energy/ Retrieve a list of all energy sources, with the units that are valid for each The :ref:`direct-energy-type` table is also available in this documentation. **Example request** .. sourcecode:: http GET /energy/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "valid_units": [ [ 15, "litre" ], [ 26, "gal" ], [ 32, "m3" ], [ 40, "gal (US)" ], [ 57, "ha-mm" ], [ 58, "ha-cm" ], [ 59, "acre-in" ] ], "id": "102", "name": "diesel (average biofuel blend)" }, "..." ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` .. http:get:: /fertiliser/ Retrieve a list of all fertiliser products The :ref:`fertiliser-type` table is also available in this documentation. **Example request** .. sourcecode:: http GET /fertiliser/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "id": 1, "name": "Ammonium bicarbonate - 18% N", "ingredients": [ "n" ], "productions": [ { "id": 3, "name": "China" } ] }, "..." { "id": 3, "name": "Ammonium sulphate - 21% N", "ingredients": [ "so3", "n" ], "productions": [ { "..." } ] } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` .. http:get:: /unit/ Retrieve a list of all units. The :ref:`unit` table is also available in this documentation. **Example request** .. sourcecode:: http GET /unit/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "conversions": [ { "factor": "100.00000000", "id": 3, "intercept": "0.00000", "name": "cm" }, { "factor": "39.37000000", "id": 49, "intercept": "0.00000", "name": "in" }, { "factor": "3.28100000", "id": 50, "intercept": "0.00000", "name": "ft" }, { "factor": "1000.00000000", "id": 60, "intercept": "0.00000", "name": "mm" } ], "_verbose_name": "metre", "id": "1", "name": "m" } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` .. http:get:: /crop_type/ Retrieve a list of all crop types. The :ref:`crop-type` table is also available in this documentation. **Example request** .. sourcecode:: http GET /crop_type/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [{"id": "1", "name": "Alfalfa"},] :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` .. http:post:: /user/key/ Fetch the API key for the given user. :form str username: :form int password: **Example request** .. sourcecode:: http POST /user/key/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json Content-Type: application/json X-APP-Authorization: ... username=test&password=password **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json {"key": "j1SSgBO4CIu4hjceBF0tVHVUqYUfibUxOEN18FQkVdE"} :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` :statuscode 400: missing or incorrect form data .. http:get:: /user/share_codes/ Retrieve a list of all share codes. **Example request** .. sourcecode:: http GET /user/share_codes/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "id": 351, "name": "Test", "code": "TEST" }, { "id": 352, "name": "Varun New", "code": "1103" } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` .. http:get:: /share_code/assessments/(str:share_code)/ Retrieve results for the crop or livestock product specified by ``share_code`` **Example request** .. sourcecode:: http GET /share_code/assessments/.../ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ "name": "alfalfa_2021", "reporting_year": 2021, "has_co_products": false }, { "name": "canadian-farm_2021", "reporting_year": 2021, "has_co_products": false }, [....] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` :statuscode 404: cannot locate ``share_code`` .. http:get:: /share_code/(str:share_code)/assessments/data/ Retrieve results for the crop or dairy product specified by ``share_code`` **IMPORTANT** If you desire to use the data returned from the endpoint to calculate the emissions of your product then you will need to sort the results data into separate data lists. Below is a Python3 code example of how to sort the data, what keys to look for when sorting the data: .. note:: If using a share code with 'share_farm = False' ( This value is set upon the creation of the Share Code by leaving the 'Share Farm' option as blank) when running an aggregation report, the farm name will be excluded from the report. .. code-block:: python :linenos: # assuming you already have a list of assessments from this endpoint crop_list = list() dairy_list = list() for assessment in results_data: if 'crop' in assessment: crop_list.append(assessment) else: dairy_list.append(assessment) # then call crop or dairy calculate respectively with the relevant data Recent changes to this endpoint mean that the data returned can sometimes be very large and as a result can take time for the response to be returned. To mitigate performance issues, we have decided to implement paging which is reflected in the example data below. Example of a request with query parameters **Example request** .. sourcecode:: http GET /share_code/example_code/assessments/data/?size=50&page=2 HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Query parameters** There are two optional query parameters which accept integers - page and size. It is allowed to retrieve up to 50 assessments per page. By default the size is set to maximum. **Response structure** * count: this is the number of assessments in total available for an aggregation share code * next: when present, this will return the next assessments * previous: when present, this will return the previous assessments * results: original return, with additional information, this is the assessment data **Example request** .. sourcecode:: http GET /share_code/example_code/assessments/data/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "count": 1, "next": null, "previous": null, "results": [ [ { "farm": { "country": "United Kingdom", "territory": null, "climate": "tropical", "average_temperature": { "value": "15.00000000", "unit": "°C" }, "farm_identifier": "" }, "crop": { "type": "Soyabean", "feed_type": 36, "field_size": { "value": "1000.00000000", "unit": 10 }, "soil": { "texture_id": "2", "organic_matter_id": "2", "drainage_id": "2", "ph_id": "1", "organic_matter_custom": null }, "product_fresh": { "value": "10000.00000000", "unit": "tonne" }, "product_finished": { "value": "10000.00000000", "unit": "tonne" }, "residue": { "value": "1.28000000", "unit": "tonne / ha", "management": "Removed from field for use or sale" }, "seed_amount": { "value": 0, "unit": "" }, "irrigation_calculation_type": 1 }, "pesticides": [ { "type_id": 1, "category_id": 1, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 2, "percentage_rate": "50.000", "application_rate": { "value": "3.00000000", "unit": "kg / acre" } }, { "type_id": 1, "category_id": 3, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 1, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 3, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 3, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 3, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } }, { "type_id": 1, "category_id": 3, "percentage_rate": "50.000", "application_rate": { "value": "1.00000000", "unit": "kg / ha" } } ], "fertilisers": [ { "type": "Compost (non-fully aerated production) - 1% N", "production": "Europe 2014", "custom_ingredients": {}, "application_rate": { "value": "30.00000000", "unit": "tonne / ha" }, "rate_measure": "", "method": 2, "inhibition_id": 1, } ], "machinery": [ { "operations": "2", "machinery": "potato planting", "fuel_type": "diesel" } ], "irrigation": [ { "method": 1, "allocation": "100.000", "pumping_depth": { "value": "100.00000000", "unit": "m" }, "horizontal_distance": { "value": "10.00000000", "unit": "m" }, "water_added": { "value": "200.00000000", "unit": "litre" }, "power_source": 2, "water_source": 1 }, { "method": 1, "allocation": "100.000", "pumping_depth": { "value": "100.00000000", "unit": "m" }, "horizontal_distance": { "value": "10.00000000", "unit": "m" }, "water_added": { "value": "200.00000000", "unit": "litre" }, "power_source": 2, "water_source": 1 }, { "method": 1, "allocation": "100.000", "pumping_depth": { "value": "100.00000000", "unit": "m" }, "horizontal_distance": { "value": "10.00000000", "unit": "m" }, "water_added": { "value": "200.00000000", "unit": "litre" }, "power_source": 2, "water_source": 1 }, { "method": 1, "allocation": "100.000", "pumping_depth": { "value": "100.00000000", "unit": "m" }, "horizontal_distance": { "value": "10.00000000", "unit": "m" }, "water_added": { "value": "200.00000000", "unit": "litre" }, "power_source": 2, "water_source": 1 }, { "method": 1, "allocation": "100.000", "pumping_depth": { "value": "100.00000000", "unit": "m" }, "horizontal_distance": { "value": "10.00000000", "unit": "m" }, "water_added": { "value": "200.00000000", "unit": "litre" }, "power_source": 2, "water_source": 1 } ], "direct_energy": [ { "category": 2, "source": "diesel", "usage": { "value": "20.00000000", "unit": "gal" } } ], "land_management": [ { "change_id": 19, "years_ago": "15.00", "allocation": "100.000", "forest": { "age_years": "6.00", "type": "boreal mountain system" } } ], "transport": [], "tree_biomass": [], "co_products": [], "processing": [ { "_type": "washing", "allocation": "100.000", "power_source": "gas (by energy)" } ], "storage": [], "waste_water": {} }, { "information": { "cft_version": "1.1.0" } } ] ], "information": { "cft_version": "1.1.0" } } :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication` :statuscode 404: cannot locate ``share_code`` .. http:get:: /reference/country/ Retrieve a list of all countries. **Example request** .. sourcecode:: http GET /reference/country/ HTTP/1.1 Host: app.coolfarmtool.org Accept: application/json X-API-Authorization: ... X-APP-Authorization: ... **Example response** .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json [ { "id": 16, "iso3": "AND", "name": "Andorra", "continent": "Western Europe" }, { "id": 784, "iso3": "ARE", "name": "United Arab Emirates", "continent": "Middle East" }, { "id": 2, "iso3": "ATG", "name": "Antigua and Barbuda", "continent": "Latin America" }, { "id": 660, "iso3": "AIA", "name": "Anguilla", "continent": "Latin America" }, { "id": 895, "iso3": "ALB", "name": "Albania", "continent": "Eastern Europe" }, { "id": 41, "iso3": "ARM", "name": "Armenia", "continent": "Asia" }, { "id": 20, "iso3": "AGO", "name": "Angola", "continent": "Africa" }, { "id": 26, "iso3": "ARG", "name": "Argentina", "continent": "Latin America" }, { "id": 14, "iso3": "ASM", "name": "American Samoa", "continent": "Oceania" }, { "id": 32, "iso3": "AUT", "name": "Austria", "continent": "Western Europe" }, { "id": 30, "iso3": "AUS", "name": "Australia", "continent": "Oceania" }, { "id": 533, "iso3": "ABW", "name": "Aruba", "continent": "Latin America" }, { "id": 248, "iso3": "ALA", "name": "Åland", "continent": "Western Europe" }, { "id": 25, "iso3": "AZE", "name": "Azerbaijan", "continent": "Asia" }, { "id": 56, "iso3": "BIH", "name": "Bosnia and Herzegovina", "continent": "Eastern Europe" }, { "id": 42, "iso3": "BRB", "name": "Barbados", "continent": "Latin America" }, { "id": 40, "iso3": "BGD", "name": "Bangladesh", "continent": "Indian Subcontinent" }, { "id": 46, "iso3": "BEL", "name": "Belgium", "continent": "Western Europe" }, { "id": 854, "iso3": "BFA", "name": "Burkina Faso", "continent": "Africa" }, { "id": 100, "iso3": "BGR", "name": "Bulgaria", "continent": "Eastern Europe" }, { "id": 4, "iso3": "BHR", "name": "Bahrain", "continent": "Middle East" }, { "id": 108, "iso3": "BDI", "name": "Burundi", "continent": "Africa" }, { "id": 204, "iso3": "BEN", "name": "Benin", "continent": "Africa" }, { "id": 652, "iso3": "BLM", "name": "Saint Barthélemy", "continent": "Latin America" }, { "id": 48, "iso3": "BMU", "name": "Bermuda", "continent": "North America" }, { "id": 896, "iso3": "BRN", "name": "Brunei Darussalam", "continent": "Asia" }, { "id": 6, "iso3": "BOL", "name": "Bolivia", "continent": "Latin America" }, { "id": 535, "iso3": "BES", "name": "Bonaire, Sint Eustatiusand Saba", "continent": "Latin America" }, { "id": 62, "iso3": "BRA", "name": "Brazil", "continent": "Latin America" }, { "id": 36, "iso3": "BHS", "name": "Bahamas", "continent": "Latin America" }, { "id": 52, "iso3": "BTN", "name": "Bhutan", "continent": "Asia" }, { "id": 60, "iso3": "BVT", "name": "Bouvet Island", "continent": null }, { "id": 58, "iso3": "BWA", "name": "Botswana", "continent": "Africa" }, { "id": 112, "iso3": "BLR", "name": "Belarus", "continent": "Eastern Europe" }, { "id": 124, "iso3": "CAN", "name": "Canada", "continent": "North America" }, { "id": 166, "iso3": "CCK", "name": "Cocos (Keeling) Islands", "continent": "Oceania" }, { "id": 180, "iso3": "COD", "name": "Congo (Kinshasa)", "continent": "Africa" }, { "id": 140, "iso3": "CAF", "name": "Central African Republic", "continent": "Africa" }, { "id": 178, "iso3": "COG", "name": "Congo (Brazzaville)", "continent": "Africa" }, { "id": 756, "iso3": "CHE", "name": "Switzerland", "continent": "Western Europe" }, { "id": 384, "iso3": "CIV", "name": "Côte d'Ivoire", "continent": "Africa" }, { "id": 184, "iso3": "COK", "name": "Cook Islands", "continent": "Oceania" }, { "id": 152, "iso3": "CHL", "name": "Chile", "continent": "Latin America" }, { "id": 120, "iso3": "CMR", "name": "Cameroon", "continent": "Africa" }, { "id": 156, "iso3": "CHN", "name": "China", "continent": "Asia" }, { "id": 170, "iso3": "COL", "name": "Colombia", "continent": "Latin America" }, { "id": 188, "iso3": "CRI", "name": "Costa Rica", "continent": "Latin America" }, { "id": 192, "iso3": "CUB", "name": "Cuba", "continent": "Latin America" }, { "id": 132, "iso3": "CPV", "name": "Cape Verde", "continent": "Africa" }, { "id": 531, "iso3": "CUW", "name": "Curaçao", "continent": "Latin America" }, { "id": 162, "iso3": "CXR", "name": "Christmas Island", "continent": "Oceania" }, { "id": 196, "iso3": "CYP", "name": "Cyprus", "continent": "Western Europe" }, { "id": 203, "iso3": "CZE", "name": "Czech Republic", "continent": "Western Europe" }, { "id": 276, "iso3": "DEU", "name": "Germany", "continent": "Western Europe" }, { "id": 262, "iso3": "DJI", "name": "Djibouti", "continent": "Africa" }, { "id": 208, "iso3": "DNK", "name": "Denmark", "continent": "Western Europe" }, { "id": 212, "iso3": "DMA", "name": "Dominica", "continent": "Latin America" }, { "id": 214, "iso3": "DOM", "name": "Dominican Republic", "continent": "Latin America" }, { "id": 10, "iso3": "DZA", "name": "Algeria", "continent": "Africa" }, { "id": 218, "iso3": "ECU", "name": "Ecuador", "continent": "Latin America" }, { "id": 233, "iso3": "EST", "name": "Estonia", "continent": "Eastern Europe" }, { "id": 818, "iso3": "EGY", "name": "Egypt", "continent": "Africa" }, { "id": 732, "iso3": "ESH", "name": "Western Sahara", "continent": "Africa" }, { "id": 232, "iso3": "ERI", "name": "Eritrea", "continent": "Africa" }, { "id": 724, "iso3": "ESP", "name": "Spain", "continent": "Western Europe" }, { "id": 231, "iso3": "ETH", "name": "Ethiopia", "continent": "Africa" }, { "id": 246, "iso3": "FIN", "name": "Finland", "continent": "Western Europe" }, { "id": 242, "iso3": "FJI", "name": "Fiji", "continent": "Oceania" }, { "id": 238, "iso3": "FLK", "name": "Falkland Islands", "continent": "Latin America" }, { "id": 583, "iso3": "FSM", "name": "Micronesia", "continent": "Oceania" }, { "id": 234, "iso3": "FRO", "name": "Faroe Islands", "continent": null }, { "id": 250, "iso3": "FRA", "name": "France", "continent": "Western Europe" }, { "id": 266, "iso3": "GAB", "name": "Gabon", "continent": "Africa" }, { "id": 826, "iso3": "GBR", "name": "United Kingdom", "continent": "Western Europe" }, { "id": 308, "iso3": "GRD", "name": "Grenada", "continent": "Latin America" }, { "id": 268, "iso3": "GEO", "name": "Georgia", "continent": "Asia" }, { "id": 254, "iso3": "GUF", "name": "French Guiana", "continent": "Latin America" }, { "id": 831, "iso3": "GGY", "name": "Guernsey", "continent": null }, { "id": 288, "iso3": "GHA", "name": "Ghana", "continent": "Africa" }, { "id": 292, "iso3": "GIB", "name": "Gibraltar", "continent": null }, { "id": 304, "iso3": "GRL", "name": "Greenland", "continent": "North America" }, { "id": 270, "iso3": "GMB", "name": "Gambia", "continent": "Africa" }, { "id": 324, "iso3": "GIN", "name": "Guinea", "continent": "Africa" }, { "id": 312, "iso3": "GLP", "name": "Guadeloupe", "continent": "Latin America" }, { "id": 226, "iso3": "GNQ", "name": "Equatorial Guinea", "continent": "Africa" }, { "id": 300, "iso3": "GRC", "name": "Greece", "continent": "Western Europe" }, { "id": 239, "iso3": "SGS", "name": "South Georgia", "continent": null }, { "id": 320, "iso3": "GTM", "name": "Guatemala", "continent": "Latin America" }, { "id": 316, "iso3": "GUM", "name": "Guam", "continent": "Oceania" }, { "id": 624, "iso3": "GNB", "name": "Guinea-Bissau", "continent": "Africa" }, { "id": 328, "iso3": "GUY", "name": "Guyana", "continent": "Latin America" }, { "id": 344, "iso3": "HKG", "name": "Hong Kong", "continent": "Asia" }, { "id": 334, "iso3": "HMD", "name": "Heard and McDonald Islands", "continent": null }, { "id": 340, "iso3": "HND", "name": "Honduras", "continent": "Latin America" }, { "id": 191, "iso3": "HRV", "name": "Croatia", "continent": "Eastern Europe" }, { "id": 332, "iso3": "HTI", "name": "Haiti", "continent": "Latin America" }, { "id": 348, "iso3": "HUN", "name": "Hungary", "continent": "Western Europe" }, { "id": 360, "iso3": "IDN", "name": "Indonesia", "continent": "Asia" }, { "id": 372, "iso3": "IRL", "name": "Ireland", "continent": "Western Europe" }, { "id": 376, "iso3": "ISR", "name": "Israel", "continent": "Middle East" }, { "id": 833, "iso3": "IMN", "name": "Isle of Man", "continent": null }, { "id": 356, "iso3": "IND", "name": "India", "continent": "Indian Subcontinent" }, { "id": 368, "iso3": "IRQ", "name": "Iraq", "continent": "Middle East" }, { "id": 364, "iso3": "IRN", "name": "Iran", "continent": "Middle East" }, { "id": 352, "iso3": "ISL", "name": "Iceland", "continent": "Western Europe" }, { "id": 380, "iso3": "ITA", "name": "Italy", "continent": "Western Europe" }, { "id": 832, "iso3": "JEY", "name": "Jersey", "continent": null }, { "id": 388, "iso3": "JAM", "name": "Jamaica", "continent": "Latin America" }, { "id": 400, "iso3": "JOR", "name": "Jordan", "continent": "Middle East" }, { "id": 392, "iso3": "JPN", "name": "Japan", "continent": "Asia" }, { "id": 404, "iso3": "KEN", "name": "Kenya", "continent": "Africa" }, { "id": 417, "iso3": "KGZ", "name": "Kyrgyzstan", "continent": "Asia" }, { "id": 116, "iso3": "KHM", "name": "Cambodia", "continent": "Africa" }, { "id": 296, "iso3": "KIR", "name": "Kiribati", "continent": null }, { "id": 174, "iso3": "COM", "name": "Comoros", "continent": null }, { "id": 659, "iso3": "KNA", "name": "Saint Kitts and Nevis", "continent": "Latin America" }, { "id": 408, "iso3": "PRK", "name": "Korea, North", "continent": "Asia" }, { "id": 410, "iso3": "KOR", "name": "Korea, South", "continent": "Asia" }, { "id": 414, "iso3": "KWT", "name": "Kuwait", "continent": "Middle East" }, { "id": 136, "iso3": "CYM", "name": "Cayman Islands", "continent": "Latin America" }, { "id": 398, "iso3": "KAZ", "name": "Kazakhstan", "continent": "Asia" }, { "id": 418, "iso3": "LAO", "name": "Laos", "continent": "Asia" }, { "id": 422, "iso3": "LBN", "name": "Lebanon", "continent": "Middle East" }, { "id": 662, "iso3": "LCA", "name": "Saint Lucia", "continent": "Latin America" }, { "id": 438, "iso3": "LIE", "name": "Liechtenstein", "continent": null }, { "id": 144, "iso3": "LKA", "name": "Sri Lanka", "continent": "Indian Subcontinent" }, { "id": 430, "iso3": "LBR", "name": "Liberia", "continent": "Africa" }, { "id": 426, "iso3": "LSO", "name": "Lesotho", "continent": "Africa" }, { "id": 440, "iso3": "LTU", "name": "Lithuania", "continent": "Eastern Europe" }, { "id": 442, "iso3": "LUX", "name": "Luxembourg", "continent": "Western Europe" }, { "id": 428, "iso3": "LVA", "name": "Latvia", "continent": "Eastern Europe" }, { "id": 434, "iso3": "LBY", "name": "Libya", "continent": "Africa" }, { "id": 504, "iso3": "MAR", "name": "Morocco", "continent": "Africa" }, { "id": 492, "iso3": "MCO", "name": "Monaco", "continent": null }, { "id": 498, "iso3": "MDA", "name": "Moldova", "continent": "Eastern Europe" }, { "id": 499, "iso3": "MNE", "name": "Montenegro", "continent": "Eastern Europe" }, { "id": 663, "iso3": "MAF", "name": "Saint Martin (French part)", "continent": null }, { "id": 450, "iso3": "MDG", "name": "Madagascar", "continent": "Africa" }, { "id": 584, "iso3": "MHL", "name": "Marshall Islands", "continent": "Africa" }, { "id": 807, "iso3": "MKD", "name": "Macedonia", "continent": "Eastern Europe" }, { "id": 466, "iso3": "MLI", "name": "Mali", "continent": "Africa" }, { "id": 104, "iso3": "MMR", "name": "Myanmar", "continent": "Asia" }, { "id": 496, "iso3": "MNG", "name": "Mongolia", "continent": "Asia" }, { "id": 446, "iso3": "MAC", "name": "Macau", "continent": "Asia" }, { "id": 580, "iso3": "MNP", "name": "Northern Mariana Islands", "continent": "Oceania" }, { "id": 474, "iso3": "MTQ", "name": "Martinique", "continent": "Latin America" }, { "id": 478, "iso3": "MRT", "name": "Mauritania", "continent": "Africa" }, { "id": 500, "iso3": "MSR", "name": "Montserrat", "continent": "Latin America" }, { "id": 470, "iso3": "MLT", "name": "Malta", "continent": "Western Europe" }, { "id": 480, "iso3": "MUS", "name": "Mauritius", "continent": "Africa" }, { "id": 462, "iso3": "MDV", "name": "Maldives", "continent": "Asia" }, { "id": 454, "iso3": "MWI", "name": "Malawi", "continent": "Africa" }, { "id": 484, "iso3": "MEX", "name": "Mexico", "continent": "North America" }, { "id": 458, "iso3": "MYS", "name": "Malaysia", "continent": "Asia" }, { "id": 508, "iso3": "MOZ", "name": "Mozambique", "continent": "Africa" }, { "id": 516, "iso3": "NAM", "name": "Namibia", "continent": "Africa" }, { "id": 540, "iso3": "NCL", "name": "New Caledonia", "continent": "Oceania" }, { "id": 562, "iso3": "NER", "name": "Niger", "continent": "Africa" }, { "id": 574, "iso3": "NFK", "name": "Norfolk Island", "continent": "Oceania" }, { "id": 566, "iso3": "NGA", "name": "Nigeria", "continent": "Africa" }, { "id": 558, "iso3": "NIC", "name": "Nicaragua", "continent": "Latin America" }, { "id": 528, "iso3": "NLD", "name": "Netherlands", "continent": "Western Europe" }, { "id": 578, "iso3": "NOR", "name": "Norway", "continent": "Western Europe" }, { "id": 524, "iso3": "NPL", "name": "Nepal", "continent": "Indian Subcontinent" }, { "id": 520, "iso3": "NRU", "name": "Nauru", "continent": "Oceania" }, { "id": 570, "iso3": "NIU", "name": "Niue", "continent": null }, { "id": 554, "iso3": "NZL", "name": "New Zealand", "continent": "Oceania" }, { "id": 512, "iso3": "OMN", "name": "Oman", "continent": "Middle East" }, { "id": 591, "iso3": "PAN", "name": "Panama", "continent": "Latin America" }, { "id": 604, "iso3": "PER", "name": "Peru", "continent": "Latin America" }, { "id": 258, "iso3": "PYF", "name": "French Polynesia", "continent": "Oceania" }, { "id": 598, "iso3": "PNG", "name": "Papua New Guinea", "continent": "Oceania" }, { "id": 608, "iso3": "PHL", "name": "Philippines", "continent": "Asia" }, { "id": 586, "iso3": "PAK", "name": "Pakistan", "continent": "Indian Subcontinent" }, { "id": 616, "iso3": "POL", "name": "Poland", "continent": "Western Europe" }, { "id": 666, "iso3": "SPM", "name": "Saint Pierre and Miquelon", "continent": null }, { "id": 612, "iso3": "PCN", "name": "Pitcairn", "continent": null }, { "id": 630, "iso3": "PRI", "name": "Puerto Rico", "continent": null }, { "id": 275, "iso3": "PSE", "name": "Palestine", "continent": "Asia" }, { "id": 620, "iso3": "PRT", "name": "Portugal", "continent": "Western Europe" }, { "id": 585, "iso3": "PLW", "name": "Palau", "continent": null }, { "id": 600, "iso3": "PRY", "name": "Paraguay", "continent": "Latin America" }, { "id": 634, "iso3": "QAT", "name": "Qatar", "continent": "Middle East" }, { "id": 638, "iso3": "REU", "name": "Reunion", "continent": null }, { "id": 642, "iso3": "ROU", "name": "Romania", "continent": "Eastern Europe" }, { "id": 688, "iso3": "SRB", "name": "Serbia", "continent": "Eastern Europe" }, { "id": 643, "iso3": "RUS", "name": "Russian Federation", "continent": "Asia" }, { "id": 646, "iso3": "RWA", "name": "Rwanda", "continent": "Africa" }, { "id": 682, "iso3": "SAU", "name": "Saudi Arabia", "continent": "Middle East" }, { "id": 690, "iso3": "SYC", "name": "Seychelles", "continent": null }, { "id": 729, "iso3": "SDN", "name": "Sudan", "continent": "Africa" }, { "id": 752, "iso3": "SWE", "name": "Sweden", "continent": "Western Europe" }, { "id": 702, "iso3": "SGP", "name": "Singapore", "continent": "Asia" }, { "id": 654, "iso3": "SHN", "name": "Saint Helena", "continent": null }, { "id": 705, "iso3": "SVN", "name": "Slovenia", "continent": "Eastern Europe" }, { "id": 744, "iso3": "SJM", "name": "Svalbard and Jan MayenIslands", "continent": null }, { "id": 703, "iso3": "SVK", "name": "Slovakia", "continent": "Western Europe" }, { "id": 694, "iso3": "SLE", "name": "Sierra Leone", "continent": "Africa" }, { "id": 674, "iso3": "SMR", "name": "San Marino", "continent": null }, { "id": 686, "iso3": "SEN", "name": "Senegal", "continent": "Africa" }, { "id": 706, "iso3": "SOM", "name": "Somalia", "continent": "Africa" }, { "id": 740, "iso3": "SUR", "name": "Suriname", "continent": "Latin America" }, { "id": 728, "iso3": "SSD", "name": "South Sudan", "continent": "Africa" }, { "id": 678, "iso3": "STP", "name": "Sao Tome and Principe", "continent": "Africa" }, { "id": 222, "iso3": "SLV", "name": "El Salvador", "continent": "Latin America" }, { "id": 534, "iso3": "SXM", "name": "Sint Maarten", "continent": "Latin America" }, { "id": 760, "iso3": "SYR", "name": "Syria", "continent": "Middle East" }, { "id": 748, "iso3": "SWZ", "name": "Swaziland", "continent": "Africa" }, { "id": 796, "iso3": "TCA", "name": "Turks and Caicos Islands", "continent": "Latin America" }, { "id": 148, "iso3": "TCD", "name": "Chad", "continent": "Africa" }, { "id": 260, "iso3": "ATF", "name": "French Southern Lands", "continent": null }, { "id": 768, "iso3": "TGO", "name": "Togo", "continent": "Africa" }, { "id": 764, "iso3": "THA", "name": "Thailand", "continent": "Asia" }, { "id": 762, "iso3": "TJK", "name": "Tajikistan", "continent": "Asia" }, { "id": 772, "iso3": "TKL", "name": "Tokelau", "continent": null }, { "id": 626, "iso3": "TLS", "name": "Timor-Leste", "continent": "Oceania" }, { "id": 795, "iso3": "TKM", "name": "Turkmenistan", "continent": "Asia" }, { "id": 788, "iso3": "TUN", "name": "Tunisia", "continent": "Africa" }, { "id": 776, "iso3": "TON", "name": "Tonga", "continent": "Oceania" }, { "id": 792, "iso3": "TUR", "name": "Turkey", "continent": "Western Europe" }, { "id": 780, "iso3": "TTO", "name": "Trinidad and Tobago", "continent": "Latin America" }, { "id": 798, "iso3": "TUV", "name": "Tuvalu", "continent": "Oceania" }, { "id": 158, "iso3": "TWN", "name": "Taiwan", "continent": "Asia" }, { "id": 834, "iso3": "TZA", "name": "Tanzania", "continent": "Africa" }, { "id": 804, "iso3": "UKR", "name": "Ukraine", "continent": "Eastern Europe" }, { "id": 800, "iso3": "UGA", "name": "Uganda", "continent": "Africa" }, { "id": 581, "iso3": "UMI", "name": "United States MOI", "continent": null }, { "id": 840, "iso3": "USA", "name": "United States of America", "continent": "North America" }, { "id": 858, "iso3": "URY", "name": "Uruguay", "continent": "Latin America" }, { "id": 860, "iso3": "UZB", "name": "Uzbekistan", "continent": "Asia" }, { "id": 336, "iso3": "VAT", "name": "Vatican City", "continent": null }, { "id": 670, "iso3": "VCT", "name": "Saint Vincent and theGrenadines", "continent": "Latin America" }, { "id": 862, "iso3": "VEN", "name": "Venezuela", "continent": "Latin America" }, { "id": 1, "iso3": "VGB", "name": "Virgin Islands, British", "continent": null }, { "id": 850, "iso3": "VIR", "name": "Virgin Islands, U.S.", "continent": null }, { "id": 704, "iso3": "VNM", "name": "Vietnam", "continent": "Asia" }, { "id": 548, "iso3": "VUT", "name": "Vanuatu", "continent": "Oceania" }, { "id": 876, "iso3": "WLF", "name": "Wallis and Futuna Islands", "continent": null }, { "id": 882, "iso3": "WSM", "name": "Samoa", "continent": "Oceania" }, { "id": 887, "iso3": "YEM", "name": "Yemen", "continent": "Middle East" }, { "id": 175, "iso3": "MYT", "name": "Mayotte", "continent": "Africa" }, { "id": 710, "iso3": "ZAF", "name": "South Africa", "continent": "Africa" }, { "id": 894, "iso3": "ZMB", "name": "Zambia", "continent": "Africa" }, { "id": 716, "iso3": "ZWE", "name": "Zimbabwe", "continent": "Africa" } ] :reqheader X-Api-Authorisation: API key; see :doc:`authentication` :reqheader X-Api-App-Authorisation: app key; see :doc:`authentication`