# Global Forest Watch & Resource Watch Dataset Explorer (`vexaloom-labs/global-forest-watch-and-resource-watch-dataset`) Actor

Browse the shared environmental dataset catalog behind Global Forest Watch, Resource Watch, Aqueduct, PREP, Forest Atlas and Open Data. Search by keyword and filter by source application, with provider and tag metadata per dataset.

- **URL**: https://apify.com/vexaloom-labs/global-forest-watch-and-resource-watch-dataset.md
- **Developed by:** [vexaloom-labs](https://apify.com/vexaloom-labs) (community)
- **Categories:** Automation, Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Global Forest Watch & Resource Watch Dataset & Alert Explorer

Global Forest Watch, Resource Watch, Aqueduct, PREP, Forest Atlas and the Open Data portal share one environmental data catalog. This actor exposes that catalog and the public GFW alert summary tables in a single keyless workflow: discover datasets, inspect their metadata and fields, then pull alert counts or alert statistics for a country, admin area, geostore or custom polygon.

Everything runs against public endpoints with no API key, login, cookie or proxy configuration.

### Modes

| Mode | What it returns |
|---|---|
| `datasets` | Resource Watch catalog entries: the shared index behind GFW, Resource Watch, Aqueduct, PREP, Forest Atlas and Open Data. Filter by application, provider, connector type or keyword. |
| `gfwDatasets` | The GFW Data API catalog: dataset slug, title/subtitle, source, license, citation, coverage, update frequency, resolution, tags and available versions. |
| `datasetDetails` | Full metadata for one or more datasets. Resource Watch records include layer/widget counts; GFW records include the latest version and asset links. |
| `datasetFields` | The field dictionary for a GFW dataset version: field name, unit, data type, no-data value and coded-value meanings. |
| `alerts` | Alert counts for an area from the GFW Data API summary tables: date, alert system, confidence category, alert count and alert area. Works for ISO3, `ISO3:ADM1`, `ISO3:ADM1:ADM2` and geostore IDs with precomputed rows. |
| `statistics` | The same alert rows grouped by day, week, month or year, with confidence breakdowns and area totals. |

### Input

| Field | Type | Default | Used by | Description |
|---|---|---|---|---|
| `mode` | select | `datasets` | all | Which workflow to run. |
| `searchQuery` | string | – | `datasets`, `gfwDatasets` | Free-text query; every word must appear in the name, description, tags, version or ID. |
| `application` | select | any | `datasets`, `gfwDatasets` | Resource Watch application filter; in GFW mode it matches tags, names and IDs. |
| `provider` | select | any | `datasets` | Resource Watch data provider (CARTO, GFW, Earth Engine, ArcGIS, CSV, …). |
| `connectorType` | select | any | `datasets` | Resource Watch connector type (REST, document, WMS, vector, …). |
| `datasetIds` | string list | – | `datasetDetails` | Resource Watch UUIDs, GFW dataset slugs or dataset API URLs. |
| `dataset` | string | `umd_tree_cover_loss` | `datasetFields` | GFW dataset slug. |
| `version` | string | `latest` | `datasetFields` | GFW version such as `latest` or `v1.9.1`. |
| `area` | string | – | `alerts`, `statistics` | ISO3 code (`BRA`), admin area (`BRA:15` or `BRA:15:139`), Resource Watch geostore ID, GFW geostore UUID, or `latitude,longitude`. |
| `alertSystem` | select | `glad` | `alerts`, `statistics` | `glad` or `integrated` alert layer. |
| `polygon` | string | – | `alerts`, `statistics` | GeoJSON Geometry, Feature or FeatureCollection. Overrides `area`. |
| `radiusKm` | integer | `5` | `alerts`, `statistics` | Radius used when `area` is a `lat,lng` pair (1–100 km). |
| `startDate` / `endDate` | string | `2020-01-01` / `2021-12-31` | `alerts`, `statistics` | YYYY-MM-DD alert period. |
| `aggregateBy` | select | `month` | `statistics` | Time bucket: day, week, month or year. |
| `gladConfirmOnly` | boolean | `false` | `alerts`, `statistics` | Keep only high/highest-confidence alerts. |
| `maxItems` | integer | `20` | all | Maximum records (1–1000); in `statistics` it caps the number of buckets. |

### Saved-task compatibility

Tasks saved against the first release keep working: legacy keys such as `query`, `app`, `limit`, `geostore`, `start`/`end`, `confirmedOnly`, `modeType` and `datasetSlug` are mapped onto the new inputs in code. Only the new names appear in the input form.

### Examples

Browse GFW-tagged Resource Watch datasets about mangroves:

```json
{
  "mode": "datasets",
  "application": "gfw",
  "searchQuery": "mangrove",
  "maxItems": 50
}
```

List GFW Data API datasets about alerts:

```json
{
  "mode": "gfwDatasets",
  "searchQuery": "alerts",
  "maxItems": 30
}
```

Inspect two datasets by reference:

```json
{
  "mode": "datasetDetails",
  "datasetIds": ["umd_tree_cover_loss", "48064dbb-3354-469a-b07f-d0503cb329ea"],
  "maxItems": 2
}
```

Read the field dictionary for tree cover loss:

```json
{
  "mode": "datasetFields",
  "dataset": "umd_tree_cover_loss",
  "version": "latest",
  "maxItems": 200
}
```

Pull confirmed GLAD alert counts for Brazil in 2021:

```json
{
  "mode": "alerts",
  "area": "BRA",
  "alertSystem": "glad",
  "startDate": "2021-01-01",
  "endDate": "2021-12-31",
  "gladConfirmOnly": true,
  "maxItems": 100
}
```

Summarize Brazil by month:

```json
{
  "mode": "statistics",
  "area": "BRA",
  "alertSystem": "glad",
  "startDate": "2021-01-01",
  "endDate": "2021-12-31",
  "aggregateBy": "month",
  "maxItems": 12
}
```

Drill into one admin-1 area (Pará, GADM code 15):

```json
{
  "mode": "statistics",
  "area": "BRA:15",
  "alertSystem": "integrated",
  "startDate": "2025-01-01",
  "endDate": "2025-03-31",
  "aggregateBy": "month",
  "maxItems": 12
}
```

Aggregate a small custom polygon (geostore summary rows only):

```json
{
  "mode": "statistics",
  "polygon": "{\"type\":\"Polygon\",\"coordinates\":[[[-55,-7.2],[-54.85,-7.2],[-54.85,-7.05],[-55,-7.05],[-55,-7.2]]]}",
  "alertSystem": "glad",
  "startDate": "2021-01-01",
  "endDate": "2021-12-31",
  "aggregateBy": "month",
  "maxItems": 12
}
```

### Output fields

Catalog records (`datasets`, `gfwDatasets`, `datasetDetails`) use a shared vocabulary: `datasetId`, `catalog`, `slug`, `name`, `subtitle`, `description`, `provider`, `connectorType`, `tableName`, `connectorUrl`, `applications`, `tags`, `published`, `hasGeoInfo`, `createdAt`, `updatedAt`, `dataLastUpdated`, `citation`, `license`, `source`, `geographicCoverage`, `updateFrequency`, `spatialResolution`, `resolutionDescription`, `versions`, `latestVersion`, `isDownloadable`, `isLatest`, `isMutable`, `assets`, `layerCount`, `widgetCount` and `datasetUrl`.

Field records add `fieldName`, `unit`, `dataType`, `noDataValue`, `valueCount`, `values` and `defaultMeaning`.

Area alert records include `areaId`, `areaName`, `iso`, `adm1`, `adm2`, `adminLevel`, `alertDate`, `alertSystem`, `confidenceCategory`, `alertCount`, `alertAreaHectares`, `confirmed`, `source` and `recordType: "alert"`.

Statistic records include `areaId`, `areaName`, `period`, `aggregateBy`, `alertSystem`, `alertCount`, `alertAreaHectares`, `confirmedAlertCount`, `confidenceCounts`, `firstAlertDate`, `lastAlertDate`, `totalAlerts`, `totalAlertAreaHectares` and the requested `startDate`/`endDate`.

Every record also carries `recordType` (`dataset`, `gfwDataset`, `datasetDetail`, `field`, `alert` or `statistic`) and `scrapedAt`. Empty fields are omitted, never emitted as `null` or an empty string.

### Use cases

- **Environmental researchers** — inventory which forest, land-use, water-risk and climate datasets exist before requesting the underlying data.
- **GIS and data-engineering teams** — resolve dataset slugs, versions and field dictionaries for a downstream pipeline.
- **Journalists and NGOs** — quantify recent GLAD alerts inside a country, protected area or custom polygon without an API key.
- **Monitoring teams** — schedule a daily alert count for one AOI and compare time buckets across a season.

### FAQ

**Does this need an API key or account?** No. The catalog endpoints and the public GFW data gateway are called directly and anonymously.

**Does `alerts` return integrated alerts?** Yes. Set `alertSystem` to `integrated` for integrated deforestation alerts, or keep `glad` for the GLAD layer.

**Why do my GLAD alert dates stop in 2021?** The public GLAD summary tables cover the legacy GLAD series for most countries. Switch to `alertSystem: integrated` for newer alert data.

**Can I use a polygon instead of a geostore?** Yes. Pass GeoJSON in `polygon`; the actor creates a temporary geostore automatically. Area tables only have precomputed rows for geostores in the GFW summary set, so countries and admin areas are the reliable choice.

**How do I pick an admin area code?** Use the GADM numeric code after the ISO3, for example `BRA:15` for Pará. Add the GADM admin-2 code for a district, for example `BRA:15:139`. Not every admin-2 area has precomputed alert rows.

**What does `gladConfirmOnly` mean?** It keeps only high/highest-confidence alerts.

**How fresh is the catalog?** Every run queries the live API, so titles, versions, fields and tags reflect the state of the catalog at run time.

**Is this affiliated with Global Forest Watch, Resource Watch or the World Resources Institute?** No. This is an independent tool that reads publicly accessible APIs and is not operated by or affiliated with those organizations. Dataset metadata and alerts retain their original licenses and attribution; see each record's `citation`, `license` and `source`.

### Data sources and attribution

- Resource Watch API — catalog, metadata, vocabulary, layers and widgets.
- GFW Data API — GFW dataset catalog, versions, assets and field dictionaries.
- GFW public Data API gateway — alert summary tables by country, admin area and geostore.
- GFW public data gateway — GLAD and integrated alert summary rows used for area counts and statistics.
- GLAD alerts: Hansen et al., University of Maryland Global Land Analysis & Discovery (GLAD).

Alert data and dataset metadata remain subject to the upstream licenses. This actor does not rehost or resell the datasets themselves.

# Actor input Schema

## `mode` (type: `string`):

Choose what to fetch. Catalog modes need no keys; alert modes use the public GFW Data API alert summary tables.

## `searchQuery` (type: `string`):

Free-text filter for catalog modes. Every word must appear in the name, description, tags, version or ID.

## `application` (type: `string`):

Filter the Resource Watch catalog by source application. In GFW catalog mode it matches dataset tags, names and IDs.

## `provider` (type: `string`):

Filter Resource Watch catalog datasets by data provider.

## `connectorType` (type: `string`):

Filter Resource Watch catalog datasets by connector type.

## `datasetIds` (type: `array`):

Dataset references for datasetDetails. Accepts Resource Watch UUIDs, GFW Data API slugs and dataset API URLs.

## `dataset` (type: `string`):

GFW Data API dataset slug used by datasetFields (for example umd_tree_cover_loss, gfw_integrated_alerts).

## `version` (type: `string`):

GFW dataset version for datasetFields. Use latest or a version such as v1.9.1.

## `area` (type: `string`):

Alerts and statistics area: ISO3 country code (BRA), ISO3:ADM1 (BRA:15), ISO3:ADM1:ADM2 (BRA:15:139), a Resource Watch geostore ID, or a latitude,longitude pair (for example -7.1,-54.9).

## `alertSystem` (type: `string`):

Alert layer used by alerts and statistics. Integrated alerts are newer; GLAD coverage on the public tables extends through 2021 for most countries.

## `polygon` (type: `string`):

Optional GeoJSON Geometry, Feature or FeatureCollection. Overrides Area and is converted to a geostore automatically.

## `radiusKm` (type: `integer`):

Radius used to build an area when Area is a latitude,longitude pair.

## `startDate` (type: `string`):

Alert period start in YYYY-MM-DD format.

## `endDate` (type: `string`):

Alert period end in YYYY-MM-DD format.

## `aggregateBy` (type: `string`):

Time bucket used by statistics mode.

## `gladConfirmOnly` (type: `boolean`):

Keep only alerts with confidence 3 or higher.

## `maxItems` (type: `integer`):

Maximum records to return (1-1000). For statistics this caps the number of time buckets.

## Actor input object example

```json
{
  "mode": "datasets",
  "application": "",
  "provider": "",
  "connectorType": "",
  "datasetIds": [
    "umd_tree_cover_loss"
  ],
  "dataset": "umd_tree_cover_loss",
  "version": "latest",
  "alertSystem": "glad",
  "radiusKm": 5,
  "startDate": "2020-01-01",
  "endDate": "2021-12-31",
  "aggregateBy": "month",
  "gladConfirmOnly": false,
  "maxItems": 3
}
```

# Actor output Schema

## `datasets` (type: `string`):

Dataset containing the scraped catalog, field, alert or statistic records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "datasets",
    "datasetIds": [
        "umd_tree_cover_loss"
    ],
    "dataset": "umd_tree_cover_loss",
    "version": "latest",
    "alertSystem": "glad",
    "radiusKm": 5,
    "startDate": "2020-01-01",
    "endDate": "2021-12-31",
    "aggregateBy": "month",
    "gladConfirmOnly": false,
    "maxItems": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("vexaloom-labs/global-forest-watch-and-resource-watch-dataset").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "datasets",
    "datasetIds": ["umd_tree_cover_loss"],
    "dataset": "umd_tree_cover_loss",
    "version": "latest",
    "alertSystem": "glad",
    "radiusKm": 5,
    "startDate": "2020-01-01",
    "endDate": "2021-12-31",
    "aggregateBy": "month",
    "gladConfirmOnly": False,
    "maxItems": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("vexaloom-labs/global-forest-watch-and-resource-watch-dataset").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "datasets",
  "datasetIds": [
    "umd_tree_cover_loss"
  ],
  "dataset": "umd_tree_cover_loss",
  "version": "latest",
  "alertSystem": "glad",
  "radiusKm": 5,
  "startDate": "2020-01-01",
  "endDate": "2021-12-31",
  "aggregateBy": "month",
  "gladConfirmOnly": false,
  "maxItems": 3
}' |
apify call vexaloom-labs/global-forest-watch-and-resource-watch-dataset --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vexaloom-labs/global-forest-watch-and-resource-watch-dataset"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XIz7ta2ANaWJ66ass/builds/8jsiaCpSGlc3NeBKT/openapi.json
