skillfed

wbgapi

wbgapi provides a comprehensive interface to the World Bank's data and metadata APIs

wbgapi v1.0.14 86.0K downloads/30d#13,889 on PyPI175
Permissive license MIT Active released

What it is and what it does

WBGAPI is a Python wrapper around the World Bank's data APIs that lets you query development indicators, economic statistics, and metadata across multiple World Bank databases. It abstracts away API complexity by organizing data into logical sub-packages (series for indicators, economy for countries, time for periods, source for databases, and others) and providing consistent methods like `list()`, `get()`, `info()`, and `Series()` across each. The package queries databases individually by default, which avoids confusion when the same indicator appears in multiple databases or when databases have different dimensions or time coverage.

You can fetch data as dictionaries or pandas DataFrames, filter by keywords, combine multiple series and countries in a single request, and select specific years or most-recent values. The API is designed to feel natural in Python—using generators, ranges, and sets—and includes extensive docstrings with examples. Optional pandas support lets you work with the results as structured tables with multi-indexing.

Use it for:

  • Retrieve population, GDP, or other development indicators for countries over time for economic analysis
  • Build datasets combining multiple indicators across regions for research or visualization
  • Search World Bank metadata to discover available indicators by keyword or topic
  • Automate data collection from World Bank databases for dashboards or reporting pipelines
  • Explore World Bank data interactively in Jupyter notebooks using the `info()` functions

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

WBGAPI provides a Python interface to query World Bank data and metadata APIs, supporting multiple databases, indicators, countries, and time periods with optional pandas integration.

Yes. WBGAPI is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It fills a clear need for programmatic access to World Bank data with a well-designed, pythonic API. Install it if you need to work with World Bank indicators, development data, or metadata in Python.

Install

wbgapi on PyPI

pip

pip install wbgapi

uv

uv add wbgapi

poetry

poetry add wbgapi

Installing wbgapi

Before you install

Low install friction with three lightweight runtime dependencies (requests, PyYAML, tabulate). Active maintenance with recent commits and a stable release history since 2020.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.

Quickstart

pip install wbgapi

import wbgapi as wb

# List available databases
wb.source.info()

# Fetch population data for USA
for row in wb.data.fetch('SP.POP.TOTL', 'USA'):
    print(row)

Verify before relying

  • Whether pandas integration is optional or required for full functionality
  • Performance characteristics when querying large datasets or many indicators simultaneously
  • Rate limiting or throttling behavior from the World Bank API

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.0)
Install friction low — pure-Python wheel
Runtime dependencies 3 — requests, PyYAML, tabulate
Maintenance actively maintained — 168 days since the last release
Last repo commit
First released
Downloads 86,027/month — #13,889 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: wbgapi-1.0.14-py3-none-any.whl

Development Status :: 5 - Production/StableOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

world bank data api pythonaccess world bank indicatorsfetch development indicators programmaticallyworld bank economic dataquery world bank databaseswdi world development indicatorsworld bank metadata search
world-bank-dataeconomic-indicatorsdata-api

More Information Analysis packages