Documentation Blog Free tools [email protected]Log in

World Bank API

A World Bank API call takes one indicator code and a set of countries and returns a clean panel: one row per country-year with the numeric value, the ISO3 code and the indicator's label. NY.GDP.MKTP.CD makes it a GDP API, SP.POP.TOTL a population series, FP.CPI.TOTL.ZG an inflation feed — the Bank's roughly 16,000 indicator codes all answer in the same shape, keyless.

$0.0002 per delivered datapoint · $2 free every month · Failed runs never billed

POST /v1/scraper/collectors/world_bank/run
$ curl $QD/world_bank/run \
    -H "Authorization: Bearer $QD_API_KEY" \
    -d '{}'
{ "status": "done", "count": 10,
  "results": [
    {
      "country": "…",
      "country_code": "…",
      "year": "…",
      "value": … } ],
  "cost": 0.002 }
# 10 datapoints × $0.0002 · nothing delivered, nothing charged
$0.0002 / datapoint10,000 datapoints on the free $2 every month
Semantic inputindicator, countries, year_from — no URL lists
Up to 200datapoints per run, pagination handled for you
No browserread over HTTP/TLS — cheaper and faster than rendering

What a World Bank API does

The World Bank indicators API is open and official, but it answers in paged JSON with a metadata envelope in front of the data. Here the panel arrives already long-format — country, year, value — which is the layout a pivot, a regression or a database table accepts without reshaping, joined on country_code plus year.

Years the Bank holds no figure for are skipped by default, so the series you store is dense rather than padded with nulls; set include_empty when the gaps need to stay visible. Up to 30 countries ride in one call, ISO2 or ISO3, and aggregate codes like WLD pass through the same way — a country data API that also covers the world total.

What one datapoint looks like

Every delivered datapoint carries these fields. Nullable means the source did not publish it — the field stays empty instead of being guessed.

FieldTypeWhat it holds
rankinteger1-based position.
countrystring · nullableCountry name.
country_codestring · nullableISO3 code.
yearstring · nullableYear.
valuenumber · nullableIndicator value.
indicatorstringIndicator code.
indicator_namestring · nullableIndicator label.

Inputs

The whole request. Anything you leave out falls back to the default shown in the catalog.

InputTypeRequiredWhat it does
indicatorstringyesWorld Bank indicator code.
countriesarrayyesISO2/ISO3 country codes.
year_fromintegernoFirst year (default: all).
year_tointegernoLast year (default: latest).
include_emptybooleannoKeep rows whose value is null.
max_resultsintegernoHow many datapoints to deliver at most (1–200). You pay only for delivered datapoints.

Pricing

World Bank API pricing

$0.0002 per delivered datapoint. A run that delivers nothing costs nothing: blocked pages, challenges and retries are on us, and the $2 monthly allowance covers about 10,000 datapoints before you spend anything.

$0.0002per delivered datapoint$0.2 per 1,000 delivered datapoints
10,000 datapointson the free allowance$2 every month, no card
Zero rowszero chargeblocks, captchas and retries are on us
−30%on volume tiersthe catalog returns your key's price

Pay as you go

$0/mo
  • $2 free credit / month
  • 60 requests / min
  • List unit prices

Starter

$19/mo
  • $15 free credit / month
  • 300 requests / min
  • 10% off unit prices

Scale

$299/mo
  • $250 free credit / month
  • 1,200 requests / min
  • 30% off unit prices

Same wallet, same key and same $2 monthly allowance as every other Data API. Prices are launch pricing read live from the billing config — GET /v1/scraper/collectors returns the price your key actually pays.

Integration

One POST, typed rows

Base URL https://api.quanticdata.io/v1, Bearer auth, the same key as every other Data API. Endpoint: POST /v1/scraper/collectors/world_bank/run.

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/world_bank/run \
  -H "Authorization: Bearer $QD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

What people build with the World Bank API

Three shapes of work this endpoint was designed around.

Macro feature panels

Pull GDP, inflation or population per country-year and join them onto your observations as model features keyed by country code and year.

Country enrichment joins

A market-sizing or lead table with a country column picks up population and income columns from one indicator call each.

Long-run trend series

year_from reaches back toward 1960, so a single request returns decades of one indicator for charting or back-testing.

World Bank API versus rolling your own

The differences that actually cost time when you build this in-house.

DIY scraperThis collector
Panel shapePaged JSON behind a metadata envelopeLong-format rows: country, year, value
Missing yearsNulls scattered through the seriesSkipped by default, kept only on request
Batching countriesA request loop over country codesUp to 30 countries in a single call

FAQ

Questions we get about the World Bank API.

Something else? Ask us →

Which indicator codes does the World Bank API accept?

Any code from the Bank's catalog of roughly 16,000 — NY.GDP.MKTP.CD for GDP in current US dollars, SP.POP.TOTL for population, FP.CPI.TOTL.ZG for CPI inflation — one indicator per call, across the countries you list.

Why are some years missing from the series?

Because the Bank publishes no figure for them. Null-value years are dropped so the panel stays dense; pass include_empty as true and they come back as rows with a null value instead.

Can I query world or regional aggregates?

Yes — aggregate codes such as WLD for the world total travel through the countries list exactly like ISO codes, so a global series and a country comparison come from the same call shape.

Is there a free World Bank API?

Every account gets $2 of credit every month with no card, which is about 10,000 delivered datapoints on this endpoint at $0.0002 each. It renews monthly, and a run that delivers nothing is never billed — so a failed or blocked attempt does not eat the allowance.

How much does one run cost?

Multiply the rows you actually receive by $0.0002. A run capped at 200 datapoints — the maximum for this collector — costs $0.04 if every row comes back, and less when the source has fewer. Volume tiers take up to 30% off, and GET /v1/scraper/collectors returns the price your key actually pays.

Run the World Bank API now

$2 of free credit every month, no card. Your key returns its own prices from GET /v1/scraper/collectors.

Get my free API key
Get my free API key