fredapi
Python API for Federal Reserve Economic Data (FRED) from St. Louis Fed
What it is and what it does
fredapi is a Python wrapper around the Federal Reserve Economic Data (FRED) web service provided by the St. Louis Fed. It lets you fetch economic time series data—like GDP, unemployment rates, or stock indices—directly into pandas DataFrames or Series for analysis. The package also handles a key feature of economic data: revisions. Economic statistics are often released, then revised as more complete information becomes available, and fredapi provides methods to retrieve first releases, latest values, or data as it was known on a specific date.
You'll need a free API key from the FRED website to use it. Once set up, you can search for series by name, fetch data by series ID, and work with vintage dates to answer questions like 'what did we know about GDP on this date in the past?' The package depends only on pandas, so installation is lightweight.
Use it for:
- Fetch historical economic indicators like GDP, unemployment, or inflation for time-series analysis and forecasting.
- Retrieve first-release vs. revised data to study how economic estimates change over time and impact trading or policy decisions.
- Search the FRED catalog programmatically to find relevant economic series without leaving your Python notebook.
- Build a data pipeline that pulls the latest economic data on a schedule and stores it for dashboard or reporting systems.
- Analyze point-in-time data to understand what information was available at specific dates in the past.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
fredapi wraps the FRED web service to fetch U.S. Federal Reserve economic data and return it as pandas Series or DataFrames, with built-in support for handling data revisions and vintage dates.
Yes, if you need to work with U.S. Federal Reserve economic data. The package is stable, has low install friction, and integrates cleanly with pandas. The main caveats: the license is unclear (verify before commercial use), the package is aging with no release in 831 days (though the repo is still active), and you must obtain a free FRED API key. For economic research, data journalism, or financial analysis, it's a solid choice.
Install
fredapi on PyPI
pip
pip install fredapiuv
uv add fredapipoetry
poetry add fredapiInstalling fredapi
Before you install
Installation is straightforward with low friction. The package is aging (last release 831 days ago) but the repository remains active with a recent commit on 2026-01-28 and 1652 stars, suggesting ongoing maintenance despite infrequent releases.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is provided in the metadata. You should verify the actual license terms before using this in a commercial or restricted context.
Quickstart
pip install fredapi
from fredapi import Fred
fred = Fred(api_key='your_api_key')
data = fred.get_series('SP500')
You must obtain a free API key from the FRED website (api.stlouisfed.org/api_key.html) before making requests.
Verify before relying
- Whether the package supports modern Python versions beyond 3.6 (classifiers list only up to 3.6)
- Current status of FRED API compatibility and any breaking changes since the last release
- Whether the package is actively maintained or in maintenance-only mode given the 831-day gap since last release
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pandas |
| Maintenance | aging — 831 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,331,765/month — #4,043 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fredapi-0.5.2-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
openbb-fredIntegrates FRED (Federal Reserve Economic Data)…
agpl · top 15,000 on PyPI
pandas-datareaderFetches macroeconomic and factor data from…
permissive · top 5,000 on PyPI
beaapibeaapi retrieves and processes economic data…
permissive · top 15,000 on PyPI
openbb-federal-reserveIntegrates Federal Reserve data sources into…
agpl · top 15,000 on PyPI
wbgapiWBGAPI provides a Python interface to query…
permissive · top 15,000 on PyPI
wbdataWbdata provides a Python interface to query and…
copyleft · top 5,000 on PyPI
QuandlQuandl provides a Python client for accessing…
permissive · top 15,000 on PyPI
Nasdaq-Data-LinkProvides Python access to Nasdaq Data Link's…
permissive · top 15,000 on PyPI
pybaseballScrapes baseball data from Baseball Reference,…
permissive · top 15,000 on PyPI
eurostatFetches statistical data and metadata from…
permissive · top 15,000 on PyPI