Department of Labor Logo United States Department of Labor
Dot gov

The .gov means it's official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you're on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

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

 

Last Modified Date: October 16, 2014