IMF Macroeconomic Data & Indicators Scraper avatar

IMF Macroeconomic Data & Indicators Scraper

Pricing

from $10.20 / 1,000 results

Go to Apify Store
IMF Macroeconomic Data & Indicators Scraper

IMF Macroeconomic Data & Indicators Scraper

Scrape IMF macroeconomic time series as flat rows: indicator code and name, country, year, value, unit and dataset. Pick indicators, countries and a year range across World Economic Outlook, Fiscal Monitor, Global Debt Database and more. Export to JSON, CSV or Excel.

Pricing

from $10.20 / 1,000 results

Rating

0.0

(0)

Developer

Scrapers Lat

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 days ago

Last modified

Share

IMF Macroeconomic Data & Indicators Scraper

IMF Macroeconomic Data & Indicators Scraper

Here is one real result, with every field the actor returns:

{
"dataset": "WEO",
"datasetName": "World Economic Outlook",
"datasetSource": "World Economic Outlook (April 2026)",
"indicatorCode": "NGDP_RPCH",
"indicatorName": "Real GDP growth",
"unit": "Annual percent change",
"countryCode": "BRA",
"countryName": "Brazil",
"frequency": "Annual",
"period": "2015",
"periodYear": 2015,
"value": -3.5,
"source": "IMF",
"observedAt": "2026-08-10T14:32:58.053Z"
}

The most complete IMF macroeconomic data scraper available. It emits one flat, analysis-ready row per observation (indicator, country, year, value) with the indicator name, unit, dataset and country name attached, across every dataset the IMF data portal exposes, filterable by indicator, country and year range.

📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples

Apify Coverage Output Billing

Table of contents

What it does

The actor pulls IMF public macroeconomic time series from the IMF data portal and writes one flat row per observation to the run's dataset. Each row is a single indicator/country/year value, enriched with the indicator name and unit, the dataset code and friendly name, the dataset source vintage and the country name. You select which indicators to pull (or a whole dataset), which countries to keep and the year range. It reads only publicly available IMF data (no account or key required).

Rows are sorted by country then year within each indicator, so the output is stable and ready for charts, spreadsheets or a database.

Quickstart

Open the actor, paste this into the input, and press Run. It returns real GDP growth, inflation and GDP per capita for five economies from 2015 to 2027.

{
"indicators": ["NGDP_RPCH", "PCPIPCH", "NGDPDPC"],
"countries": ["USA", "CHN", "BRA", "MEX", "IND"],
"startPeriod": 2015,
"endPeriod": 2027,
"maxObservations": 10
}

Leave indicators empty and pick a dataset to pull every indicator in that dataset. Leave countries empty to return every country and regional aggregate.

Input reference

FieldTypeRequiredDefaultDescription
indicatorsstring[]no["NGDP_RPCH","PCPIPCH","NGDPDPC"]IMF indicator codes, one per line, for example NGDP_RPCH (real GDP growth), PCPIPCH (inflation), NGDPDPC (GDP per capita), LUR (unemployment). Empty uses the selected dataset.
datasetenumno(any)Pull every indicator in one dataset when indicators is empty. One of WEO, FM, GDD, DEBT, ARA, CF, CL, GD, FPP, SPRLU, AFRREO, FR_FC, AIPI. Ignored when indicators is set.
countriesstring[]no(all)ISO alpha-3 country/area codes to keep, for example USA, CHN, BRA. Empty returns every country and regional aggregate.
startPeriodintegerno(none)Earliest year to include (inclusive).
endPeriodintegerno(none)Latest year to include (inclusive). WEO datasets include IMF forecast years.
maxObservationsintegerno5000Maximum observation rows across all indicators and countries. Free Apify plans are capped at 25 per run.

If neither indicators nor dataset is given, the actor defaults to NGDP_RPCH and PCPIPCH.

Output reference

One dataset item per observation (indicator + country + year). Types: string, number, integer, or null when the source value is absent.

FieldTypeDescription
datasetstringDataset code, for example WEO, else null.
datasetNamestringFriendly dataset name, for example World Economic Outlook.
datasetSourcestringSource vintage, for example World Economic Outlook (April 2026), else null.
indicatorCodestringIMF indicator code.
indicatorNamestringIndicator label, else null.
unitstringUnit of the value, for example Annual percent change, else null.
countryCodestringISO alpha-3 country/area code.
countryNamestringCountry or area name, else null.
frequencystringAlways Annual.
periodstringObservation period (year) as a string.
periodYearintegerObservation year as a number.
valuenumberThe observation value.
sourcestringAlways IMF.
observedAtstringISO 8601 timestamp of when the record was collected.
errorstringPresent only on a failed run: a single item with a populated error field is written instead.

Example output record

Real record from a live run (input {"indicators":["NGDP_RPCH","PCPIPCH","NGDPDPC"],"countries":["USA","CHN","BRA","MEX","IND"],"startPeriod":2015,"endPeriod":2027,"maxObservations":10}):

{
"dataset": "WEO",
"datasetName": "World Economic Outlook",
"datasetSource": "World Economic Outlook (April 2026)",
"indicatorCode": "NGDP_RPCH",
"indicatorName": "Real GDP growth",
"unit": "Annual percent change",
"countryCode": "BRA",
"countryName": "Brazil",
"frequency": "Annual",
"period": "2015",
"periodYear": 2015,
"value": -3.5,
"source": "IMF",
"observedAt": "2026-08-10T14:32:58.053Z"
}

Run via API and CLI

Start a run and wait for it to finish, then read the dataset. Replace <TOKEN> with your Apify API token.

Run synchronously and get dataset items in one call:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~imf-data-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"indicators":["NGDP_RPCH"],"countries":["USA","CHN"],"startPeriod":2020,"endPeriod":2027,"maxObservations":100}'

Start a run asynchronously:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~imf-data-scraper/runs?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"dataset":"GDD","countries":["BRA","MEX","ARG"],"maxObservations":5000}'

Apify CLI:

apify call scrapers_lat/imf-data-scraper \
--input '{"indicators":["PCPIPCH","LUR"],"countries":["USA"],"startPeriod":2010}'

Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing format:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
# Paginate large datasets
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&offset=1000&limit=1000"

<DATASET_ID> is returned as defaultDatasetId in the run object. Use offset and limit to page through large result sets. clean=true drops empty and internal fields.

Billing and limits

  • Pay per result. You are charged per observation row returned (result event). See the pricing tab for the current per-result price.
  • No charge on failure. If a run errors, the actor writes a single item with a populated error field and does not charge for it. Empty runs cost nothing.
  • Spend cap respected. Set maxTotalChargeUsd on the run; once reached, the actor stops emitting and charging further billable results.
  • Free Apify plans are capped at 25 observation rows per run. Upgrade for higher maxObservations.

FAQ and troubleshooting

A run returned 0 rows. Why? No observations matched your indicator, country and year-range combination, or the indicator codes were not recognized. Widen the year range, check the ISO alpha-3 country codes, and confirm the indicator codes. Zero-result runs are not charged.

Where do I find indicator codes? Common WEO codes include NGDP_RPCH (real GDP growth), PCPIPCH (inflation), NGDPDPC (GDP per capita), LUR (unemployment rate), GGXWDG_NGDP (government debt to GDP). Leave indicators empty and set a dataset to pull an entire dataset.

Do WEO figures include forecasts? Yes. WEO series include IMF projection years beyond the latest actuals, up to the dataset's forecast horizon.

Why is one row per observation better than nested series? Flat rows load directly into spreadsheets, BI tools and databases with no reshaping. Each row is a self-contained indicator/country/year value.

Is this an official IMF tool? No. This actor is independent and has no affiliation with the IMF. It reads only data that is publicly available through the IMF data portal. Use it in accordance with the IMF's terms and data attribution requirements.

More scrapers at scrapers.lat

Built and maintained by scrapers.lat, where we publish scrapers for US and Latin American public platforms: company registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at scrapers.lat.


Independent tool, not affiliated with the IMF. Accesses only publicly available IMF data portal data. Use in accordance with the IMF's terms and data attribution requirements.