GLOBE API

GLOBE API

Young girl looking at GLOBE.gov website on laptop, as graphic of small images float around.

Quickly access GLOBE data and filter it by various parameters with GLOBE application programming interface (API) calls. The GLOBE API is focused on supporting developers who want to use a programmatic interface to retrieve GLOBE data. Each API call is associated with a unique URL and variable combination that allows users to find the measurements they are looking for with speed and ease.  
 
API interface button
 


How to Use the API Interface

Refer to the GLOBE API Video Tutorial, or follow the steps below: 

  1. Open the GLOBE API Interface.
  2. From the API call list, find the call that contains the relevant data.
  3. Next to the call URL, click the "Get" button.
  4. To test an API call, on the right, click "Try it out."
    • When using the "Try it out" function, set the Sample value to "True." This limits the number of returned responses so the user can validate the call format.
  5. Next to "protocols," select the measurements to search for.
  6. Next to "datefield," select the date format to search by.
  7. Next to "startdate" and "enddate," choose the beginning and end dates of the search query.
  8. Select a data format for the call:
    • To return data in the GeoJSON format: Set "geojson" to "True."
    • To return data in a custom GLOBE JSON format: Set "geojson" to "False."
      • Important: The custom JSON format returns the results of the query as well as the total number of records returned for a full query run. To determine the record total for a call without performing the full query:
        1. Set "geojson" to False
        2. Set "sample" to True
  9. At the bottom, click "Execute."  

API Call Tips

To understand the format of the call, utilize the Curl or Request URL. Users can then programmatically modify the call as needed. For example, to perform a direct https call for all aerosols data from 1 January 2020 to 1 January 2012, use the URL below: 

https://api.globe.gov/search/v1/measurement/protocol/measureddate/?protocols=aerosols&startdate=2010-01-01&enddate=2012-01-02&geojson=FALSE&sample=FALSE

 

  • Note: When setting "sample=FALSE," the query will return all data instead of those bounded by the sample

To access large data sets, use the "Request URL" result. Do not use the "Try it out" option.

  • GLOBE currently limits the total amount of data returned to 1 million records. Users who are trying to access more than 1 million records may need to update their call by modifying the date range.

Public API is the default page for the GLOBE API interface. To find lower-level information, such as a list of all countries, places, last published dates and more, access the Public Dev API. To access the page:
  1. In the top right, click the "public-api" box.
  2. Select "public-dev-api."
  3. Follow the API call instructions above to complete a call request.