# OSHA Severe-Injury Reports Scraper (`usta/osha-severe-injury-reports`) Actor

One clean item per OSHA severe-injury report: employer, city, state, industry code, and whether a hospitalisation or amputation was reported. Firms only, no worker names. Pay per run.

- **URL**: https://apify.com/usta/osha-severe-injury-reports.md
- **Developed by:** [US Tech Automations](https://apify.com/usta) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## OSHA Severe-Injury Reports Scraper

One clean row per OSHA severe-injury report. You give it a state, a date range,
an industry-code prefix and/or a keyword; it hands back a table.

### What each row is

`event_date`, `employer`, `city`, `state`, `naics` (industry code),
`hospitalized`, `amputation`, `nature`, `body_part`, and the `source_url` it came
from. The subject is always the **employer** (a firm). No injured worker is
named — the public dataset carries no such name and this actor keeps none. No
street address is kept; town and state only.

### Source

OSHA's public severe-injury dataset (the "Get the data" CSV behind
`https://www.osha.gov/severeinjury`). Public-domain US Government data.

**Heads up:** from some networks `osha.gov` answers automated fetches with
HTTP 403. A real run on Apify fetches live; local `apify run` from a blocked
network uses the clearly-labelled synthetic fixture in `fixtures/` (every value
is marked `SAMPLE` so it can never be mistaken for a real report). See
`../../SOURCES.md`.

### Price (pay-per-event, billed by Apify)

- **$0.50** to start a run (`run-start`)
- **$0.005** for each report returned (`result-item`)

So a run that returns 200 reports costs about **$1.50**, billed by Apify to the
buyer's Apify account.

### Compute cost vs price

Timed locally, parsing + filtering is **~0.4 ms per 200 rows** — the run's cost
is dominated by the one CSV download. Estimating a generous 10-second run at the
512 MB default memory and Apify's ~$0.40 per GB-hour:

| | value |
|---|---|
| Run wall time (fetch + parse, est.) | ~10 s |
| Memory | 0.5 GB |
| Compute cost of the run | ~$0.0006 |
| Revenue of a 200-item run | $1.50 |
| **Compute ÷ revenue** | **~0.04%** |

Well under the 30% ceiling.

### Run it

```bash
apify run --input '{"state":"AZ","naicsPrefix":"23","maxItems":50}'
```

`maxItems` is capped hard at 1000 and there is a run timeout, so a run cannot run
away. `main.collect(inp, rows=None)` is a plain function you can import and test
offline.

Not affiliated with OSHA. Not legal, tax or professional advice.

# Actor input Schema

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

Keep only reports from this state, e.g. AZ. Leave blank for every state.

## `dateFrom` (type: `string`):

Keep only reports on or after this date. Blank means no lower bound.

## `dateTo` (type: `string`):

Keep only reports on or before this date. Blank means no upper bound.

## `naicsPrefix` (type: `string`):

Keep only reports whose industry code starts with this, e.g. 23 for construction.

## `keyword` (type: `string`):

Keep only reports whose text contains this word, e.g. amputation.

## `maxItems` (type: `integer`):

Stop after this many reports. Hard ceiling is 1000, so a run cannot run away.

## `timeoutSeconds` (type: `integer`):

Stop collecting after this many seconds so a run cannot hang.

## Actor input object example

```json
{
  "state": "AZ",
  "dateFrom": "2024-01-01",
  "dateTo": "2024-12-31",
  "naicsPrefix": "23",
  "maxItems": 1000,
  "timeoutSeconds": 300
}
```

# Actor output Schema

## `results` (type: `string`):

All items the run produced, one per record, as JSON.

## `results_csv` (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("usta/osha-severe-injury-reports").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("usta/osha-severe-injury-reports").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 usta/osha-severe-injury-reports --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,usta/osha-severe-injury-reports"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bTrifrQ2s7Hm0wTWH/builds/nlgrVPvZdNNVU7ahx/openapi.json
