fredapi
Python client for FRED economic data, including its revision history
๐งฉ Build it Free 02 in Data & feeds ๐ NEW TODAY
1,656 0 copies ยท 7 days Apache-2.0updated 28 Jan '26
Overview
fredapi is a Python client for the Federal Reserve's FRED economic data, including point-in-time ALFRED revision history, returned as pandas Series or DataFrames.
- Fortraders and researchers who need an economic data series as it was known on a given historical date, not just today's revised value.
- Needsa FRED API key from the FRED website, set as an environment variable, a file, or passed directly.
- Runsa thin Python client (pip install fredapi) built on pandas.
- Limitget_series() returns the revised history, so a backtest built on it sees values nobody had on the day โ use get_series_first_release or get_series_as_of_date instead.
Vibe it
Paste this into your AI agent. Write the first line, or take a suggestion; the copy carries your words.
Source: https://github.com/mortada/fredapi โ clone it and read its README and examples before writing anything; its documented setup beats what you remember. Stack: a thin Python client over the FRED web service, returning pandas Series or DataFrame objects. Needs: a FRED API key (apply on the FRED website), set as FRED_API_KEY, a key file, or passed directly to Fred(api_key=...). Start: `pip install fredapi`, then `Fred(api_key='...').get_series('SP500')` before touching the revision-history methods. Limit: get_series() returns the revised history โ for what was actually known on a given day, use get_series_first_release or get_series_as_of_date instead. Done means: you show me a series pulled with get_series_as_of_date for a date I choose, alongside the latest-release value, so I can see the difference. Before you start, ask me: which FRED series I want (e.g. GDP, SP500) and whether I need point-in-time data or just the latest values.