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 Series

Use this signature to retrieve data for a single timeseries for the past three years.

curl -i -X GET http://api.bls.gov/publicAPI/v1/timeseries/data/CFU0000008000

 

Multiple Series

Use 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"]}'
     http://api.bls.gov/publicAPI/v1/timeseries/data/

 

One or More Series, Specifying Years

Use 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"}' 
        http://api.bls.gov/publicAPI/v1/timeseries/data/

 

Last Modified Date: August 19, 2013