Skip to content
Python wrapper for the St. Louis Fed's FRED API.
Branch: master
Clone or download
Latest commit 8fb8975 Jul 10, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
fred Use HTTPS and close #5 Jul 9, 2015
.travis.yml Add Travis YAML file Jan 4, 2013 Begin refactoring the API wrapper Apr 16, 2012 Add Travis build image Jan 4, 2013
requirements.txt Start using FRED's JSON API endpoint Aug 20, 2013 Update the version Jul 10, 2015 Use HTTPS and close #5 Jul 9, 2015


Build Status

Python wrapper of the St. Louis Federal Reserve Bank's FRED API web service for retrieving economic data.

FRED API Documentation:

Sign up for a FRED API key:


You can save your API key, and have it automatically accessible, on the command line:

$ export FRED_API_KEY=my_api_key


This wrapper hopes to make working with the Fred API as easy as possible.

>>> import fred

# Save your FRED API key.
>>> fred.key('my_fred_api_key')

# Interact with economic data categories.
>>> fred.category()

>>> fred.categories(24)

>>> fred.children(24)

>>> fred.related(32073)

>>> fred.category(series=True)

>>> fred.category_series(123)

# Interact with economic data releases.
>>> fred.releases()

>>> fred.release(250)

>>> fred.dates()

# Interact with economic data series.
>>> fred.series('GNPCA')

>>> fred.series('GNPCA', release=True)

>>> fred.observations('AAA')

>>>'search term')

>>> fred.updates()

>>> fred.vintage('AAA')

# Query economic data sources.
>>> fred.sources()

>>> fred.source(23)

NOTE: Normally, data is returned in dictionary format instead of XML. If you're looking for XML output, however, just pass in the xml=True keyword argument.

>>> import fred

>>> fred.releases(xml=True)
You can’t perform that action at this time.