# OpenInjury OSHA Workplace Safety Records (`kyisaiah47/openinjury-osha-records`) Actor

OpenInjury's API returns injury summaries that US worksites filed with OSHA, OSHA inspections and citations, and severe injury reports. Search employers by name, match a vendor list, or pull new records by state. You pay $10 per 1,000 calls.

- **URL**: https://apify.com/kyisaiah47/openinjury-osha-records.md
- **Developed by:** [Isaiah Kim](https://apify.com/kyisaiah47) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 openinjury api calls

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/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## OpenInjury OSHA Workplace Safety Records

This actor returns records from [OpenInjury](https://openinjury.org): yearly injury and illness summaries that US worksites file with OSHA, OSHA inspections and citations, and severe injury reports. It calls OpenInjury's own API. Each row includes its sources, notes and a link to the record's page on openinjury.org. It does not scrape any website.

### What it can look up

- **Search worksites by name** (`search`): You provide one or more company or worksite names, with an optional state, city or NAICS code. The actor returns up to 25 worksites per name in name-match order. Turn on `includeWorksiteRecords` to fetch each worksite's full record.
- **Worksite records** (`worksites`): The actor returns the full record for each `site_id`, including cases, hours and employees as filed for each year, computed rates with their range, the BLS national rate for the industry, and other public records at the worksite. Add `includeInspections` and `includeSevereInjuries` to fetch OSHA inspections, citations and severe injury reports.
- **Employer records** (`employers`): The actor returns yearly totals across the worksites that filed under one employer tax ID, identified by `employer_id` or EIN.
- **Match a vendor list** (`match`): Each vendor needs a name and either a street with a ZIP code or a tax ID. The answer gives the match class. Only a confirmed match names a worksite or an employer.
- **New records feed** (`newRecords`): The actor returns inspections, citations, severe injury reports and injury filings first published on OpenInjury since a date, filtered by state, NAICS code and kind.

### Output

Each dataset row has a `type` (`worksite_search_result`, `worksite`, `employer`, `inspections`, `severe_injury_reports`, `vendor_match`, `new_record`, `no_record` or `error`), the record itself, its `notes`, `sources` and `page_url`, a `caveat` and `retrieved_at`.

Rows keep the order OpenInjury returns them in. Search results come in name-match order. Nothing is ordered or ranked by injury rate, and a comparison with the national rate says only higher than, lower than or not distinguishable from it.

A worksite or employer that is absent has no record on OpenInjury. Absence says nothing about its injuries.

### About the figures

Figures are as reported by the employer to OSHA and are not verified by OSHA or by OpenInjury. OSHA says recording an injury does not mean the employer or employee was at fault or that an OSHA rule was broken. A contested citation, or one with no final order, is OSHA's allegation, not a finding. OpenInjury is not affiliated with OSHA or any government agency.

### Pricing

You pay $0.01 for each OpenInjury API call the actor makes ($10 per 1,000 calls), the same rate as OpenInjury's pay-as-you-go plan. One name searched, one worksite, one employer or one vendor is one call. With `includeWorksiteRecords`, `includeInspections` or `includeSevereInjuries`, each extra record is one more call. The new records feed returns up to 200 records per call. A lookup that OpenInjury refuses, such as a malformed ID, is not charged. A run stops at your spending limit.

### Example input

```json
{
  "mode": "search",
  "queries": ["Amazon"],
  "state": "TX",
  "maxResultsPerQuery": 3
}
```

```json
{
  "mode": "match",
  "vendors": [
    { "ref": "V-001", "name": "Amazon.com Services LLC", "street": "1851 NE Loop 820", "zip": "76131" }
  ]
}
```

### More

The same records are free to look up one at a time on [openinjury.org](https://openinjury.org). For direct API access, MCP and bulk files, see [openinjury.org/api](https://openinjury.org/api) and [openinjury.org/pricing](https://openinjury.org/pricing). Corrections: [openinjury.org](https://openinjury.org) has a Report an error link on every record.

# Actor input Schema

## `mode` (type: `string`):

search: find worksites by name. worksites: full records for worksite IDs. employers: totals for employer IDs or tax IDs. match: match a vendor list to OSHA filings. newRecords: inspections, citations, severe injury reports and filings newly published on OpenInjury.

## `queries` (type: `array`):

Worksite or company names, one per line. Each name is one OpenInjury call.

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

Two-letter state or territory code.

## `city` (type: `string`):

City name.

## `naics` (type: `string`):

2 to 6 digits.

## `maxResultsPerQuery` (type: `integer`):

1 to 25. Results come in name-match order, never by rate.

## `includeWorksiteRecords` (type: `boolean`):

One extra call for each worksite found.

## `siteIds` (type: `array`):

OpenInjury site_id values, one per line. Each is one call.

## `includeInspections` (type: `boolean`):

One extra call per worksite.

## `includeSevereInjuries` (type: `boolean`):

One extra call per worksite.

## `employerIds` (type: `array`):

An employer_id from a worksite record (for example E820544687) or a nine-digit EIN. Each is one call.

## `vendors` (type: `array`):

A list of vendors. Each needs a name and either a street with a ZIP code or a tax ID. Optional: ref, city, state. Each vendor is one call. Only a confirmed match names a worksite or employer.

## `since` (type: `string`):

First day to include, as YYYY-MM-DD. Defaults to 7 days ago.

## `states` (type: `array`):

Two-letter state codes.

## `naicsCodes` (type: `array`):

2 to 6 digit industry codes.

## `recordKind` (type: `string`):

Only one kind of record, or all kinds.

## `maxRecords` (type: `integer`):

Records are fetched 200 per call.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "Amazon"
  ],
  "state": "TX",
  "maxResultsPerQuery": 3,
  "includeWorksiteRecords": false,
  "includeInspections": false,
  "includeSevereInjuries": false,
  "recordKind": "",
  "maxRecords": 1000
}
```

# Actor output Schema

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

Worksite, employer, inspection, vendor match and new-record rows.

# 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 = {
    "mode": "search",
    "queries": [
        "Amazon"
    ],
    "state": "TX",
    "maxResultsPerQuery": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("kyisaiah47/openinjury-osha-records").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 = {
    "mode": "search",
    "queries": ["Amazon"],
    "state": "TX",
    "maxResultsPerQuery": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("kyisaiah47/openinjury-osha-records").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 '{
  "mode": "search",
  "queries": [
    "Amazon"
  ],
  "state": "TX",
  "maxResultsPerQuery": 3
}' |
apify call kyisaiah47/openinjury-osha-records --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kyisaiah47/openinjury-osha-records"
        }
    }
}
```

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/lwFnWnbiQnAL0UDF4/builds/3CcTECNkK5AWjqWtd/openapi.json
