An official website of the United States government
BLS Public Data API Signatures (Version 1.0)The BLS Public Data API utilizes the following three signatures:All signatures must include an HTTP type, a RESTful URL, and at least one series ID. The series ID(s) can include underscore (_), dash (-) and hash (#) but must not include lower case letters or special characters. All requests specifying years must include a four-digit start year and an end year in numeric format – YYYY (e.g. 2013, not 13). The following are sample responses for each of API signature with added white spaces for easier readability. Single SeriesUse this signature to retrieve data for a single time series for the past three years. Be sure to include the specific series ID at the end of the URL.
Sample Response: { "status": "REQUEST_SUCCEEDED", "responseTime": 16, "message": [ ], "Results": [ { "series": [ { "seriesID": "LAUCN040010000000005", "data": [ { "year": "2013", "period": "M11", "periodName": "November", "value": "16393", "footnotes": [ { "code": "P", "text": "Preliminary." } ] }, { "year": "2013", "period": "M10", "periodName": "October", "value": "16536", "footnotes": [ { ... } ] } ] } ] } ] }
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, each separated with a comma, in the body of your request.
Sample Response: { "status": "REQUEST_SUCCEEDED", "responseTime": 37, "message": [ ], "Results": [ { "series": [ { "seriesID": "LAUCN040010000000005", "data": [ { "year": "2013", "period": "M11", "periodName": "November", "value": "16393", "footnotes": [ { "code": "P", "text": "Preliminary." } ], . . . { "seriesID": "LAUCN040010000000006", "data": [ { "year": "2013", "period": "M11", "periodName": "November", "value": "20155", "footnotes": [ { "code": "P", "text": "Preliminary." } ], . . . }
One or More Series, Specifying YearsUse this signature to retrieve data for one or more timeseries 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. If you include multiple series IDs, be sure to separate each with a comma.
Sample Response: { "status": "REQUEST_SUCCEEDED", "responseTime": 706, "message": [ ], "Results": [ { "series": [ { "seriesID": "LAUCN040010000000005", "data": [ { "year": "2012", "period": "M13", "periodName": "Annual", "value": "17656", "footnotes": [ { } ], . . . } To help you get started, sample code for some of the most popular programming languages has been written:
Last Modified Date: October 16, 2014 |