wbdata
A library to access World Bank data
What it is and what it does
Wbdata is a Python wrapper around the World Bank's public data APIs, designed to simplify querying economic and development indicators without direct HTTP calls. It abstracts the World Bank's REST endpoints and returns results in multiple formats—raw dictionaries for full metadata, or pandas DataFrames and series for analysis-ready data. The package includes convenience functions for searching indicators and countries, plus caching and retry logic via its dependencies (backoff, cachetools, shelved-cache).
Typical use is exploratory data retrieval: fetch GDP, inflation, population, or other World Bank indicators for one or more countries and time periods, then work with the result in pandas or export it. The package targets researchers, economists, and data analysts who need World Bank data without building API clients from scratch. It has been in active development since 2012 and is marked production-stable.
Use it for:
- Retrieve World Bank economic indicators (GDP, inflation, employment) for a country or region into a pandas DataFrame for analysis.
- Search World Bank indicator metadata to find the correct indicator codes before querying data.
- Fetch time-series development data for multiple countries to compare trends or build datasets for econometric modeling.
- Automate periodic data pulls from World Bank APIs for dashboards or reports without writing HTTP logic.
- Export World Bank indicators to CSV or other formats via pandas after retrieval.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wbdata provides a Python interface to query and retrieve data from the World Bank's public databases, returning results as dictionaries, pandas DataFrames, or series.
Yes, if you need World Bank data in Python. Install friction is low, maintenance is active, and the package is stable. The GPL-2.0+ copyleft license is the main constraint—acceptable for open-source or research work, but review if your project is proprietary or uses a different license. No known vulnerabilities.
Install
wbdata on PyPI
pip
pip install wbdatauv
uv add wbdatapoetry
poetry add wbdataInstalling wbdata
Before you install
Low friction install with eight common dependencies (requests, pandas-adjacent tools, caching utilities). Actively maintained as of July 2026 with stable production status.
License in practice
GPL-2.0+ copyleft license requires derivative works and distributions to be licensed under GPL-2.0 or later; review if integrating into proprietary or differently-licensed projects.
Quickstart
pip install wbdata
import wbdata
data = wbdata.get_dataframe({"NY.GDP.MKTP.CD": None}, convert_date=False)
Requires Python 3.10 or later; World Bank API endpoint availability.
Verify before relying
- Whether the package handles World Bank API rate limits or authentication transparently.
- Current coverage of World Bank API endpoints relative to the full API surface.
- Performance characteristics when retrieving large datasets or many indicators.
Package facts
| License | GPL-2.0+ (copyleft) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — appdirs, backoff, cachetools, dateparser, decorator, requests, shelved-cache, tabulate |
| Maintenance | actively maintained — 313 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,801,995/month — #2,225 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wbdata-1.1.0-py3-none-any.whl
Keywords: World Bank, data, economics
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
wbgapiWBGAPI provides a Python interface to query…
permissive · top 15,000 on PyPI
beaapibeaapi retrieves and processes economic data…
permissive · top 15,000 on PyPI
lexisnexisapiProvides a Python interface to the LexisNexis…
permissive · top 15,000 on PyPI
pandas-datareaderFetches macroeconomic and factor data from…
permissive · top 5,000 on PyPI
fredapifredapi wraps the FRED web service to fetch…
unclear · top 5,000 on PyPI
python-bcbStructured Python interface to fetch Brazilian…
unclear · top 15,000 on PyPI
pandas_accessReads MS Access database files (.mdb) into…
permissive · top 15,000 on PyPI
imfpDownloads economic data from the International…
permissive · top 15,000 on PyPI
QuandlQuandl provides a Python client for accessing…
permissive · top 15,000 on PyPI
eurostatFetches statistical data and metadata from…
permissive · top 15,000 on PyPI