Check the Setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- A free BEA API key saved in the BEA_API_KEY environment variable
Official state and local GDP, income, and employment statistics for building regional growth, market-sizing, and economic comparison tools.
Report a ProblemFrom Source to Product Signal
The BEA Regional API provides state, county, and metro GDP, personal income, and employment tables. Start with one documented line code and a few states. Tables mix units and frequencies, estimates are revised, and nominal growth must not be presented as real growth.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import os
import pandas as pd
import requests
response = requests.get(
"https://apps.bea.gov/api/data",
params={
"UserID": os.environ["BEA_API_KEY"],
"method": "GetData",
"datasetname": "Regional",
"TableName": "SQINC1",
"LineCode": "1",
"GeoFIPS": "06000,48000,36000",
"Year": "LAST5",
"ResultFormat": "JSON",
},
timeout=30,
)
response.raise_for_status()
rows = response.json()["BEAAPI"]["Results"]["Data"]
income = pd.DataFrame(rows)
print(income[["GeoName", "TimePeriod", "DataValue", "Unit"]].head(20))Test a Useful Signal
Compare the selected BEA personal-income line across California, Texas, and New York.
U.S. Bureau of Economic Analysis is a government source. Last verified 2026-08-18. Temporal coverage: varies by Regional table, including series from 1998-present.