Data source: OECD SDMX REST API
https://context.gnist.ai/rest/oecd/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (6)
search_datasetsSearch the OECD dataset catalog by keyword.
Returns matching datasets with their full dataflow IDs needed for
get_data, get_dataset_structure, and compare_countries calls.
OECD covers 38+ member economies with data on GDP, trade, education,
health, labor, environment, governance, and more.
Args:
query: Search term (e.g. "gdp", "productivity", "education").
limit: Number of results to return (1-50, default 20).
Returns:
List of matching datasets with id, name, agency, and description.
Use the 'id' field as the dataflow parameter in other tools.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search term for OECD datasets (e.g. "gdp", "productivity", "education", "trade", "labour", "health"). |
limit | integer | optional | Number of results to return (1-50, default 20). (default: 20) |
{
"query": "example"
}list_datasetsList available OECD datasets, optionally filtered by topic.
Browse the full OECD data catalog. Use this to discover what
datasets exist before querying specific data.
Args:
topic: Optional topic filter keyword. Omit to list all datasets.
limit: Maximum datasets to return (1-200, default 50).
Returns:
List of datasets with id, name, and description.
| Parameter | Type | Required | Description |
|---|---|---|---|
topic | any | optional | Optional topic filter (e.g. "health", "labour", "education", "environment"). Omit to list all. |
limit | integer | optional | Maximum datasets to return (1-200, default 50). (default: 50) |
{
"query": "example"
}get_dataset_structureGet the dimension structure of an OECD dataset.
Shows what dimensions (filters) are available for a dataset and their
valid values. Use this before get_data to understand what country codes,
indicators, frequencies, and other parameters are accepted.
Args:
dataflow: OECD dataflow identifier from search_datasets.
Returns:
List of dimensions with their valid codes/values. Each dimension
shows its position in the SDMX key and sample values.
| Parameter | Type | Required | Description |
|---|---|---|---|
dataflow | string | required | OECD dataflow identifier from search_datasets (e.g. "OECD.SDD.TPS,DSD_PDB@DF_PDB_LV,1.0"). |
{
"dataflow": "example"
}get_dataFetch data from an OECD dataset.
Query any OECD dataset using an SDMX dimension key filter.
Use get_dataset_structure first to find valid dimension values
and their positions in the key.
OECD does not support startPeriod/endPeriod filters.
Use last_n_observations to limit the time range.
Args:
dataflow: OECD dataflow identifier. Use search_datasets to find IDs.
key_filter: SDMX dimension key with * wildcards for any position.
last_n_observations: Return only the last N time periods.
limit: Maximum observations to return (1-1000, default 200).
Returns:
Observations with all dimension labels and values.
| Parameter | Type | Required | Description |
|---|---|---|---|
dataflow | string | required | OECD dataflow identifier (e.g. "OECD.SDD.TPS,DSD_PDB@DF_PDB_LV,1.0"). Use search_datasets to find IDs. |
key_filter | any | optional | SDMX dimension key (dot-separated, * for wildcard, e.g. "A.USA.*.*.*"). Use get_dataset_structure to find valid values. |
last_n_observations | any | optional | Return only the last N time periods (1-100). |
limit | integer | optional | Maximum observations to return (1-1000, default 200). (default: 200) |
{
"dataflow": "example"
}compare_countriesCompare data across countries for a given OECD dataset.
Fetches the same indicator for multiple countries side by side.
Useful for cross-country analysis of GDP, productivity, education,
health, and other OECD statistics.
Args:
dataflow: OECD dataflow identifier.
country_codes: ISO alpha-3 country codes to compare. Maximum 20.
last_n_observations: Return last N time periods (1-100, default 5).
Returns:
Data grouped by country for easy comparison.
| Parameter | Type | Required | Description |
|---|---|---|---|
dataflow | string | required | OECD dataflow identifier (e.g. "OECD.SDD.TPS,DSD_PDB@DF_PDB_LV,1.0"). |
country_codes | list[string] | required | ISO alpha-3 country codes to compare (e.g. ["USA", "DEU", "JPN", "NOR"]). Maximum 20. |
last_n_observations | integer | optional | Return last N time periods per country (1-100, default 5). (default: 5) |
{
"dataflow": "example",
"country_codes": [
"example"
]
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/oecd/search_datasets" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"query": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/oecd/search_datasets",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"query": "example"
},
)
print(resp.json())