Exploring the Data You Can Access with the FRED API — And What You Can Do With It. (keyword search)
The FRED API offers a massive collection of U.S. economic data provided by the Federal Reserve Bank of St. Louis. It includes thousands of time series covering various sectors(keyword search) of the economy. These are organized into categories such as employment, inflation, GDP, interest rates, money supply, housing, banking, international trade, and financial markets.
Here are some of the most commonly used data types:
- International data: Exchange rates, trade balances, foreign direct investment.
- Macroeconomic indicators: GDP, Gross National Product (GNP), and industrial production.
- Labor market data: Unemployment rate, job openings, labor force participation.
- Inflation and prices: Consumer Price Index (CPI), Producer Price Index (PPI), Personal Consumption Expenditures (PCE).
- Financial and banking: Federal Funds Rate, M2 money supply, Treasury yields.
Keyword search Code
import requests
import urllib3
urllib3.disable_warnings()
# FRED API URL
API_KEY = "{Your API Key}"
SEARCH_KEYWORD = 'Average+Hourly+Earnings' # Example: Average Hourly Earnings
URL = f"https://api.stlouisfed.org/fred/series/search?search_text={SEARCH_KEYWORD}&api_key={API_KEY}&file_type=json" \
f"&search_type=full_text"
response = requests.get(URL)
if response.status_code == 200:
data = response.json()
series = data.get("seriess", [])
for s in series:
print(f"ID: {s['id']} - Title: {s['title']}")
else:
print("Failed to fetch series IDs.")
Output
ID: CES0500000003 - Title: Average Hourly Earnings of All Employees, Total Private
ID: CEU0500000003 - Title: Average Hourly Earnings of All Employees, Total Private
ID: AHETPI - Title: Average Hourly Earnings of Production and Nonsupervisory Employees, Total Private
...
ID: MWACL53011 - Title: Estimated Mean Real Household Wages Adjusted by Cost of Living for Clark County, WA
ID: SMU06409000500000003 - Title: Average Hourly Earnings of All Employees: Total Private in Sacramento--Roseville--Arden-Arcade, CA (MSA)
ID: A0851AUSA052NNBR - Title: Average Hourly Money Earnings in Book and Job Printing for United States
Using the FRED API, you can do much more than just download spreadsheets. Developers and analysts can:
- Automate data collection for up-to-date dashboards or reports.
- Compare historical trends across multiple indicators.
- Build custom tools that alert you to economic shifts.
- Integrate data into research, apps, or financial models.
- Track policy impact by analyzing interest rate changes, inflation trends, or labor market movements.
In short, the FRED API turns raw economic data into actionable insights. Whether you’re a student, economist, developer, or investor, it’s a powerful tool for understanding how the economy works—and where it might be heading.