AIDEVELOPER TOOLS

OECD Economic Statistics Search

Query the Organisation for Economic Co-operation and Development (OECD) SDMX REST API for structured macroeconomic data across 38 member countries and partner economies. This Apify actor provides programmatic access to thousands of statistical datasets covering GDP, national accounts, consumer prices, unemployment, employment, trade balances, health expenditure, education finance, and key economic indicators. It fetches data in CSV format from the official OECD SDMX endpoint, parses code-label p

Try on Apify Store
$0.002per event
1
Users (30d)
42
Runs (30d)
90
Actively maintained
Maintenance Pulse
$0.002
Per event

Maintenance Pulse

90/100
Last Build
Today
Last Version
1d ago
Builds (30d)
8
Issue Response
N/A

Cost Estimate

How many results do you need?

data-fetcheds
Estimated cost:$0.20

Pricing

Pay Per Event model. You only pay for what you use.

EventDescriptionPrice
data-fetchedCharged per OECD economic statistics record retrieved.$0.002

Example: 100 events = $0.20 · 1,000 events = $2.00

Documentation

Query the Organisation for Economic Co-operation and Development (OECD) SDMX REST API for structured macroeconomic data across 38 member countries and partner economies. This Apify actor provides programmatic access to thousands of statistical datasets covering GDP, national accounts, consumer prices, unemployment, employment, trade balances, health expenditure, education finance, and key economic indicators. It fetches data in CSV format from the official OECD SDMX endpoint, parses code-label pairs, and outputs clean JSON records with separated country codes and names, indicator labels, time periods, numeric values, and units of measurement. No API key is required -- the OECD API is freely accessible, so you can start pulling macroeconomic data immediately without registration.


Why use OECD Economic Statistics Search

Accessing OECD data programmatically through the raw SDMX API requires understanding complex dataflow references, dimension filter keys, and CSV parsing with mixed "CODE: Label" formats. This actor abstracts all of that into a simple input form with dropdown dataset selection, country filters, frequency options, and time range controls. You get structured JSON output without writing a single line of SDMX query logic.

Running on Apify gives you cloud execution with no local infrastructure required, scheduled runs for automatic data refreshes, and integration-ready output that connects directly to Google Sheets, Slack, webhooks, and any downstream data pipeline. Results are stored in Apify datasets that you can access, share, and download in JSON, CSV, or Excel format at any time.

Whether you are an economist tracking quarterly GDP revisions, a data journalist comparing unemployment trends across G7 nations, or a developer building a macroeconomic dashboard, this actor delivers the data you need in a format that is immediately usable. Combine it with scheduled runs to maintain continuously updated economic datasets without manual intervention.


Key features

  • 10 pre-configured datasets -- GDP and national accounts, consumer price index, monthly unemployment, monthly employment, economic outlook, balance of payments, health expenditure, education finance, key economic indicators, and national accounts at a glance.
  • Custom dataflow support -- Enter any valid OECD SDMX dataflow reference to access thousands of additional datasets beyond the built-in selection.
  • Country filtering -- Filter results by ISO 3166-1 alpha-3 country codes with + separator for multiple countries (e.g., USA+GBR+DEU).
  • Frequency control -- Restrict output to annual (A), quarterly (Q), or monthly (M) data points.
  • Time range selection -- Specify start and end periods in flexible formats including 2020, 2020-Q1, and 2020-01.
  • SDMX dimension filter keys -- Use dot-separated filter keys for precise API-level data slicing before results are returned.
  • Parsed code-label pairs -- Country names, indicator names, frequency labels, and unit descriptions are extracted alongside their machine-readable codes for human-friendly output.
  • Full dimension and attribute maps -- Every data point includes the complete set of raw SDMX dimensions and attributes for advanced analytical use cases.
  • Up to 10,000 results per run -- Configurable maximum output size to match your data volume requirements.
  • No API key required -- Direct access to the freely available OECD SDMX REST API with zero authentication overhead.

How to use

Using the Apify Console

  1. Navigate to the OECD Economic Statistics Search actor page on Apify.
  2. Click Start to open the input configuration form.
  3. Select a dataset from the dropdown (e.g., "GDP & National Accounts" or "Monthly Unemployment Rates").
  4. Optionally enter a country filter using ISO alpha-3 codes (e.g., USA or FRA+DEU+JPN).
  5. Choose a frequency if you want only annual, quarterly, or monthly data.
  6. Set start and end periods to narrow the time range (e.g., 2020 to 2024).
  7. Adjust the max results slider if you need more than the default 100 data points.
  8. Click Start to run the actor and view results in the Dataset tab when complete.

Using the Apify API

cURL:

curl "https://api.apify.com/v2/acts/ryanclinton~oecd-statistics-search/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "datasetId": "OECD.SDD.NAD,DSD_NAMAIN10@DF_TABLE1,1.0",
    "country": "USA+GBR+DEU",
    "frequency": "A",
    "startPeriod": "2020",
    "endPeriod": "2024",
    "maxResults": 500
  }'

JavaScript:

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('ryanclinton/oecd-statistics-search').call({
    datasetId: 'OECD.SDD.NAD,DSD_NAMAIN10@DF_TABLE1,1.0',
    country: 'USA+GBR+DEU',
    frequency: 'A',
    startPeriod: '2020',
    endPeriod: '2024',
    maxResults: 500,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python:

from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("ryanclinton/oecd-statistics-search").call(run_input={
    "datasetId": "OECD.SDD.NAD,DSD_NAMAIN10@DF_TABLE1,1.0",
    "country": "USA+GBR+DEU",
    "frequency": "A",
    "startPeriod": "2020",
    "endPeriod": "2024",
    "maxResults": 500,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

Input parameters

ParameterTypeRequiredDefaultDescription
datasetIdSelectYesGDP & National AccountsPre-configured OECD dataflow reference. 10 options covering GDP, CPI, unemployment, employment, economic outlook, balance of payments, health, education, KEI, and national accounts.
customDatasetIdStringNo--Override the dropdown with any valid OECD SDMX dataflow reference in the format AGENCY,DSD@DF_NAME,VERSION.
filterKeyStringNoallDot-separated dimension filter key for API-level data slicing. Use empty positions for wildcards (e.g., A.USA.S1.S1.B1GQ........).
countryStringNo--ISO 3166-1 alpha-3 country code(s). Separate multiple codes with + (e.g., USA+GBR+DEU). Applied as post-filter on the REF_AREA column.
frequencySelectNoAll frequenciesData frequency: Annual (A), Quarterly (Q), or Monthly (M). Applied as post-filter on the FREQ column.
startPeriodStringNo--Start of time range. Accepts 2020, 2020-Q1, or 2020-01 formats. Passed directly to the SDMX API.
endPeriodStringNo--End of time range. Accepts 2024, 2024-Q4, or 2024-12 formats. Passed directly to the SDMX API.
maxResultsIntegerNo100Maximum number of data points to return. Range: 1 to 10,000.

Example input JSON:

{
    "datasetId": "OECD.SDD.TPS,DSD_LFS@DF_IALFS_UNE_M,1.0",
    "country": "USA+JPN+DEU+FRA+GBR",
    "frequency": "M",
    "startPeriod": "2022-01",
    "endPeriod": "2024-12",
    "maxResults": 1000
}

Tips for best input:

  • Start with a pre-configured dataset from the dropdown before experimenting with custom dataflow references.
  • Use country filters to reduce noise -- OECD datasets often contain data for 38+ countries.
  • Combine frequency and time range filters to minimize response size and processing time.
  • Find custom dataflow references at data-explorer.oecd.org by clicking the "Developer API" button on any dataset page.
  • Increase maxResults to 1,000--5,000 for comprehensive country-level time series data.

Output

Each run produces a dataset of structured JSON objects. Here is a realistic example of a single data point from the GDP and National Accounts dataset:

{
    "dataflow": "OECD.SDD.NAD,DSD_NAMAIN10@DF_TABLE1,1.0: Gross domestic product (GDP)",
    "country": "USA",
    "countryName": "United States",
    "indicator": "B1GQ",
    "indicatorName": "Gross domestic product (expenditure approach)",
    "frequency": "A",
    "frequencyName": "Annual",
    "period": "2023",
    "value": 27360935,
    "unit": "USD",
    "unitName": "US Dollar",
    "unitMultiplier": "6: Millions",
    "observationStatus": "",
    "dimensions": {
        "FREQ": "A: Annual",
        "REF_AREA": "USA: United States",
        "SECTOR": "S1: Total economy",
        "COUNTERPART_SECTOR": "S1: Total economy",
        "TRANSACTION": "B1GQ: Gross domestic product (expenditure approach)",
        "ACTIVITY": "_T: Total",
        "VALUATION": "V: Current prices",
        "TRANSFORMATION": "N: Not transformed",
        "PRICE_BASE": "_Z: Not applicable",
        "ADJUSTMENT": "Y: Seasonally adjusted"
    },
    "attributes": {
        "UNIT_MULT": "6: Millions",
        "DECIMALS": "0",
        "CONF_STATUS": "F: Free"
    },
    "extractedAt": "2026-02-17T10:45:22.000Z"
}

Output field descriptions:

FieldTypeDescription
dataflowStringSDMX dataflow reference with label identifying the dataset.
countryStringISO 3166-1 alpha-3 country code (e.g., USA, GBR, DEU).
countryNameStringHuman-readable country name (e.g., "United States").
indicatorStringSDMX indicator code identifying the measured variable.
indicatorNameStringHuman-readable indicator label (e.g., "Gross domestic product").
frequencyStringFrequency code: A (annual), Q (quarterly), or M (monthly).
frequencyNameStringHuman-readable frequency label (e.g., "Annual").
periodStringTime period for the observation (e.g., 2023, 2023-Q2, 2023-06).
valueNumber/nullNumeric observation value, or null if not recorded.
unitStringUnit of measurement code (e.g., USD, PC).
unitNameStringHuman-readable unit name (e.g., "US Dollar", "Percentage").
unitMultiplierStringScale factor with label (e.g., "6: Millions").
observationStatusStringData quality flag (e.g., estimated, provisional, break in series).
dimensionsObjectAll raw SDMX dimension columns with their "CODE: Label" values.
attributesObjectAll raw SDMX attribute columns with their "CODE: Label" values.
extractedAtStringISO 8601 timestamp of when the data was extracted.

Use cases

  • Macroeconomic research -- Pull GDP, CPI, and employment data across OECD countries for academic papers or policy analysis.
  • Country comparison dashboards -- Build side-by-side economic performance visualizations for G7, G20, or custom country groups.
  • Inflation monitoring -- Track consumer price index trends monthly across multiple economies to identify inflationary or deflationary pressures.
  • Labor market analysis -- Compare unemployment and employment rates across countries and time periods to assess workforce trends.
  • Trade balance tracking -- Monitor balance of payments data to analyze import/export dynamics and current account positions.
  • Health expenditure benchmarking -- Compare healthcare spending as a percentage of GDP across OECD member states.
  • Automated reporting pipelines -- Schedule periodic data pulls and pipe results into Google Sheets, Slack notifications, or data warehouses.
  • Economic forecasting inputs -- Feed OECD Economic Outlook projections into forecasting models alongside historical data.
  • Education policy analysis -- Analyze education finance indicators to compare public spending on education across countries.
  • Data journalism -- Generate charts and infographics from structured OECD data without manual CSV downloads or reformatting.

API & Integration

Retrieve results programmatically after a run completes using the Apify API.

Python:

from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
dataset = client.dataset("DATASET_ID")
items = dataset.list_items().items
for item in items:
    print(f"{item['countryName']}: {item['indicatorName']} = {item['value']} ({item['period']})")

JavaScript:

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const { items } = await client.dataset('DATASET_ID').listItems();
items.forEach(item => {
    console.log(`${item.countryName}: ${item.indicatorName} = ${item.value} (${item.period})`);
});

cURL (fetch dataset items):

curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Integrations: Connect this actor's output to external services using Apify's built-in integrations -- push results to Google Sheets, send alerts to Slack, trigger workflows in Zapier or Make (Integromat), deliver data via webhooks, or export directly to Amazon S3. Schedule runs with Apify's cron-based scheduler to maintain continuously updated economic datasets.


How it works

  1. Input validation -- The actor reads input parameters and resolves the dataflow reference, using either the dropdown selection or the custom dataflow override.
  2. URL construction -- Builds the SDMX REST API URL with the dataflow reference, filter key (defaulting to all), and optional startPeriod/endPeriod query parameters.
  3. API request -- Sends a single HTTP GET request to https://sdmx.oecd.org/public/rest/data with an Accept header requesting CSV format with labels=both (includes both codes and human-readable labels).
  4. CSV parsing -- Parses the response using a custom CSV parser that handles quoted fields containing commas, then identifies key column positions (REF_AREA, FREQ, TIME_PERIOD, OBS_VALUE, UNIT_MEASURE, etc.) dynamically from headers.
  5. Code-label extraction -- Splits each "CODE: Label" value into separate code and name fields for countries, indicators, frequencies, and units.
  6. Post-filtering -- Applies country and frequency filters as post-processing steps on the parsed rows, matching against ISO alpha-3 codes and frequency codes.
  7. Dimension/attribute separation -- Classifies each CSV column as either an SDMX dimension or attribute and populates the respective maps in the output record.
  8. Output -- Pushes structured JSON data points to the Apify dataset up to the configured maxResults limit.
  9. Summary logging -- Logs run statistics including data point count, country distribution, period range, value range, and indicator breakdown.
Input Config
    |
    v
Build SDMX URL (dataflow + filter key + period range)
    |
    v
HTTP GET --> OECD SDMX REST API (CSV with labels=both)
    |
    v
Custom CSV Parser --> Header Detection --> Column Mapping
    |
    v
Row-by-Row Parsing --> Code:Label Splitting
    |
    v
Country Filter --> Frequency Filter --> maxResults Cap
    |
    v
Apify Dataset (structured JSON data points)

Performance & cost

MetricValue
Average run time5--30 seconds
Memory requirement256 MB (default)
Compute units per run~0.003--0.01 CU
API requests per run1 (single HTTP request)
Cost per 1,000 runs~$0.25--$0.50
Free tier estimate~2,000+ runs per month
Max results per run10,000 data points

The actor makes a single HTTP request per run and performs all parsing in memory. The OECD SDMX API is free with no rate limits for reasonable usage, so there are no external costs. Even with daily scheduled runs across multiple datasets, monthly costs remain well within the Apify free tier.


Limitations

  • Single request per run -- The actor does not paginate. Very large datasets may be truncated by the OECD API before reaching the 10,000 result cap. Use dimension filter keys and time ranges to narrow your query.
  • Post-filtering for country and frequency -- Country and frequency filters are applied after the API response is received. This means the full dataset is fetched even when filtering to a single country. Use the filterKey parameter for API-level filtering when possible.
  • OECD API availability -- The actor depends on the OECD SDMX REST API. If the API is down or undergoing maintenance, runs will fail.
  • Dataflow reference complexity -- Custom dataflow references follow the SDMX format (AGENCY,DSD@DF_NAME,VERSION) which can be difficult to construct manually. Use the OECD Data Explorer to find the correct reference.
  • No historical snapshots -- The actor returns the current state of OECD data. If the OECD revises past data points, subsequent runs will reflect the revised values.
  • Column structure varies by dataset -- Different OECD datasets have different dimension and attribute columns. The actor auto-detects columns but the dimensions and attributes maps will differ across datasets.
  • No API key support -- The OECD API does not require authentication, but this also means there is no way to increase rate limits or access restricted datasets.

Responsible use

  • Respect OECD terms of service -- The OECD SDMX API is provided for public use. Avoid sending excessive concurrent requests or running the actor at extremely high frequency against the same dataset.
  • Attribute data sources -- When publishing or sharing OECD data, provide proper attribution to the Organisation for Economic Co-operation and Development as the original data source.
  • Verify data accuracy -- Always cross-reference critical economic figures with the official OECD Data Explorer. Automated pipelines should include validation checks for unexpected nulls or outliers.
  • Use appropriate scheduling -- OECD data is updated on fixed schedules (monthly, quarterly, or annually depending on the dataset). Schedule your runs to match the actual update frequency rather than polling excessively.
  • Handle sensitive economic data carefully -- Macroeconomic data can influence financial decisions. Ensure downstream consumers of this data understand its limitations, revision schedules, and observation status flags.

FAQ

Q: Do I need an API key to use this actor? A: No. The OECD SDMX REST API is freely accessible without authentication. This actor works out of the box with no external credentials required.

Q: Which countries are available in OECD datasets? A: All 38 OECD member countries are covered, plus many partner and observer economies depending on the dataset. Use ISO 3166-1 alpha-3 codes such as USA, GBR, DEU, JPN, FRA, AUS, CAN, and KOR.

Q: Can I access datasets not listed in the dropdown? A: Yes. Use the customDatasetId field to enter any valid OECD SDMX dataflow reference. Browse available datasets at the OECD Data Explorer and click the "Developer API" button to find the reference string.

Q: What time periods are available? A: It depends on the dataset. GDP national accounts data is typically available from the 1960s to the latest published year. Monthly indicators like unemployment and CPI may go back to the 1990s. The actor returns whatever the OECD API provides within your specified time range.

Q: Why do some data points have a null value? A: A null value indicates that the observation was not recorded for that particular country, period, and indicator combination. Check the observationStatus field for additional context about missing or provisional values.

Q: How often is OECD data updated? A: Update frequency varies by dataset. GDP data is typically updated quarterly, consumer prices and unemployment monthly, and education indicators annually. Schedule this actor to match the update cadence of your target dataset.

Q: What is the dimension filter key and how do I use it? A: The filter key is an SDMX feature that pre-filters data at the API level using dot-separated dimension values. Each position corresponds to a dimension in the dataset structure, and empty positions act as wildcards. For example, A.USA.S1.S1.B1GQ........ in the GDP dataset fetches only annual US GDP data. This is more efficient than fetching all data and filtering afterward.

Q: What is the difference between datasetId and customDatasetId? A: datasetId is a dropdown with 10 pre-configured datasets. customDatasetId is a text field that overrides the dropdown, letting you enter any valid OECD SDMX dataflow reference for datasets not in the pre-configured list.

Q: Can I get data in CSV format instead of JSON? A: Yes. After the actor run completes, you can download the dataset in CSV, JSON, or Excel format from the Apify Console or via the API by appending ?format=csv to the dataset items endpoint.

Q: How do I find the correct country codes? A: OECD uses ISO 3166-1 alpha-3 codes. Common examples: USA (United States), GBR (United Kingdom), DEU (Germany), FRA (France), JPN (Japan), CAN (Canada), AUS (Australia), KOR (South Korea). The countryName field in the output provides the full name for reference.

Q: What does the unitMultiplier field mean? A: It indicates the scale of the value field. For example, "6: Millions" means the value is expressed in millions. A GDP value of 27360935 with a unit multiplier of "6: Millions" means 27,360,935 million (approximately $27.4 trillion).

Q: Can I combine this actor with other economic data sources? A: Absolutely. Use Apify's orchestration features to chain this actor with the World Bank, FRED, or IMF actors to build comprehensive macroeconomic datasets from multiple sources in a single automated pipeline.


Related actors

ActorDescriptionLink
World Bank Development IndicatorsAccess development indicators for 200+ countries covering poverty, education, health, and economic growth.apify.com/ryanclinton/world-bank-indicators
FRED Economic Data SearchQuery the Federal Reserve Economic Data database for US-focused economic time series including interest rates and industrial production.apify.com/ryanclinton/fred-economic-data
IMF Economic DataSearch International Monetary Fund datasets for global economic and financial statistics including World Economic Outlook projections.apify.com/ryanclinton/imf-economic-data
BLS US Economic Data SearchAccess Bureau of Labor Statistics data for US employment, wages, prices, productivity, and occupational statistics.apify.com/ryanclinton/bls-economic-data
Eurostat EU StatisticsQuery Eurostat for European Union statistical data covering economy, population, trade, and social indicators.apify.com/ryanclinton/eurostat-eu-statistics
Finnhub Stock Market DataRetrieve real-time and historical stock market data, company financials, and market news from Finnhub.apify.com/ryanclinton/finnhub-stock-data

How it works

01

Configure

Set your parameters in the Apify Console or pass them via API.

02

Run

Click Start, trigger via API, webhook, or set up a schedule.

03

Get results

Download as JSON, CSV, or Excel. Integrate with 1,000+ apps.

Use cases

Sales Teams

Build targeted lead lists with verified contact data.

Marketing

Research competitors and identify outreach opportunities.

Data Teams

Automate data collection pipelines with scheduled runs.

Developers

Integrate via REST API or use as an MCP tool in AI workflows.

Ready to try OECD Economic Statistics Search?

Start for free on Apify. No credit card required.

Open on Apify Store