---
name: world-bank-ingestion
description: "How to get World Bank Open Data data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load World Bank indicators into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/world-bank
Provider: https://data.worldbank.org
Checked against the provider's documentation: 2026-10-29

## Access
- No account or API key.

## Request
```bash
curl 'https://api.worldbank.org/v2/country/US;CN/indicator/NY.GDP.MKTP.KD.ZG?format=json&date=2022:2025&per_page=100'
```

## Format
JSON: a two-item list, paging metadata (page, pages, per_page, total, lastupdated) then the rows. Without format=json the API answers in XML.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""World Bank Indicators API (GDP growth, all countries) -> pandas -> Parquet. No key."""
import requests
import pandas as pd

URL = "https://api.worldbank.org/v2/country/all/indicator/NY.GDP.MKTP.KD.ZG"
params = {"format": "json", "date": "2000:2025", "per_page": 1000, "page": 1}
rows = []
while True:
    r = requests.get(URL, params=params, timeout=60)
    r.raise_for_status()
    meta, data = r.json()          # the JSON is a two-item list: paging metadata, then the rows
    rows += data or []
    if params["page"] >= meta["pages"]:
        break
    params["page"] += 1

df = pd.json_normalize(rows)[["countryiso3code", "country.value", "date", "value"]]
df.columns = ["iso3", "country", "year", "gdp_growth_pct"]
df["year"] = df["year"].astype(int)
df.to_parquet("world_bank_gdp_growth.parquet", index=False)
print(len(df), "rows; last updated", meta.get("lastupdated"), "; missing values", int(df["gdp_growth_pct"].isna().sum()))
```
Run by us on 2026-10-29 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 6,916 rows for 266 countries and aggregates, 2000 to 2025; 314 empty values.

## Limits
- Rate limit: Not stated.
- Pages default to 50 rows; set per_page and follow pages.

## Quirks
- country/all also returns aggregates such as Euro area and income groups; income groups have an empty countryiso3code. Filter them out before country-level work.
- Missing years come back as value null.
- Values can be revised in later updates; keep the lastupdated date with your copy.

## Terms and attribution
- Most datasets, including World Development Indicators, are CC BY 4.0: credit the World Bank and say if you changed the data. Some datasets carry other licenses, so check each one.
- Terms page: https://datacatalog.worldbank.org/public-licenses

## Sources
- https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation: "API keys and other authentication methods are no longer necessary to access the API."
- https://datahelpdesk.worldbank.org/knowledgebase/articles/898581-api-basic-call-structures: "The default setting is 50 results per page."
- https://datacatalog.worldbank.org/public-licenses: "Users are only obligated to give appropriate credit (attribution) and indicate if they have made any changes"

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
