TL;DR
The Bureau of Labor Statistics (BLS) API provides official US government data on employment, unemployment, consumer prices (CPI), producer prices (PPI), wages, productivity, and occupational injuries. The API supports both public (no key, daily limit of 25 requests) and registration-based (free key, 500 daily requests, up to 50 series per request) access. Data series are identified by unique series IDs, and responses include annual, monthly, or quarterly data points with optional year-over-year calculations. Series can be queried individually or in bulk.
Quick start: https://api.bls.gov/publicAPI/v2/timeseries/data/LNS14000000
No API key needed — just make a request!
How to Use This API
1. Get US Unemployment Rate (Series LNS14000000)
https://api.bls.gov/publicAPI/v2/timeseries/data/LNS14000000
Returns monthly unemployment data with latest year first.
2. Get CPI Data with Year Range
https://api.bls.gov/publicAPI/v2/timeseries/data/CUUR0000SA0?startyear=2023&endyear=2025
CUUR0000SA0 is CPI for All Urban Consumers (All Items). Use calculations=true for year-over-year percent changes.
3. Get Average Hourly Earnings
https://api.bls.gov/publicAPI/v2/timeseries/data/CES0500000003?startyear=2024&endyear=2026
CES0500000003 = average hourly earnings of all employees, total private.
4. POST Request — Query Multiple Series
POST https://api.bls.gov/publicAPI/v2/timeseries/data/
Content-Type: application/json
{
"seriesid": ["LNS14000000", "CUUR0000SA0", "CES0000000001"],
"startyear": "2024",
"endyear": "2026",
"calculations": true
}
POST requests can query up to 50 series at once. The response includes all series data in a single JSON payload.
5. Response Format
{
"status": "REQUEST_SUCCEEDED",
"responseTime": 42,
"message": [],
"Results": {
"series": [
{
"seriesID": "LNS14000000",
"data": [
{
"year": "2026",
"period": "M04",
"periodName": "April",
"value": "3.9",
"footnotes": [{}]
}
]
}
]
}
}
6. JavaScript — Fetch Latest Unemployment
fetch('https://api.bls.gov/publicAPI/v2/timeseries/data/LNS14000000')
.then(r => r.json())
.then(d => {
const latest = d.Results.series[0].data[0];
console.log(`US Unemployment: ${latest.value}% (${latest.periodName} ${latest.year})`);
});
7. Python — Query Multiple Series
import requests
payload = {
"seriesid": ["LNS14000000", "CUUR0000SA0"],
"startyear": "2025",
"endyear": "2026",
"calculations": True
}
resp = requests.post(
'https://api.bls.gov/publicAPI/v2/timeseries/data/',
json=payload
)
data = resp.json()
for series in data['Results']['series']:
print(f"\nSeries: {series['seriesID']}")
for point in series['data'][:3]:
print(f" {point['periodName']} {point['year']}: {point['value']}")
https://api.bls.gov/publicAPI/v2/timeseries/data/LNS14000000
Frequently Asked Questions
- What are the most common BLS series IDs?
- LNS14000000 (unemployment rate), CUUR0000SA0 (CPI all items), CES0000000001 (total nonfarm employment), APU0000708111 (gasoline prices), CES0500000003 (average hourly earnings), and PRS84006173 (productivity).
- What is the difference between public and registered API?
- Public API: max 25 requests per day, no key needed. Registered: up to 500 requests per day, with 50 series per request. Registration is free at data.bls.gov/registration/.
- How do I query multiple series at once?
- Use POST to
/publicAPI/v2/timeseries/data/with a JSON body containing aseriesidarray (max 50 series per request). POST requests also supportcalculations=truefor year-over-year changes andannualaverage=truefor yearly averages. - What time periods are available?
- Most series go back to 1948 or earlier. Use
startyearandendyearparameters to set the range. Some series have monthly, quarterly, or annual frequency indicated in the response. - How do I get year-over-year calculations?
- Add
&calculations=trueto your request URL or include it in the POST JSON body. The response will includecalculationsfields with percent change from the same period in the prior year. - Can I get state-level unemployment data?
- Yes, state-level series use different IDs. For example, LASST060000000000003 is California's unemployment rate. Browse the BLS website for state-specific series IDs.
What You Can Build
- Economic dashboard showing CPI, unemployment, and wages side by side
- Inflation tracker with month-over-month and year-over-year CPI comparisons
- Job market analysis tool comparing employment across industries and states
- Financial planning calculator that adjusts for CPI inflation automatically
- Data journalism tool pulling latest BLS numbers for news articles and reports
- Personal finance app showing how wages track against CPI in your state