skillfed

fredapi

Python API for Federal Reserve Economic Data (FRED) from St. Louis Fed

fredapi v0.5.2 1.3M downloads/30d#4,043 on PyPI1,652
License unclear AGING released

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 fredapi

uv

uv add fredapi

poetry

poetry add fredapi

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Tags

federal reserve economic data APIFRED data python wrappereconomic time series retrievalALFRED data revisionspandas economic dataSt. Louis Fed API clientvintage economic data
economic-datatime-seriesfederal-reserve

More Python Modules packages