Access data via the Application Programming Interface

 

Understanding the BLS API

The Bureau of Labor Statistics (BLS) API provides free public access to a wealth of economic data. Here's a breakdown of what you need to know:

Key Features:

Two Versions: The API has two versions:
oVersion 1 (Public): Requires no registration and is suitable for casual use. It has limitations on the number of queries and the amount of data you can retrieve.
oVersion 2 (Registered): Requires a free registration and provides an API key. This version offers higher query limits, more data per request, and additional features like calculations and series catalogs. It is the recommended version for most applications.
Data Available: You can access data from all BLS programs, including:
oConsumer Price Index (CPI): Measures inflation.
oProducer Price Index (PPI): Measures inflation from the perspective of producers.
oEmployment and Unemployment Data: From the Current Population Survey (CPS).
oWages and Compensation Data: From the National Compensation Survey.
oProductivity Data: And much more.
Data Format: The API returns data primarily in JSON format, which is a standard for data interchange on the web. It can also return data in Excel format.
Series IDs: To request specific data, you need to use a "series ID." This is a unique identifier for each time series. You can find these IDs using the data-finding tools on the BLS website.

Getting Started:

1.Register for an API Key (Recommended): Go to the BLS Data API registration page to get a free API key for Version 2.
2.Find Series IDs: Use the tools on the BLS website to find the series IDs for the data you're interested in.
3.Make API Requests: Use your preferred programming language to send HTTP requests to the BLS API endpoints.
4.

The following code example will show you how to make a basic request using Python

ProximityOne -- resources to create and apply insights © ProximityOne