World Bank Indicators Scraper — GDP, Population & More avatar

World Bank Indicators Scraper — GDP, Population & More

Pricing

Pay per event

Go to Apify Store
World Bank Indicators Scraper — GDP, Population & More

World Bank Indicators Scraper — GDP, Population & More

Fetch World Bank Open Data indicators (GDP, population, CO2, poverty and 20,000+ others) across any countries and years, flattened into one clean row per country, indicator and year.

Pricing

Pay per event

Rating

0.0

(0)

Developer

DevilScrapes

DevilScrapes

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 hours ago

Last modified

Share


🎯 What this scrapes

The World Bank's Open Data API is free and keyless, but its wire format is built for the World Bank's own tooling, not for a spreadsheet. A successful response is a two-element array — pagination metadata bolted onto a row list, not a normal JSON object — and an invalid indicator code answers with HTTP 200 and a silent error block instead of a 404. This Actor fetches any mix of indicator codes across any countries and any date range, and hands back one flat row per country/indicator/year — ready for a pivot table, not a parser rewrite.

🔥 What we handle for you

  • We parse the API's two-shape response envelope so a paging bug or a bad indicator code never corrupts your dataset.
  • We skip an invalid indicator code or an empty country series with a clear warning — one bad code never kills the rest of your run.
  • We retry 429/5xx responses with exponential backoff and honour Retry-After.
  • We keep every null observation — most (country, year) pairs genuinely have no reported value, and we ship that as a real null, not a dropped row.

💡 Use cases

  • Build a "GDP + population + CO2 for 200 countries × 25 years" master table for a macro research note.
  • Pull a development-finance dashboard's underlying indicators without hand-copying from the World Bank's website.
  • Feed an ESG or country-risk model with the World Bank's own reported figures, refreshed on a schedule.
  • Fact-check a journalism piece against the official series instead of a secondary aggregator.

⚙️ How to use it

  1. Click Try for free at the top of the page.
  2. List the indicator codes you need (e.g. NY.GDP.MKTP.CD for GDP) — codes are on data.worldbank.org/indicator.
  3. Set country codes (all or a ;-separated ISO list) and an optional date range.
  4. Click Start. Output streams into the run's dataset as it's fetched.
  5. Export from Storage → Dataset as JSON, CSV, or Excel — or fetch via the API.

📥 Input

FieldTypeRequiredDefaultNotes
indicatorCodesarrayno["NY.GDP.MKTP.CD"]World Bank indicator codes to fetch, one paginated series per code.
countryCodesstringno"all"all or a ;-separated ISO list, e.g. US;CN;DE.
dateRangestringno(none)Optional YYYY or YYYY:YYYY range, e.g. 2000:2024.
includeSourceNotebooleannofalseAttach each indicator's methodology note and source organization to every row.
maxResultsintegerno5000Stop after this many rows. Each row is one billed result event.
proxyConfigurationobjectno{"useApifyProxy": false}World Bank's API is public and keyless; proxy is opt-in.

Example input

{
"indicatorCodes": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"],
"countryCodes": "US;CN;DE",
"dateRange": "2015:2024",
"includeSourceNote": false,
"maxResults": 200,
"proxyConfiguration": {
"useApifyProxy": false
}
}

📤 Output

Every row is one dataset item — one (country, indicator, year) observation.

FieldTypeNotes
country_idstringCountry ISO3 code, falling back to the API's alpha-2 id.
country_iso3stringISO alpha-3 country code.
country_namestringCountry display name.
regionstringWorld Bank region — not enriched in v1, always null today.
income_levelstringWorld Bank income level — not enriched in v1, always null today.
indicator_idstringWorld Bank indicator code.
indicator_namestringIndicator display name.
yearintegerObservation year.
valuenumberObserved value — null for most rows; that's the API's own data, not a bug.
unitstringUnit of measure, when the API provides one.
obs_statusstringObservation status flag, when present.
decimalintegerDecimal precision of value.
scalestringValue scale, when the API provides one.
source_notestringIndicator methodology note (only when includeSourceNote is on).
source_organizationstringSource organization (only when includeSourceNote is on).

Example output

{
"country_id": "USA",
"country_iso3": "USA",
"country_name": "United States",
"region": null,
"income_level": null,
"indicator_id": "NY.GDP.MKTP.CD",
"indicator_name": "GDP (current US$)",
"year": 2022,
"value": 25462700000000.0,
"unit": "",
"obs_status": "",
"decimal": 0,
"scale": null,
"source_note": null,
"source_organization": null
}

💰 Pricing

Pay-Per-Event — you pay only when these events fire:

EventUSDWhat it is
actor-start$0.05One-off warm-up charge per run
result$0.002Per dataset item

Example: 1 000 results at the rates above ≈ $2.05. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

🚧 Limitations

  • region and income_level are not enriched from the country-metadata endpoint in this version — both ship as null. A future version will cross-reference /v2/country to fill them in.
  • This is a current snapshot, not a historical-revision tracker — the World Bank periodically restates past years, and we fetch whatever the API reports at run time.
  • We pass through the API's raw value and unit as-is — no currency conversion or unit normalization.

❓ FAQ

Do I need an API key?

No. The World Bank's Open Data API is free and keyless. We still send a polite, identifiable User-Agent so runs stay good API citizens.

Why is value null for so many rows?

Most countries don't report every indicator for every year — that's a real gap in the underlying data, not something we dropped. We ship the null so your analysis sees the true coverage.

What happens if I typo an indicator code?

The API answers a typo'd code with HTTP 200 and a hidden error block — we detect that, skip the code with a warning, and keep fetching every other code you asked for.

💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an issue on the Actor's Issues tab on Apify Console — we ship fixes weekly and we read every report.