--- id: beaapi version: "0.2.0" license: CC0 license_treatment: permissive maintenance: active --- # beaapi — BEA API Python package License: permissive · Maintenance: active · Downloads: 153.3K/mo ## 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 above — 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 pip install beaapi uv add beaapi poetry add beaapi ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 153.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags BEA economic data API, US economic statistics retrieval, NIPA table data access, GDP and national income data, international trade statistics, regional economic data, economic dataset queries, economic-data, government-api, data-retrieval [View on SkillFed](https://skillfed.io/packages/beaapi) · [View on PyPI](https://pypi.org/project/beaapi/)