Fred Data

Overview

Teh St. Louis Federal reserve makes its data available through a simple web call which can be implemented simply in Python. However, in order to connect to the service, you must register for an API key at the fred site.

The following code examples demonstrate connecting to the Fred site by appending your api key to the url that you access. The davinci authentication mechanism and Fred app can simplify access. (see davinci access to fred)

Retrieving Observations

id = 'FDHBFRBN' key = 'my-assigned-key' url = 'https://api.stlouisfed.org/fred/series/observations?file_type=json&series_id='+id+'&api_key='+key;

Retrieving Categories

id = '0' key = 'my-assigned-key' url = 'https://api.stlouisfed.org/fred/category/children?category_id=0&file_type=json&api_key='+key;