Microproduct data guideintermediate

BLS Public Data API

Official U.S. labor-market and price time series for building inflation, employment, wage, and economic-release monitoring tools.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Small · ≤0.1 GB
Formats
JSON, XLSX
Access
API
API key
Not required
Provider
U.S. Bureau of Labor Statistics
Updates
Monthly
Data terms
BLS Public Data API Terms of Service

From source to product signal

Test a product idea in four steps

The BLS Public Data API provides published time series from BLS programs. Start with one documented series ID and a two-year response. Interpretation depends on the series units, seasonal-adjustment status, release cadence, and revisions, so record both the identifier and retrieval date.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • A documented BLS series ID
2

Access the data

  1. 1.Use the BLS data tools and series documentation to confirm the identifier, units, and seasonal-adjustment status.
  2. 2.Request a bounded two-year period through the keyless API signature.
  3. 3.Save the retrieval timestamp and retain footnotes before calculating changes.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://api.bls.gov/publicAPI/v2/timeseries/data/CUUR0000SA0",
    params={"startyear": "2024", "endyear": "2025"},
    timeout=30,
)
response.raise_for_status()
payload = response.json()
if payload["status"] != "REQUEST_SUCCEEDED":
    raise RuntimeError(payload["message"])
cpi = pd.DataFrame(payload["Results"]["series"][0]["data"])
cpi = cpi[cpi["period"].str.match(r"M\d{2}")].copy()
cpi["value"] = pd.to_numeric(cpi["value"], errors="coerce")
cpi["date"] = pd.to_datetime(cpi["year"] + "-" + cpi["period"].str[1:] + "-01")
cpi = cpi.sort_values("date")
cpi["change_12m_pct"] = cpi["value"].pct_change(12) * 100
cpi["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(cpi[["date", "value", "change_12m_pct", "retrieved_at_utc"]].tail(12))
4

Test a useful signal

Calculate a 12-month CPI change

Calculate the 12-month percentage change in the not-seasonally-adjusted U.S. city average CPI-U series.

  1. 01Confirm that CUUR0000SA0 is the intended CPI-U series and record its units and not-seasonally-adjusted status.
  2. 02Sort monthly observations, handle unavailable values and footnotes, and calculate changes against the same month one year earlier.
  3. 03Report the retrieval date and explain how release timing, revisions, seasonal adjustment, and index units limit comparisons.

Dataset details

U.S. Bureau of Labor Statistics is a government source. Last verified 2026-08-11. Temporal coverage: series-dependent historical records through current releases.

Domains

Labor EconomicsInflationEmployment

Data types

Time SeriesEconomic Indicators

Tasks

Change AnalysisEconomic MonitoringTrend Analysis

Geography

United States

Formats

JSONXLSX

Provider

U.S. Bureau of Labor Statistics

Data terms

BLS Public Data API Terms of Service