OSHA Violation Risk & Time-Series
Turn any US employer's OSHA inspection history into a risk score, repeat-offender flag, and violation time-series — severity-weighted, auditable, and tracked over time.
Verification
Not yet in the weekly verification report.
Output fields
Authoritative field set from the dataset schema.
| Field | Type |
|---|---|
query | string|null |
state | string|null |
establishments | array|null |
inspection_count | integer|null |
violation_count | integer|null |
by_gravity | object|null |
total_current_penalty | integer|null |
total_initial_penalty | integer|null |
risk_score | integer|null |
risk_band | string|null |
repeat_offender | boolean|null |
trend | string|null |
violation_time_series | array|null |
inspections | array|null |
first_seen | boolean|null |
new_inspections | integer|null |
new_violations | number|null |
risk_score_delta | number|null |
source_url | string|null |
scraped_at | string|null |
Sample row
{
"query": "Dollar General",
"state": null,
"establishments": [
"Dollar General Store 12345"
],
"inspection_count": 2,
"violation_count": 2,
"by_gravity": {
"serious": 2
},
"total_current_penalty": 14000,
"total_initial_penalty": 14000,
"risk_score": 21,
"risk_band": "medium",
"repeat_offender": false,
"trend": "falling",
"violation_time_series": [
{
"year": 2024,
"violations": 2,
"penalty": 14000
}
],
"first_seen": false,
"new_inspections": 0,
"new_violations": 0,
"risk_score_delta": 0,
"source_url": "https://www.osha.gov/ords/imis/establishment.search?establishment=Dollar+General&state=all"
} Inputs
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
employers | array | yes | ["Dollar General"] | US employer / company names to analyze (e.g. 'Dollar General'). One risk report per name, aggregating all of that employer's OSHA inspections. |
state | string | no | — | Optional two-letter state code (e.g. 'TX') to limit inspections to that state. Leave empty for nationwide. |
maxInspectionsPerEmployer | integer | no | 25 | Cap on inspections pulled per employer (most-recent first). Citations are read for the inspections OSHA lists with violations — the most recent 6 per employer while OSHA's site sits behind its bot wall; any beyond that are counted in inspections_not_detailed. |
compareToPrevious | boolean | no | true | When on (default), diff each employer against the previous run and report what changed — new inspections, new violations, risk-score delta. Run on a schedule to track employers over time. |
proxyConfiguration | object | no | {"useApifyProxy":false} | Optional, and not needed: when OSHA's bot wall refuses a direct request the actor switches to an unblocker on its own, at no extra cost to you. |
Pricing
Pay per result (dataset-item) — no charge for empty runs.
Example: 100 employer risk reports at $0.05/result ≈ $5.00.
FAQ
Where does the data come from?
OSHA's public IMIS enforcement database (inspections + citations). Public data, no login required.
How is the risk score calculated?
A deterministic formula: violations weighted by OSHA gravity (Willful > Repeat > Serious > Other) and decayed by recency, scaled to 0-100. It's reproducible and auditable — the same history always yields the same score.
What counts as a repeat offender?
Any employer with one or more citations OSHA classified as 'Repeat' gravity.
Can I limit to one state?
Yes — pass a two-letter state code to restrict the inspections analyzed; leave it empty for nationwide.
How am I charged?
Per employer risk report produced. Employers with no inspections found are returned empty and not charged. If your run's maximum charge is reached, the actor stops before looking up the remaining employers and lists them in a free row.
Can it track changes over time?
Yes — run on a schedule and it reports new inspections, new violations, and risk-score movement since the previous run.
Guides & use cases