Back to how-to articles
Tropical Tree Cover x Global Forest Watch API
Last updated: July 3, 2025

Before you get started
If you are new to the Global Forest Watch API, it is a good idea to begin with the foundational guide. It covers essential steps like signing up, getting access token and API key. You can find it here:
Steps
- Find the version of the dataset
- Find the fields to query
- Make a query
Find the version
To receive data about the Tropical Tree Cover dataset, you can use a GET
request to the /dataset/wri_tropical_tree_cover
endpoint.
1curl -X GET 'https://data-api.globalforestwatch.org/dataset/wri_tropical_tree_cover'
If successful, this will return a response like this, with metadata and versions:
1{
2 "data": {
3 "created_on": "2023-01-20T19:25:00.656830",
4 "updated_on": "2023-01-20T19:25:00.656836",
5 "dataset": "wri_tropical_tree_cover",
6 "is_downloadable": true,
7 "metadata": {
8 ...
9 },
10 "versions": [
11 ...
12 "v2020.1",
13 "v2020.2"
14 ]
15 },
16 "status": "success"
17}
For the next steps you can pick a specific version of the dataset or just use /latest
for the latest version.
Find the relevant fields
Before querying the dataset, you will need to know what fields to get from the dataset. To retrieve this, you can use a GET
request to dataset/wri_tropical_tree_cover/latest/fields
1curl -L -X GET 'https://data-api.globalforestwatch.org/dataset/wri_tropical_tree_cover/latest/fields'
Tropical Tree Cover dataset is a default raster asset. The response will include all Global Forest Watch raster tile sets that use the same grid as the raster default asset. Common fields like area__ha
, latitude
, and longitude
are also included.
The other relevant field for Tropical Tree Cover dataset are:
- wri_tropical_tree_cover__decile
- wri_tropical_tree_cover__percent
Query dataset
In addition to the dataset identifier wri_tropical_tree_cover
and version, you need to construct an SQL
query and a geometry to limit the area of interest.
Limit data to area of interest
There are two ways to do this; using Geostore, or using GeoJson in a Post request. Both methods require geojson format. The possible geometry types available in Global Forest Watch is Polygon and MultiPolygon. To easily generate this format, visit https://geojson.io.
Using POST request with a polygon
Example using polygon:
1curl -L -X POST 'https://data-api.globalforestwatch.org/dataset/sbtn_natural_forests_map/latest/query/json' \
2 -H 'x-api-key: <YOUR_API_KEY>' \
3 -H 'Content-Type: application/json' \
4 --data-raw '{
5 "sql": "SELECT sum(area__ha) FROM results WHERE wri_tropical_tree_cover__percent > 90",
6 "geometry": {
7 "type": "Polygon",
8 "coordinates": [[
9 [-60.474,-18.695],
10 [-60.474,-18.922],
11 [-60.231, -18.922],
12 [-60.231,-18.695],
13 [-60.474,-18.695]
14 ]]
15 }
16 }'
If successful the response will look something like this:
1{
2 "data": [
3 {
4 "area__ha": 53110.23464
5 }
6 ],
7 "status": "success"
8}
You can read more about Geostore and constructing SQL queries from in the Global Forest Watch tutorial.