Time series · world-macro

World macro core indicators

Annual GDP (current US dollars), real GDP growth, GDP per capita, consumer price inflation, unemployment (ILO modeled estimate) and population for every economy and the world from the World Bank's World Development Indicators, 1960 to the latest year. Regional and income-group aggregates are left out; Kosovo and the Channel Islands, which have no ISO country code, are included as wb-xkx and wb-chi.

Updates
Quarterly
Coverage
—
Current version
—
Last published
—
Validation
—
License
CC BY 4.0
Commercial use
Allowed

Chart

World macro core indicators

Loading the chart…
Source: The World Bank.
Show the data as a table

The table appears once the data has loaded.

Use the API

Each series and location is its own small file. The examples follow the series and location picked above. See the docs for versions, caching and errors.

curl

# One series for one place (.json or .csv)
curl -s "https://api.economicdata.dev/v1/world-macro/annual/world.json"

# Every series and place in one file
curl -sO "https://api.economicdata.dev/v1/world-macro/download/world-macro.csv"

Python (polars)

import polars as pl

# One series for one place
df = pl.read_csv("https://api.economicdata.dev/v1/world-macro/annual/world.csv")

# Every series and place, with series and location columns
everything = pl.read_parquet("https://api.economicdata.dev/v1/world-macro/download/world-macro.parquet")

JavaScript

const res = await fetch("https://api.economicdata.dev/v1/world-macro/annual/world.json");
if (!res.ok) throw new Error((await res.json()).detail); // errors are problem+json
const { meta, data } = await res.json();
console.log(meta.location_name, data.at(-1)); // { date, value, ... }

Downloads

The whole dataset in one file, with series and location columns. Parquet keeps the column types and is much smaller.

Schema and series

Each series file has these columns. The bulk downloads add series and location columns in front.

Column Type Unit Can be empty Description
date year (YYYY) — no —
gdp_usd number USD yes GDP, current US dollars (NY.GDP.MKTP.CD)
gdp_growth_pct number percent yes Real GDP growth, annual (NY.GDP.MKTP.KD.ZG)
gdp_per_capita_usd number USD yes GDP per capita, current US dollars (NY.GDP.PCAP.CD)
inflation_cpi_pct number percent yes Inflation, consumer prices, annual (FP.CPI.TOTL.ZG)
unemployment_pct number percent yes Unemployment, percent of total labor force, modeled ILO estimate (SL.UEM.TOTL.ZS)
population integer persons yes Population, total (SP.POP.TOTL)

Series

Series id Name
annual Annual values

Locations

Covers all 249 countries (ids: ISO 3166-1 alpha-3, lowercase (usa, twn)); 3 more named places.

Location id Name
world World
wb-xkx Kosovo (World Bank code XKX; no ISO 3166-1 code)
wb-chi Channel Islands (World Bank code CHI; Jersey and Guernsey combined)

Place names come from the shared location registry; see Sources.

Source and license

Source
World Bank World Development Indicators (Indicators API v2)
Publisher
The World Bank
License
Creative Commons Attribution 4.0 (CC-BY-4.0)
Commercial use
Allowed

Credit the source with this exact text:

The World Bank: World Development Indicators: GDP, GDP growth and GDP per capita from country official statistics, National Statistical Organizations and/or Central Banks; National Accounts data files, Organisation for Economic Co-operation and Development (OECD); Staff estimates, World Bank (WB). Inflation from the International Financial Statistics database, International Monetary Fund (IMF). Unemployment from the ILO Modelled Estimates database (ILOEST), International Labour Organization (ILO). Population from World Population Prospects, United Nations (UN); national statistical offices; Eurostat; and the UN Population and Vital Statistics Report. Licensed under CC BY 4.0 (https://www.worldbank.org/ext/en/legal/terms-conditions/datasets).

Checked every 1 day. If the source hasn't changed in 200 days, the status page flags it as stale.

Endpoints

Every URL for this dataset. To pin the current version, put it after the id: /v1/world-macro@<version>. The API reference describes each response.

What URL
Metadata: version, coverage, downloads, validation /v1/world-macro
Versions and monthly snapshots /v1/world-macro/versions
Series and locations /v1/world-macro/locations
Annual values (JSON) /v1/world-macro/annual/{location}.json
Annual values (CSV) /v1/world-macro/annual/{location}.csv
Whole dataset (CSV) /v1/world-macro/download/world-macro.csv
Whole dataset (Parquet) /v1/world-macro/download/world-macro.parquet