Access US macroeconomic statistics from the Bureau of Economic Analysis, including GDP, personal income, consumer spending, and international trade data. Ideal for building economic indicator pipelines, loading national accounts data into warehouses, and time-series analysis in Python.
Engineers use `requests` with a BEA API key to query datasets like NIPA (national income), Regional, and International trade. The `beaapi` Python wrapper simplifies parameter construction. Results are wide-format JSON converted to long-format pandas DataFrames for time-series analysis.
BEA economic data enables AI systems that provide authoritative US macroeconomic context. Expose the API as an MCP tool so LLM agents can retrieve current GDP figures and income statistics, or build a RAG system where an AI economist can answer questions grounded in official national accounts data.
# pip install requests pandas
import requests, pandas as pd
resp = requests.get("https://apps.bea.gov/api/data/", params={
"UserID": "YOUR_API_KEY",
"method": "GetData",
"datasetname": "NIPA",
"TableName": "T10101",
"Frequency": "A",
"Year": "2020,2021,2022,2023",
"ResultFormat": "JSON"
})
data = resp.json()["BEAAPI"]["Results"]["Data"]
df = pd.DataFrame(data)[["LineDescription", "TimePeriod", "DataValue"]]
print(df[df["LineDescription"] == "Gross domestic product"].head())Official dataset source
More datasets used by Python data engineers.
Access labour market statistics from the US Bureau of Labor Statistics including employment, unemployment, wages, inflation (CPI), and productivity data. Widely used in economic data pipelines for trend analysis, time-series modelling, and government data ingestion workflows.
Access real-time company registration data, director information, filing history, and financial statements from the UK Companies House streaming API. Used in data engineering for corporate intelligence pipelines, KYC/AML workflows, entity resolution, and building business analytics systems in Python.
The Swedish government monopoly liquor store API providing product catalogues, store locations, inventory, and pricing data. Useful for practising structured API ingestion, building retail analytics pipelines, and learning how to work with government-published commercial datasets in Python.