The Federal Reserve Bank of St. Louis FRED database provides over 800,000 economic time series from 100+ sources, including interest rates, inflation, GDP, and employment data. Widely used in financial and economic data pipelines via the fredapi Python library for loading macro data into analytical systems.
The `fredapi` Python library authenticates with a free FRED API key and provides `Fred.get_series()` for named time-series retrieval. Engineers chain multiple series into pandas DataFrames indexed by date, then use `pd.merge()` to align different data frequencies for multi-variable analysis.
FRED is the gold standard data source for AI economic analysis tools. RAG pipelines built on FRED time-series enable LLM agents to answer 'What was the Federal Funds Rate during the 2008 financial crisis?' with precise historical data. Expose the FRED API as an MCP tool for AI economic research assistants.
# pip install fredapi pandas
from fredapi import Fred
import pandas as pd
fred = Fred(api_key="YOUR_API_KEY")
unemployment = fred.get_series("UNRATE", observation_start="2020-01-01")
cpi = fred.get_series("CPIAUCSL", observation_start="2020-01-01")
df = pd.DataFrame({"unemployment": unemployment, "cpi": cpi})
print(df.tail(12))Official dataset source
More datasets used by Python data engineers.
The FEC provides access to campaign finance data, including information on political contributions, campaign expenditures, fundraising activities and financial disclosures filed by political candidates, parties and committees in the United States.
Access demographic, economic, social, and geographic datasets from the US Census Bureau including the American Community Survey, decennial census, and economic census. Used in data engineering for population analysis pipelines, market research, geospatial enrichment, and building socioeconomic dashboards in Python.
The BEA provides economic data and statistics for the United States, including measures of GDP, national income, consumer spending and trade balances.