Science & Math — entry 028 of 28

World Bank

Verified Jul 2026

The World Bank's Indicators API gives free, keyless REST access to the World Development Indicators dataset — thousands of economic, social, and environmental indicators across nearly 300 countries and regions, spanning six decades. Responses are paginated JSON or XML, covering countries, regions, income levels, lending types, topics, sources, and the indicator series themselves.

The World Bank Indicators API is a keyless REST endpoint over the World Development Indicators dataset. Every successful response is a two-element JSON array: a pagination object first, then the actual data array — a shape that trips up naive `response.data` assumptions from other REST APIs.

economicsopen-datagovernment-datastatisticsdevelopment
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSON, XMLResponses can be requested as JSON or XML.

GreatAPIs Score

Score94out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs14/20Documentation URL provided
Formats15/15Supports 2 response formats
Freshness20/20Verified within 6 months

Embed this badge

Scored 94 on greatapis.com
<a href="https://greatapis.com/api/world-bank/"><img src="https://greatapis.com/badge/world-bank.svg" alt="Scored 94 on greatapis.com"></a>

Auth quickstart

  1. No account or key is required — every request below is a public, unauthenticated GET, reconfirmed live this run.
Stored keyNo key stored

Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.

Fetch a country's latest value for an indicator

GEThttps://api.worldbank.org/v2/country/br/indicator/SP.POP.TOTL?format=json&per_page=1

200 application/json;charset=utf-8

[{"page":1,"pages":66,"per_page":1,"total":66,"sourceid":"2","lastupdated":"2026-07-13"},[{"indicator":{"id":"SP.POP.TOTL","value":"Population, total"},"country":{"id":"BR","value":"Brazil"},"countryiso3code":"BRA","date":"2025","value":212812405,"unit":"","obs_status":"","decimal":0}]]

Captured byte-for-byte from this run's live probe, no truncation. Brazil's 2025 total population (212,812,405) and `lastupdated: 2026-07-13` reflect whatever the World Bank's dataset held at probe time, not a curated pick.

Developer reference

Base URLhttps://api.worldbank.org/v2

Gotchas & limits

  • `format=json` must be set explicitly — the default (no `format` param at all) is XML, not JSON. Confirmed live this run: the identical `/country/br/indicator/SP.POP.TOTL?per_page=1` call with no `format` parameter returned `content-type: text/xml` and a `<wb:data>` document instead of the JSON array above.
  • An unrecognized indicator code does not 404 — it returns HTTP 200 with a single-element array carrying an error message, distinguishable from a real success only by its shape: `[{"message":[{"id":"120","key":"Invalid value","value":"The provided parameter value is not valid"}]}]`, confirmed live this run against `BOGUS.INDICATOR.XYZ`. A real success is always a *two*-element array (pagination object, then data array) — check `Array.isArray(body) && body.length === 2`, not just HTTP status, to detect failure.
  • `date` accepts a `start:end` range, not just a single year — a live probe with `date=2020:2022&per_page=5` returned all three years (2020, 2021, 2022) for Brazil's population indicator in one call, with `total: 3` in the pagination object confirming the range was honored, not truncated to one point.
  • CORS is open: a live probe with `Origin: https://example.com` returned `access-control-allow-origin: *` on the same indicator query, so it's safe to call directly from browser JS.