An official website of the United States government
Accessing the Public Data API with Unix Command Line:You can access the Public Data API through your Unix application using the following code. We have provided examples for each API Signature. Single SeriesUse this signature to retrieve data for a single timeseries for the past three years. curl -i -X GET https://api.bls.gov/publicAPI/v2/timeseries/data/CFU0000008000
Multiple SeriesUse this signature to retrieve data for more than one timeseries for the past three years. You can include up to 25 series IDs. curl -i -X POST -H 'Content-Type: application/json' -d '{"seriesid": ["CFU0000008000","LEU0254555900"]}' https://api.bls.gov/publicAPI/v2/timeseries/data/
One or More Series, Specifying YearsUse this signature to retrieve data for one or more time series within a set time frame of up to 10 years. You must include at least one series ID, the start year, and the end year in the body of the request. curl -i -X POST -H 'Content-Type: application/json' -d '{"seriesid":["LEU0254555900", "APU0000701111"], "startyear":"2002", "endyear":"2012"}' https://api.bls.gov/publicAPI/v2/timeseries/data/
Last Modified Date: October 16, 2014 |