# US Labor Market Intelligence - BLS + DOL + World Bank (`ntriqpro/us-labor-market-intelligence`) Actor

Aggregate BLS employment/wage/CPI data, DOL Wage & Hour violations, CDC worker health, World Bank labor indicators, and GDELT news. Returns labor health score 0-100. US public domain + CC-BY 4.0.

- **URL**: https://apify.com/ntriqpro/us-labor-market-intelligence.md
- **Developed by:** [daehwan kim](https://apify.com/ntriqpro) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$150.00 / 1,000 us labor market queries

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

## US Labor Market Intelligence Actor

Comprehensive US labor market data aggregation from 5 authoritative public sources: Bureau of Labor Statistics (BLS), Department of Labor (DOL), CDC NIOSH, World Bank, and GDELT.

### Features

- **BLS Data**: Total nonfarm employment, average hourly earnings, unemployment rate, CPI-U
- **DOL Wage & Hour**: Labor violations and enforcement actions (US-wide)
- **CDC NIOSH**: Worker health and occupational safety indicators
- **World Bank**: 5 employment indicators (unemployment, employment ratio, female participation, etc.)
- **GDELT News**: 30-day labor/employment news sentiment analysis
- **Labor Health Score**: Composite 0-100 metric (30% unemployment, 25% wage, 20% participation, 15% violations, 10% sentiment)

### Input Schema

```json
{
  "state": "CA",              // Two-letter state code (optional, default: US)
  "year": 2024,               // Analysis year 2020-2024 (default: 2024)
  "industryCode": ""          // 6-digit NAICS code (optional, for future use)
}
````

### Output Schema

```json
{
  "query": {
    "state": "CA",
    "year": 2024,
    "timestamp": "2024-04-08T10:30:00Z"
  },
  "bls": {
    "totalEmployment": 158234000,
    "avgHourlyEarnings": 35.21,
    "unemploymentRate": 4.1,
    "cpi": 313.5
  },
  "dol": {
    "violationCount": 12,
    "totalBackWagesUsd": 245000
  },
  "cdc": {
    "recordCount": 1240
  },
  "worldBank": {
    "Unemployment rate": 4.1,
    "Employment to population ratio": 60.4,
    "Female labor force participation": 56.7
  },
  "gdelt": {
    "newsCount30d": 1240,
    "avgTone": -1.2
  },
  "laborHealthScore": 72,
  "sources": [
    {
      "name": "US Bureau of Labor Statistics (BLS)",
      "url": "https://www.bls.gov/",
      "license": "Public Domain (17 U.S.C. § 105)"
    },
    {
      "name": "The World Bank",
      "url": "https://data.worldbank.org/",
      "license": "CC-BY 4.0"
    },
    {
      "name": "The GDELT Project",
      "url": "https://www.gdeltproject.org/",
      "license": "CC-BY 4.0"
    }
  ],
  "disclaimer": "..."
}
```

### Data Sources

#### 1. Bureau of Labor Statistics (BLS)

- **Public Domain** (17 U.S.C. § 105)
- Endpoint: `https://api.bls.gov/publicAPI/v2/timeseries/data/`
- Key Series:
  - `CES0000000001` - Total Nonfarm Employment
  - `CES0500000003` - Average Hourly Earnings
  - `LNS14000000` - Unemployment Rate
  - `CUUR0000SA0` - Consumer Price Index (CPI-U)
- Rate Limit: 25 requests/day without API key
- Timeout: 15 seconds

#### 2. Department of Labor (DOL)

- **Public Domain**
- Wage and Hour Division enforcement data
- Gracefully skips if unavailable (fallback to World Bank)
- Timeout: 10 seconds

#### 3. CDC NIOSH

- **Public Domain**
- Occupational injury and illness data
- Socrata API endpoint with 1000 requests/hour limit
- Gracefully skips if unavailable
- Timeout: 10 seconds

#### 4. World Bank

- **Creative Commons Attribution 4.0 (CC-BY 4.0)**
- Endpoint: `https://api.worldbank.org/v2/country/US/indicator/{code}`
- Indicators:
  - `SL_UEM_TOTL_ZS` - Unemployment rate (% of labor force)
  - `SL_EMP_TOTL_SP_ZS` - Employment to population ratio
  - `SL_GDP_PCAP_EM_KD` - GDP per employed person
  - `SL_TLF_0714_ZS` - Child labor (% of children ages 7-14)
  - `SL_TLF_CACT_FE_ZS` - Female labor force participation rate
- No authentication required
- 5 parallel requests, timeout: 15 seconds

#### 5. GDELT Project

- **Creative Commons Attribution 4.0 (CC-BY 4.0)**
- Endpoint: `https://api.gdeltproject.org/api/v2/doc/doc`
- Queries labor/employment/unemployment news articles (last 30 days)
- Returns sentiment tone (-10 to +10) for each article
- No authentication required
- Timeout: 10 seconds

### Labor Health Score Calculation

Composite metric combining 5 weighted indicators:

```
Score = 50 (baseline) +
  (Unemployment Score - 50) × 0.30 +     // 30% weight (lower unemployment = higher score)
  (Wage Score - 50) × 0.25 +             // 25% weight (higher wages = higher score)
  (Employment Ratio Score - 50) × 0.20 + // 20% weight (higher employment = higher score)
  (Female Participation Score - 50) × 0.10 + // 10% weight
  (News Tone Score - 50) × 0.15          // 15% weight (positive sentiment = higher score)
```

Range: 0-100 (50 = neutral baseline)

### Error Handling

- **Individual API failure**: Graceful degradation (continue with remaining sources)
- **All APIs fail**: Returns error notes in output with available data
- **Timeout**: 10-15 second timeouts per API to prevent hanging
- **No PPE charge on error** (only on successful query execution)

### Pricing (PPE)

- **$0.15 USD** per query execution
- Charged only on successful completion (`await Actor.charge({eventName: 'labor_query'})`)
- Apify takes 20%, developer receives 80%

### Disclaimer

⚠️ **NOT employment, investment, or hiring advice.**

This Actor:

- Provides historical data aggregation only
- Does NOT recommend hiring, layoffs, or employment decisions
- Does NOT forecast labor trends or wage changes
- Does NOT constitute legal, HR, or financial advice
- Data must be verified with original sources
- Historical data does not predict future conditions

For employment law questions, consult qualified legal counsel.

### Legal Attribution

Data is redistributed under original license terms:

- "Data source: US Bureau of Labor Statistics (BLS)"
- "Data source: US Department of Labor"
- "Data source: US Centers for Disease Control"
- "Data source: The World Bank (CC BY 4.0)"
- "Data source: The GDELT Project (CC BY 4.0)"

### Example Usage

#### Local Testing

```bash
npm install
npm start

## Test input (stdin):
{
  "state": "CA",
  "year": 2024
}
```

#### Cloud Deployment & Testing

```bash
## Push to Apify Cloud
apify push

## Test from cloud (outputs to dataset)
apify call us-labor-market-intelligence --input='{"state":"CA","year":2024}'

## View results
apify dataset --clean
```

### Performance

- Parallel fetching of 5 APIs (Promise.allSettled)
- Individual timeouts: 10-15 seconds per API
- Expected runtime: 5-10 seconds
- Dataset output: ~3-5 KB per execution

### Version History

- **1.0.0** (2026-04-08): Initial release with 5-source aggregation, composite scoring, full disclaimers

***

**Author:** NtriqPRO\
**License:** ISC\
**Updated:** 2026-04-08

# Actor input Schema

## `state` (type: `string`):

Two-letter US state code or full name (e.g., 'CA' for California, 'NY' for New York). Optional.

## `year` (type: `integer`):

Year for labor market analysis (2020-2024). Defaults to 2024.

## `industryCode` (type: `string`):

6-digit NAICS code for industry-specific analysis (e.g., '621111' for office-based general medicine). Leave blank for all industries.

## Actor input object example

```json
{
  "state": "CA",
  "year": 2024
}
```

# Actor output Schema

## `results` (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 = {
    "state": "CA",
    "year": 2024
};

// Run the Actor and wait for it to finish
const run = await client.actor("ntriqpro/us-labor-market-intelligence").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 = {
    "state": "CA",
    "year": 2024,
}

# Run the Actor and wait for it to finish
run = client.actor("ntriqpro/us-labor-market-intelligence").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 '{
  "state": "CA",
  "year": 2024
}' |
apify call ntriqpro/us-labor-market-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ntriqpro/us-labor-market-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Labor Market Intelligence - BLS + DOL + World Bank",
        "description": "Aggregate BLS employment/wage/CPI data, DOL Wage & Hour violations, CDC worker health, World Bank labor indicators, and GDELT news. Returns labor health score 0-100. US public domain + CC-BY 4.0.",
        "version": "1.0",
        "x-build-id": "bJDzWyi4ymRKVT6eF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ntriqpro~us-labor-market-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ntriqpro-us-labor-market-intelligence",
                "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/ntriqpro~us-labor-market-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-ntriqpro-us-labor-market-intelligence",
                "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/ntriqpro~us-labor-market-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-ntriqpro-us-labor-market-intelligence",
                "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": {
                    "state": {
                        "title": "US State (FIPS or Code)",
                        "type": "string",
                        "description": "Two-letter US state code or full name (e.g., 'CA' for California, 'NY' for New York). Optional."
                    },
                    "year": {
                        "title": "Analysis Year",
                        "type": "integer",
                        "description": "Year for labor market analysis (2020-2024). Defaults to 2024."
                    },
                    "industryCode": {
                        "title": "NAICS Industry Code (Optional)",
                        "type": "string",
                        "description": "6-digit NAICS code for industry-specific analysis (e.g., '621111' for office-based general medicine). Leave blank for all industries."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
