Not Logged In

fredapi 0.2.1

fredapi is a Python API for the
FRED data provided by the
Federal Reserve Bank of St. Louis. fredapi provides a wrapper in
python to the FRED web
service, and also provides
several conveninent methods for parsing and analyzing point-in-time data
(i.e. historic data revisions) from
ALFRED

fredapi makes use of pandas and returns data to you in a
pandasSeries or DataFrame

Installation

pip install fredapi

Basic Usage

First you need an API key, you can apply for
one for free on the FRED
website. Once you have your API key, you can set it in one of three
ways:

This means the GDP value for Q1 2014 has been released three times.
First release was on 4/30/2014 for a value of 17149.6, and then there
have been two revisions on 5/29/2014 and 6/25/2014 for revised values of
17101.3 and 17016.0, respectively.

Get first data release only (i.e. ignore revisions)

data=fred.get_series_first_release('GDP')

Get latest data

Note that this is the same as simply calling get_series()

data=fred.get_series_latest_release('GDP')

Get latest data known on a given date

fred.get_series_as_of_date('GDP','6/1/2014')

Get all data release dates

This returns a DataFrame with all the data from ALFRED

df=fred.get_series_all_releases('GDP')df.tail()

Get all vintage dates

vintage_dates=fred.get_series_vintage_dates('GDP')

Search for data series

You can always search for data series on the FRED website. But sometimes
it can be more convenient to search programmatically. fredapi
provides a search() method that does a fulltext search and returns a
DataFrame of results.