# BLS Labor Statistics - CPI, Jobs, Wages & More (`compute-edge/bls-labor-statistics-scraper`) Actor

Extract Bureau of Labor Statistics time series data. Built-in presets for CPI, unemployment, employment, wages, and PPI. Custom series IDs supported. Monthly economic indicators for financial analysis and research.

- **URL**: https://apify.com/compute-edge/bls-labor-statistics-scraper.md
- **Developed by:** [Compute Edge](https://apify.com/compute-edge) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## BLS Labor Statistics Scraper

Extract economic data directly from the U.S. Bureau of Labor Statistics (BLS) public API. Get Consumer Price Index (CPI), unemployment rates, employment figures, average wages, Producer Price Index (PPI), and hundreds of other economic indicators.

### Features

- **No Authentication Required** — Access BLS public API with 25 free queries per day
- **Multiple Preset Indicators** — Pre-configured for common metrics (CPI, Unemployment, Employment, Wages, PPI)
- **Custom Series IDs** — Use any BLS series ID for specialized economic data
- **Flexible Date Ranges** — Fetch data spanning decades with customizable start and end years
- **Clean JSON Output** — Ready for analysis, charts, and dashboards
- **Footnote Support** — Includes BLS data quality notes and footnotes

### Data Available

#### Built-in Presets

| Preset | Series ID | Description |
|--------|-----------|-------------|
| **CPI-U** | `CUUR0000SA0` | Consumer Price Index for All Urban Consumers (All items, not seasonally adjusted) |
| **Unemployment Rate** | `LNS14000000` | Civilian unemployment rate |
| **Total Employment** | `CES0000000001` | Total nonfarm payroll employment |
| **Average Wages** | `CES0500000003` | Average hourly earnings, private sector |
| **Producer Price Index** | `WPSFD4` | Producer price index for finished goods |

#### Custom Series

The BLS maintains **thousands of series IDs** covering:
- State and local employment data
- Industry-specific metrics
- Occupational wages
- Labor force participation
- Union membership
- Job openings and turnover
- And more...

Browse available series at: https://www.bls.gov/developers/api_faqs.htm

### Input Configuration

#### Required Fields
- **Data Preset** — Choose from CPI-U, Unemployment, Employment, Wages, PPI, or Custom
- **Start Year** — Year to begin data collection (default: 5 years ago)
- **End Year** — Year to end data collection (default: current year)

#### Optional Fields
- **Custom Series IDs** — Only used when preset = "custom". Provide an array of BLS series IDs.

#### Example Inputs

##### CPI Data (2020-2024)
```json
{
  "preset": "cpi",
  "startYear": 2020,
  "endYear": 2024
}
````

##### Unemployment Rate (Custom Range)

```json
{
  "preset": "unemployment",
  "startYear": 2010,
  "endYear": 2024
}
```

##### Multiple Custom Series

```json
{
  "preset": "custom",
  "seriesIds": ["CUUR0000SA0", "LNS14000000", "CES0000000001"],
  "startYear": 2022,
  "endYear": 2024
}
```

### Output Format

Each record contains:

| Field | Type | Description |
|-------|------|-------------|
| **seriesId** | string | BLS series ID (e.g., "CUUR0000SA0") |
| **year** | integer | Calendar year |
| **period** | string | Period code (M01-M12 for monthly, Q01-Q04 for quarterly, A01 for annual) |
| **periodName** | string | Human-readable period name (e.g., "January", "Q1") |
| **value** | number | The data value (index point, rate, employment count, etc.) |
| **footnotes** | string | BLS footnotes or data quality notes (null if none) |

#### Example Output

```json
{
  "seriesId": "CUUR0000SA0",
  "year": 2024,
  "period": "M01",
  "periodName": "January",
  "value": 314.761,
  "footnotes": null
}
```

### API Limitations

- **25 queries per day** (free tier) — each query can include up to 3 series
- **20 years of data** per request maximum
- **No API key required** — open public data
- Rate limiting: respectful spacing between requests

### Use Cases

- **Economic Analysis** — Track inflation, employment trends, and wage growth
- **Investment Research** — Monitor economic indicators for market analysis
- **Academic Research** — Access historical economic time series
- **Business Intelligence** — Feed BLS data into dashboards and forecasting models
- **Data Science** — Build ML models predicting economic trends

### Tutorial: Scraping CPI Data

#### Step 1: Open Actor Configuration

When you run this Actor, you'll see an input form with:

1. Data Preset dropdown (default: "CPI-U")
2. Start Year field
3. End Year field

#### Step 2: Enter Parameters

To get Consumer Price Index data for the last 5 years:

- **Data Preset**: Select "Consumer Price Index (CPI-U)"
- **Start Year**: 2019
- **End Year**: 2024
- Click "Start"

#### Step 3: Monitor Execution

The Actor will:

- Connect to the BLS API
- Request 12 monthly CPI values for each year
- Parse and transform the response
- Push records to the dataset

For 6 years of monthly data (2019-2024), you'll receive ~72 records.

#### Step 4: Download Results

Once complete, download the dataset as JSON, CSV, or Excel. Each row represents a monthly CPI value with the index point, year, and period name.

### Pricing

- **Actor execution cost**: Standard Apify compute charges apply
- **Data cost**: $0.002 per result
- **No API key fees**: BLS API is completely free

For 100 months of CPI data (≈8-9 years), typical cost is ~$0.20 (data) + compute.

### Example Series IDs

Explore the BLS API for additional series. Common ones:

- **CES0000000001** — Total nonfarm employment
- **CUUR0000SA0** — CPI for all urban consumers
- **LNS14000000** — Unemployment rate
- **CES0500000003** — Average hourly earnings
- **WPSFD4** — Producer prices, finished goods
- **LNU02000000** — Labor force (civilian)
- **LEU0252881600** — Union membership (annual)

Full list: https://data.bls.gov/

### Troubleshooting

#### "No data returned"

- Verify the series ID is valid at https://www.bls.gov/data/
- Check that your year range is within available data for that series
- Some series may only have monthly data, others annual — BLS handles this automatically

#### "API rate limit exceeded"

- You've exceeded 25 requests today
- Wait 24 hours or check your BLS API quota
- Consider grouping multiple series into one request (up to 3 per query)

#### "Invalid series ID"

- Double-check spelling and capitalization
- Visit https://www.bls.gov/developers/api\_faqs.htm to verify series ID format

### Legal Notice

This Actor extracts data from the freely available BLS Public Data API (https://www.bls.gov/developers/). All data is public domain and no authentication bypass is used. By using this Actor, you agree to:

- Respect the 25 queries/day free limit
- Use data in accordance with BLS terms of service
- Include proper attribution to the U.S. Bureau of Labor Statistics

**Data Source**: U.S. Bureau of Labor Statistics, U.S. Department of Labor

### Support

For questions about:

- **This Actor**: Report issues or contact via Apify
- **BLS Data**: Visit https://www.bls.gov/help/
- **BLS API**: See https://www.bls.gov/developers/

### Related Actors

- **Economic Data Dashboard Updater** — Automatically refresh BLS data on schedule
- **FRA Railroad Accidents Scraper** — Extract transportation safety data
- **Federal Statistical Data Aggregator** — Combine multiple government data sources

***

**Version**: 0.1
**Last Updated**: 2026-04-07
**Author**: Apify Marketplace

# Actor input Schema

## `preset` (type: `string`):

Choose a common economic indicator preset or use custom series IDs.

## `seriesIds` (type: `array`):

List of BLS series IDs to fetch (e.g., 'CUUR0000SA0', 'LNS14000000'). Only used when preset is 'custom'. Find series IDs at https://www.bls.gov/developers/api\_faqs.htm

## `startYear` (type: `integer`):

Start year for data collection (e.g., 2020). Defaults to 5 years ago if not specified.

## `endYear` (type: `integer`):

End year for data collection (e.g., 2024). Defaults to current year if not specified.

## Actor input object example

```json
{
  "preset": "cpi",
  "seriesIds": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("compute-edge/bls-labor-statistics-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("compute-edge/bls-labor-statistics-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call compute-edge/bls-labor-statistics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=compute-edge/bls-labor-statistics-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "BLS Labor Statistics - CPI, Jobs, Wages & More",
        "description": "Extract Bureau of Labor Statistics time series data. Built-in presets for CPI, unemployment, employment, wages, and PPI. Custom series IDs supported. Monthly economic indicators for financial analysis and research.",
        "version": "0.1",
        "x-build-id": "XDsAi4rUPlFXpWzpv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/compute-edge~bls-labor-statistics-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-compute-edge-bls-labor-statistics-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/compute-edge~bls-labor-statistics-scraper/runs": {
            "post": {
                "operationId": "runs-sync-compute-edge-bls-labor-statistics-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/compute-edge~bls-labor-statistics-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-compute-edge-bls-labor-statistics-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "preset": {
                        "title": "Data Preset",
                        "enum": [
                            "cpi",
                            "unemployment",
                            "employment",
                            "wages",
                            "ppi",
                            "custom"
                        ],
                        "type": "string",
                        "description": "Choose a common economic indicator preset or use custom series IDs.",
                        "default": "cpi"
                    },
                    "seriesIds": {
                        "title": "Custom Series IDs",
                        "type": "array",
                        "description": "List of BLS series IDs to fetch (e.g., 'CUUR0000SA0', 'LNS14000000'). Only used when preset is 'custom'. Find series IDs at https://www.bls.gov/developers/api_faqs.htm",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "startYear": {
                        "title": "Start Year",
                        "minimum": 1913,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Start year for data collection (e.g., 2020). Defaults to 5 years ago if not specified."
                    },
                    "endYear": {
                        "title": "End Year",
                        "minimum": 1913,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "End year for data collection (e.g., 2024). Defaults to current year if not specified."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
