# OECD Statistics Scraper (`publicmoney/oecd-statistics-scraper`) Actor

Extract OECD data as labeled rows from any of 1,550 datasets, such as GDP, inflation, and unemployment. Search them by keyword, filter by country, frequency, and period, and export to JSON, CSV, or Excel.

- **URL**: https://apify.com/publicmoney/oecd-statistics-scraper.md
- **Developed by:** [Public Money](https://apify.com/publicmoney) (Apify)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 50.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

### How do you get OECD data as structured rows?

OECD Statistics Scraper reads any of the 1,550 datasets OECD publishes, covering GDP, consumer prices, unemployment, trade, health, and education. It returns one row per observation with every code labeled in words. You filter by country, frequency, and period, and OECD sends only the rows you asked for. Don't know a dataset's id? Search by keyword first.

It reads OECD's free SDMX API, the same data behind the OECD Data Explorer. You need no API key and no SDMX knowledge.

### What OECD data does it return?

One row per observation. This is a real row for US consumer prices, read from the live OECD API:

```json
{
  "status": "ok",
  "requested": "DF_PRICES_ALL",
  "datasetId": "OECD.SDD.TPS,DSD_PRICES@DF_PRICES_ALL,1.0",
  "datasetName": "Consumer price indices (CPIs, HICPs), COICOP 1999",
  "country": "USA",
  "countryName": "United States",
  "frequency": "Monthly",
  "measure": "Consumer price index",
  "unit": "Percent per annum",
  "period": "2026-09",
  "value": 3.737685,
  "observationStatus": "Normal value",
  "dimensions": { "REF_AREA": "USA", "FREQ": "M", "METHODOLOGY": "N", "MEASURE": "CPI", "UNIT_MEASURE": "PA", "EXPENDITURE": "_T", "ADJUSTMENT": "N", "TRANSFORMATION": "GY" },
  "dimensionLabels": { "REF_AREA": "United States", "FREQ": "Monthly", "METHODOLOGY": "National", "MEASURE": "Consumer price index", "UNIT_MEASURE": "Percent per annum", "EXPENDITURE": "Total", "ADJUSTMENT": "Neither seasonally adjusted nor calendar adjusted", "TRANSFORMATION": "Growth rate, over 1 year" },
  "attributes": { "DECIMALS": "2", "OBS_STATUS": "A" },
  "attributeLabels": { "DECIMALS": "Two", "OBS_STATUS": "Normal value" },
  "seriesKey": "USA.M.N.CPI.PA._T.N.GY",
  "validFrom": "2026-09-01T00:00:00Z"
}
```

Empty fields are left out of a row, so a field appears only when OECD publishes it for that series.

| Field | What it holds |
|---|---|
| `datasetId`, `datasetName` | The dataset's full reference and its name |
| `countryName`, `frequency`, `period` | Where, how often, and when, in words |
| `measure`, `unit`, `unitMultiplier` | What is measured and in what unit; `unitMultiplier` says, for example, Millions |
| `value`, `observationStatus` | The figure, and whether it is a normal, estimated, or provisional value |
| `dimensions` | Every dimension of the series as a code, with the same dimensions in words beside it, so a national accounts row also names its sector and price base |
| `seriesKey` | The series' SDMX key, reusable in `filterKey` |

A keyword search returns one row per matching dataset instead, with `datasetId`, `name`, `agency`, and `description`.

### How do you use it in Apify Console?

1. Open OECD Statistics Scraper in Apify Console.
2. Put a dataset id such as `DF_PRICES_ALL` in **Datasets**, or a keyword such as `unemployment` in **Search datasets**.
3. Add countries, a frequency, and a start period to narrow the rows.
4. Click **Start**, then read the dataset or export it as JSON, CSV, or Excel.

### What input does it take?

Give a search term, one or more datasets, or both.

| Field | Type | What it does |
|---|---|---|
| `datasets` | array | Datasets to read: the short id (`DF_PRICES_ALL`), the full reference, or a data URL from the Developer API panel on the OECD Data Explorer |
| `search` | string | Keywords to find datasets by. Every word must match the dataset's id, name, or description |
| `countries` | array | ISO 3166-1 alpha-3 codes, such as `USA`, `DEU`, and `JPN`. Empty means every country |
| `frequency` | string | `A` (annual), `Q` (quarterly), or `M` (monthly). Empty means every frequency |
| `startPeriod`, `endPeriod` | string | `2020`, `2020-Q1`, or `2020-01`. Empty means the full history up to the latest |
| `lastNObservations` | integer | Only the latest N periods of every series. `0` returns every period |
| `filterKey` | string | A raw SDMX key for full control over every dimension. Overrides `countries` and `frequency` |
| `maxItems` | integer | Caps the rows returned, and so the cost. Default `100`. `0` means no cap |

The smallest input that works:

```json
{
  "datasets": ["DF_PRICES_ALL"],
  "countries": ["USA"],
  "frequency": "M",
  "lastNObservations": 12
}
```

### How are OECD datasets found and filtered?

A search reads OECD's whole list of datasets and keeps the datasets whose id, name, and description contain every word you typed. The `datasetId` on each result goes straight into `datasets`.

When you set `countries` or `frequency`, the Actor reads the dataset's structure and writes them into the OECD query, so a request for US monthly figures downloads only those rows, never the whole dataset. A short id that matches datasets from two OECD directorates returns a `failed` row that lists the full references to choose from. When a dataset has several versions, the newest one is read.

### How do you call the OECD API through Apify, or from an AI agent?

Start a run with the Apify API and read the rows when it finishes:

```bash
curl -X POST "https://api.apify.com/v2/acts/publicmoney~oecd-statistics-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"datasets": ["DF_PRICES_ALL"], "countries": ["USA", "DEU"], "frequency": "M", "startPeriod": "2026-01"}'
```

The Actor also runs in Standby: send the same input to its `/search` route and get the rows back in one request, at most 500 per request. To let an agent use it, connect Apify's MCP server at `https://mcp.apify.com` in Claude, Cursor, or any MCP client and add OECD Statistics Scraper as a tool. An agent can search for a dataset id and read it in two calls.

### How much does OECD data cost?

You pay per row, at the price of your Apify plan:

| Event | Free plan | Diamond plan | When |
|---|---|---|---|
| Record | $0.002 | $0.0007 | Each observation or search result returned |
| Actor start | $0.00005 per GB | $0.00005 per GB | Once per run, per GB of memory (2 GB by default) |

A dataset that did not resolve, a filter with no data, and a gap in a series (an observation with no value) are returned but not charged. `maxItems` caps a run at 100 rows by default, because one dataset can hold millions of observations.

### What are the limitations?

- Only OECD data is read. URLs must be `sdmx.oecd.org/public/rest/data` links; other links return a `failed` row.
- `countries` and `frequency` need a country or frequency dimension. A dataset without one returns a `failed` row that lists its dimensions, so you can use `filterKey` instead.
- A search matches words, not meanings: `jobs` will not find a dataset described only as `employment`.
- The data is as current as OECD publishes it. Release dates differ by dataset and country.

### Troubleshooting

| Issue | Solution |
|---|---|
| A `failed` row says the dataset was not found | Check the id, or run a search and copy its `datasetId` |
| A `failed` row asks for the full reference | Two OECD directorates use that short id. Paste one of the references it lists |
| An `empty` row | OECD has no observations for that filter. Widen the period or the countries |
| A `failed` row lists dimensions | The dataset has no country or frequency dimension. Build a `filterKey` from the dimensions it lists |
| Fewer rows than expected | `maxItems` defaults to 100. Raise it, or set `0` for no cap |

For anything else, open an issue on the Actor's Issues tab with your input and run ID.

### Frequently asked questions

Short answers before your first run.

#### Is the OECD data live?

Yes. Every run reads the OECD API at the time it runs, so you get the latest release.

#### What is the smallest input that works?

One dataset id, such as `DF_PRICES_ALL`, as in the example above. Add `countries` to keep the rows few.

#### What happens when nothing matches?

You get one `empty` row saying OECD has no observations for that filter, and it is not charged.

#### How many rows does a run return?

Up to `maxItems`, 100 by default. Set it to `0` to read everything that matches.

#### Can I use it as an OECD API?

Yes. Call it through the Apify API or its Standby route with a JSON input and read labeled rows back as JSON, without writing SDMX queries.

#### Can I use it with MCP and AI agents?

Yes. Add it to Apify's MCP server and any MCP client can search OECD datasets and read them as a tool.

#### How much does a run cost?

Each observation or search result is one Record, $0.002 on the Free plan. Rows that are not data are free.

#### Is it legal to use OECD data?

OECD publishes this data openly through its public API. Check OECD's terms of use for how you may reuse and credit it.

#### Can I run it on a schedule?

Yes. Save the input as a task in Apify Console with `lastNObservations` set, and add a monthly schedule to collect each new release.

# Actor input Schema

## `datasets` (type: `array`):

OECD datasets to read, one per line. Use the dataflow id (e.g. 'DF_PRICES_ALL' for consumer prices), the full reference ('OECD.SDD.TPS,DSD_PRICES@DF_PRICES_ALL,1.0'), or a data URL from the Developer API panel on the OECD Data Explorer. Don't know the id? Run a search first.

## `search` (type: `string`):

Find datasets by keyword, e.g. 'unemployment' or 'house prices'. Returns one row per matching dataset with the id to put in Datasets. Every word must match.

## `countries` (type: `array`):

ISO 3166-1 alpha-3 codes, e.g. 'USA', 'DEU', 'JPN'. Leave empty for every country in the dataset. OECD filters before sending, so only the rows asked for are returned.

## `frequency` (type: `string`):

Annual, quarterly or monthly. Leave empty for every frequency the dataset publishes.

## `startPeriod` (type: `string`):

First period to return: '2020', '2020-Q1' or '2020-01'. Leave empty for the full history.

## `endPeriod` (type: `string`):

Last period to return, in the same forms. Leave empty for the latest available.

## `lastNObservations` (type: `integer`):

Return only the most recent N periods of every series. 0 returns every period in range.

## `filterKey` (type: `string`):

An SDMX key for full control over every dimension, dot-separated in the dataset's own order, with '+' for several values and an empty position for all. Example for consumer prices: 'USA+GBR.M.N.CPI.PA.\_T.N.GY'. Overrides Countries and Frequency.

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

Caps how many rows are returned, and so caps the cost. A whole dataset can hold millions of observations, so this defaults to 100. Set to 0 for no cap.

## Actor input object example

```json
{
  "datasets": [
    "DF_PRICES_ALL"
  ],
  "countries": [
    "USA"
  ],
  "startPeriod": "2024",
  "lastNObservations": 0,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

One row per observation, or per dataset a search matched, in the default dataset.

# 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 = {
    "datasets": [
        "DF_PRICES_ALL"
    ],
    "countries": [
        "USA"
    ],
    "startPeriod": "2024",
    "lastNObservations": 0,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("publicmoney/oecd-statistics-scraper").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 = {
    "datasets": ["DF_PRICES_ALL"],
    "countries": ["USA"],
    "startPeriod": "2024",
    "lastNObservations": 0,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("publicmoney/oecd-statistics-scraper").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 '{
  "datasets": [
    "DF_PRICES_ALL"
  ],
  "countries": [
    "USA"
  ],
  "startPeriod": "2024",
  "lastNObservations": 0,
  "maxItems": 100
}' |
apify call publicmoney/oecd-statistics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,publicmoney/oecd-statistics-scraper"
        }
    }
}
```

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/6ry6RuYmqksj8i72G/builds/dQPEHT1bH4cgTpUI3/openapi.json
