# Find a dataset in the TerraLab catalogue

> Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL.

Search the TerraLab catalogue of open datasets by need or place, with each licence, coverage, size and the call that gets it.

| | |
| --- | --- |
| MCP tool | `find_datasets` on `https://mcp.terra-lab.ai/mcp` |
| Group | Data catalog |

## Use it

Connect the [MCP server](https://terra-lab.ai/docs/mcp) to your assistant and ask in plain words: the assistant picks `find_datasets` when the request fits and fills the arguments below. These are valid arguments:

```json
{"query":"land cover","area":{"place":"Kenya"}}
```

```json
{"query":"administrative boundaries","area":{"place":"Indonesia"}}
```

```json
{"ids":["esa_worldcover"],"area":{"place":"Belgium"}}
```

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | What the data is about, in a few English words (the catalogue is in English: translate the user's words): "land cover", "flood hazard", "administrative boundaries", "population". Local collections (Portolan) are titled in the publisher's language: add the user's own word when it is not English ("playgrounds Spielplätze"). Up to 200 characters. |
| `area` | object | No | The area: a bbox, or a place (name, address or coordinates) with an optional radius in metres. The place the user asks about, not the user's own location. |
| `area.bbox` | array of number | No | [west, south, east, north] in decimal degrees (WGS 84). Exactly 4 items. |
| `area.place` | string or object | No | A place name or address, or a point. |
| `area.radius_m` | number | No | Radius around the place in metres. From 1 to 100000. |
| `kind` | string | No | Keep one kind of dataset only. One of `"addresses"`, `"air_quality"`, `"basemap"`, `"biodiversity"`, `"boundaries"`, `"buildings"`, `"cadastre"`, `"climate"`, `"elevation"`, `"energy"`, `"extract"`, `"geology"`, `"hazards"`, `"health"`, `"hydrology"`, `"imagery"`, `"landcover"`, `"poi"`, `"population"`, `"settlements"`, `"soil"`, `"topographic_base"`, `"transport"`. |
| `ids` | array of string | No | Describe these dataset ids (from an earlier answer, portolan: ids too) instead of searching; with area, each gets its size estimate there. 0 to 20 items. |
| `limit` | integer | No | How many datasets to return. From 1 to 20. Default `5`. |
| `open_catalogues` | boolean | No | Also search the open catalogues (adds a few seconds). False: TerraLab catalogue only. Default `true`. |
| `request_id` | string | No | An id request_data returned (dr_ and 10 characters): gives that data request's status instead of searching. Up to 40 characters. |

## Response

`structuredContent` holds the result, `content` the same result as text for a model, and `isError` is `true` when the tool refused the request or failed; then `structuredContent.code`, `message` and `hint` say what to change.

```json
{
  "structuredContent": {
    "sources": [{ "name": "...", "licence": "...", "url": "..." }],
    "downloads": [{ "label": "...", "format": "...", "url": "...", "name": "..." }]
  },
  "content": [{ "type": "text", "text": "..." }],
  "isError": false
}
```

Every result lists its `sources` with their licence. File results come as `downloads`: each link builds its file when opened.

## Errors

A missing key answers `401`, an empty balance `402`, too many calls `429`. A call that fails or finds nothing is not counted. See [Errors and rate limits](https://terra-lab.ai/docs/errors).

## Description for agents

The text the server gives an agent to decide when to call this tool:

> Use this when the user asks what data exists for a need or a place before getting it: "what land cover data do you have for Kenya?", "official district boundaries of Indonesia", "is there a flood hazard map for Romania?". Searches the TerraLab catalogue of 353 hosted open datasets (land cover, boundaries, hazards, population, elevation, soil, buildings, hydrology, climate) and about 9,800 datasets TerraLab only points to. Give query (a few words), and area (a country or a place) to keep only datasets covering it and to get a size estimate. Also searches open catalogues live (data.gouv.fr for France, dados.gov.pt for Portugal, data.public.lu for Luxembourg, data.europa.eu for the other European countries, Source Cooperative, Microsoft Planetary Computer, Copernicus Data Space) and the Portolan catalogues (cloud-native GeoParquet, PMTiles and COG files with a publisher AGENTS.md, ranked by how well their extent fits the area): open_registry lists the Portolan matches with publisher, official or mirror, last sync date, SPDX licence, file URLs, columns, MapLibre styles and, for the first (or each portolan: id given in ids), the publisher's AGENTS.md notes quoted as third-party data; open_catalogues lists their matches, each with an open licence, extent, formats and read_with (a TerraLab call) or download_url, and, when the catalogue says it, context: last update, planned frequency, overdue update, EU high-value dataset, metadata quality score and the producer's own account of how the data was made. Returns up to limit hosted datasets (5 by default, 20 at most) and up to 3 datasets TerraLab only points to (with ids, every id asked), best first, each with its licence and attribution quoted from the catalogue, resolution, date, coverage, whether TerraLab hosts it, and the call that gets it (extract_dataset, extract_open_data, get_elevation or get_satellite_image). Read hosted first: hosted false means TerraLab does not serve that data, so give its page and offer request_data; never present it as available. An empty list means the catalogue has nothing for this need here, not that the data does not exist. Not for OpenStreetMap features of a place (extract_open_data), whether a forest is natural, planted or a plantation (get_forest_type), elevation (get_elevation) or satellite images and NDVI (get_satellite_image, get_satellite_index): those tools answer in one call. Never use the user's current location unless they type it.

## Call it over HTTP

The same tool is also callable over HTTP with an [API key](https://terra-lab.ai/docs/authentication): `POST https://mcp.terra-lab.ai/v1/tools/find_datasets` with the arguments as the JSON body.

```bash
curl -X POST https://mcp.terra-lab.ai/v1/tools/find_datasets \
  -H "Authorization: Bearer $TERRALAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"land cover","area":{"place":"Kenya"}}'
```

```python
import os
import requests

response = requests.post(
    "https://mcp.terra-lab.ai/v1/tools/find_datasets",
    headers={"Authorization": f"Bearer {os.environ['TERRALAB_API_KEY']}"},
    json={
        "query": "land cover",
        "area": {
            "place": "Kenya",
        },
    },
    timeout=120,
)
response.raise_for_status()
print(response.json()["structuredContent"])
```

```javascript
const response = await fetch('https://mcp.terra-lab.ai/v1/tools/find_datasets', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TERRALAB_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "query": "land cover",
    "area": {
      "place": "Kenya"
    }
  }),
});
const data = await response.json();
console.log(data.structuredContent);
```


Source: https://terra-lab.ai/docs/mcp/tools/find_datasets · Updated 2026-11-23
