Get an economic data series.
This request can return either XML or JSON by setting the file_type parameter to xml or json. Note that the default value of file_type is xml. The API key 'abcdefghijklmnopqrstuvwxyz123456' is for demonstration purposes only. Use a registered API key instead.
https://api.stlouisfed.org/fred/series?series_id=GNPCA&api_key=abcdefghijklmnopqrstuvwxyz123456
<seriess realtime_start="2013-08-14" realtime_end="2013-08-14"> <series id="GNPCA" realtime_start="2013-08-14" realtime_end="2013-08-14" title="Real Gross National Product" observation_start="1929-01-01" observation_end="2012-01-01" frequency="Annual" frequency_short="A" units="Billions of Chained 2009 Dollars" units_short="Bil. of Chn. 2009 $" seasonal_adjustment="Not Seasonally Adjusted" seasonal_adjustment_short="NSA" last_updated="2013-07-31 09:26:16-05" popularity="39" notes="BEA Account Code: A001RX1"/> </seriess>
The series tag's notes attribute is optional.
https://api.stlouisfed.org/fred/series?series_id=GNPCA&api_key=abcdefghijklmnopqrstuvwxyz123456&file_type=json
{ "realtime_start": "2013-08-14", "realtime_end": "2013-08-14", "seriess": [ { "id": "GNPCA", "realtime_start": "2013-08-14", "realtime_end": "2013-08-14", "title": "Real Gross National Product", "observation_start": "1929-01-01", "observation_end": "2012-01-01", "frequency": "Annual", "frequency_short": "A", "units": "Billions of Chained 2009 Dollars", "units_short": "Bil. of Chn. 2009 $", "seasonal_adjustment": "Not Seasonally Adjusted", "seasonal_adjustment_short": "NSA", "last_updated": "2013-07-31 09:26:16-05", "popularity": 39, "notes": "BEA Account Code: A001RX1" } ] }
Read API Keys for more information.
A key or file extension that indicates the type of file to send.
xml = Extensible Markup Language. The HTTP Content-Type is text/xml.
json = JavaScript Object Notation. The HTTP Content-Type is application/json.
The id for a series.
The start of the real-time period. For more information, see Real-Time Periods.
The end of the real-time period. For more information, see Real-Time Periods.