beaapi
BEA API Python package
What it is and what it does
beaapi is a Python wrapper around the U.S. Bureau of Economic Analysis public data API. It simplifies access to BEA's economic datasets—including NIPA tables, GDP by industry, international trade accounts, and regional data—by providing functions to list available datasets, discover parameters and their allowed values, search metadata by keyword, and retrieve data directly into pandas DataFrames.
The package handles the HTTP communication and response parsing, so you work with structured data immediately. It requires only pandas as a runtime dependency and supports current Python versions. You supply an API key (obtained free from BEA) and call functions like `get_data()` to fetch specific tables, `get_parameter_list()` to explore what parameters a dataset accepts, and `search_metadata()` to find tables by keyword. The result is always a DataFrame, making downstream analysis straightforward.
Use it for:
- Retrieve quarterly or annual NIPA tables for macroeconomic analysis and forecasting.
- Query GDP-by-industry data to analyze sectoral economic performance over time.
- Access international trade and investment position data for cross-border economic research.
- Search metadata to discover which BEA tables contain specific economic indicators.
- Build automated data pipelines that fetch updated economic statistics on a schedule.
- Combine BEA data with other sources in a pandas workflow for integrated economic analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
beaapi retrieves and processes economic data from the U.S. Bureau of Economic Analysis API, returning results as pandas DataFrames for analysis and visualization.
Yes. beaapi is actively maintained, has no known vulnerabilities, installs with minimal friction, and is the official Python interface to BEA's economic data. If you need U.S. economic statistics—GDP, trade, industry output, or regional data—this is the right tool. The only prerequisite is obtaining a free API key.
Install
beaapi on PyPI
pip
pip install beaapiuv
uv add beaapipoetry
poetry add beaapiInstalling beaapi
Before you install
Low friction to install; depends only on pandas. The package is actively maintained with recent commits and is in beta status, suitable for production use with the understanding that the API surface may evolve.
License in practice
Licensed under CC0 (public domain), so you may use, modify, and distribute the package freely without attribution requirements or restrictions.
Quickstart
pip install beaapi
import beaapi
beakey = 'YOUR_36_DIGIT_API_KEY'
bea_tbl = beaapi.get_data(beakey, datasetname='NIPA', TableName='T20305', Frequency='Q', Year='2015')
You must register for a free BEA API key at https://apps.bea.gov/api/signup/ before making any data requests.
Verify before relying
- Whether the package handles rate limiting or pagination for large data requests automatically.
- Performance characteristics when querying across multiple datasets or years simultaneously.
- Whether offline metadata caching is fully functional or requires periodic API calls.
Package facts
| License | CC0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pandas |
| Maintenance | actively maintained — 178 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,316/month — #10,885 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: beaapi-0.2.0-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
imfpDownloads economic data from the International…
permissive · top 15,000 on PyPI
wbdataWbdata provides a Python interface to query and…
copyleft · top 5,000 on PyPI
fredapifredapi wraps the FRED web service to fetch…
unclear · top 5,000 on PyPI
openbb-blsIntegrates the U.S. Bureau of Labor Statistics…
agpl · top 15,000 on PyPI
openbb-fredIntegrates FRED (Federal Reserve Economic Data)…
agpl · top 15,000 on PyPI
wbgapiWBGAPI provides a Python interface to query…
permissive · top 15,000 on PyPI
openbb-econdbIntegrates EconDB economic data into the OpenBB…
agpl · top 15,000 on PyPI
openbb-economyProvides access to global macroeconomic data…
agpl · top 15,000 on PyPI
openbb-oecdIntegrates OECD statistical data into the…
agpl · top 15,000 on PyPI
Nasdaq-Data-LinkProvides Python access to Nasdaq Data Link's…
permissive · top 15,000 on PyPI