OSHA Inspections and Violations Scraper avatar

OSHA Inspections and Violations Scraper

Pricing

Pay per event

Go to Apify Store
OSHA Inspections and Violations Scraper

OSHA Inspections and Violations Scraper

Search OSHA IMIS inspection records by company, state, date range, case status, and violations. Export inspection details, penalties, and citations.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Search public OSHA IMIS establishment records and export inspection history, violation counts, penalty totals, citation rows, and source URLs.

Use this actor when you need repeatable OSHA enforcement data for compliance monitoring, EHS research, insurance underwriting, legal discovery, journalism, or B2B safety-remediation lead generation.

What does OSHA Inspections and Violations Scraper do?

This actor queries the public OSHA establishment search at osha.gov/ords/imis/establishment.search.

It accepts a company or establishment keyword, state, date range, case-status filter, violation filter, and result limit.

For every matching inspection, it saves a structured dataset row.

When detail expansion is enabled, it follows each OSHA inspection detail link and enriches the row with office, address, case status, penalty totals, and violation item details.

The actor is HTTP-first and does not use a browser.

No OSHA login is required.

No proxy is configured by default.

Who is it for?

EHS and compliance teams

Monitor your own OSHA inspection history across facilities.

Compare open and closed cases by state and date range.

Export penalty and citation details for internal review.

Insurance and risk teams

Screen workplace-safety enforcement history for businesses, facilities, vendors, or insured accounts.

Pull repeatable datasets before renewal or underwriting decisions.

Consultants and safety vendors

Find companies with recent inspections, accidents, complaints, or violations.

Use inspection metadata to prioritize outreach.

Journalists and researchers

Collect public enforcement records for a company, industry keyword, or state.

Keep source URLs for fact-checking and citation.

Review inspection status, case closure, penalties, standards cited, and citation events.

Export rows for document review or downstream analysis.

Why use this actor?

OSHA records are public, but the IMIS pages are built for manual browsing.

This actor turns those pages into clean JSON, CSV, Excel, XML, or API-ready data.

It also preserves the OSHA source URLs so every row can be audited.

The default input is small enough for a quick test run.

Larger date ranges can be crawled by increasing maxItems.

Data you can extract

FieldDescription
inspectionNumberOSHA inspection/activity number
establishmentNameEstablishment name from OSHA results
dateOpenedInspection open date
stateState code
reportIdOSHA report/RID value
inspectionTypeComplaint, accident, programmed, referral, or other OSHA type
scopePartial/full inspection scope
sicSIC code when OSHA provides it
naicsNAICS code when OSHA provides it
violationsResult-page violation count
oshaOfficeOSHA office from the detail page
caseStatusOpen/closed case status
siteAddressFacility/site address
mailingAddressMailing address
unionStatusUnion status from OSHA detail page
ownershipPrivate/public ownership classification
safetyHealthSafety or health classification
closeConferenceDateClose conference date
caseClosedDateCase closed date
initialPenaltyTotalUsdInitial total penalty from violation summary
currentPenaltyTotalUsdCurrent total penalty from violation summary
violationItemsCitation rows with standard, type, dates, penalties, event, and detail URL
detailUrlOSHA inspection detail page
searchUrlOSHA search URL used for the row
scrapedAtTimestamp when the actor saved the row

How much does it cost to scrape OSHA inspections?

This actor uses pay-per-event pricing.

There is a small start fee per run.

Each saved OSHA inspection record is charged as one item event.

You control spend with maxItems.

The default prefill saves a small sample before you scale to larger date ranges.

Quick start

  1. Enter a company or establishment keyword, for example amazon.
  2. Choose a state such as CA, or use all for nationwide results.
  3. Set the inspection date range.
  4. Keep includeViolationDetails enabled if you need addresses, penalties, and citation rows.
  5. Set maxItems to the number of inspections you want.
  6. Run the actor.
  7. Download the dataset as JSON, CSV, Excel, XML, RSS, or HTML.

Input options

establishment

Company, employer, or establishment keyword.

Examples: amazon, tesla, walmart, construction, warehouse.

state

Two-letter state code, or all.

Examples: CA, TX, NY, all.

startDate and endDate

Inspection open-date range.

Use YYYY-MM-DD.

caseStatus

Choose all, open, or closed.

violationsExist

Choose both, yes, or no.

Use yes when you only want inspections with violations.

maxItems

Maximum inspection records to save.

includeViolationDetails

When enabled, the actor follows each detail page.

This adds richer fields but makes one extra HTTP request per inspection.

requestDelayMillis

A polite delay between OSHA requests.

Increase it for very large searches.

startUrls

Optional direct OSHA establishment.search URLs.

Use this when you already created a query in OSHA IMIS and want the actor to crawl that result set.

Example input

{
"establishment": "amazon",
"state": "CA",
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"caseStatus": "all",
"violationsExist": "both",
"maxItems": 25,
"includeViolationDetails": true,
"requestDelayMillis": 250
}

Example output

{
"inspectionNumber": "1780602.015",
"establishmentName": "Amazon Vupc",
"dateOpened": "10/09/2024",
"state": "CA",
"reportId": "0950644",
"inspectionType": "Complaint",
"scope": "Partial",
"naics": "493110",
"violations": null,
"oshaOffice": "Monrovia District Office",
"caseStatus": "CLOSED",
"siteAddress": "Amazon Vupc 4815 S. Hellman Ave Ontario, CA 91762",
"currentPenaltyTotalUsd": null,
"violationItems": [],
"detailUrl": "https://www.osha.gov/ords/imis/establishment.inspection_detail?id=1780602.015",
"searchUrl": "https://www.osha.gov/ords/imis/establishment.search?...",
"scrapedAt": "2026-06-30T04:20:27.250Z"
}

Tips for better OSHA searches

Use the legal entity name when possible.

Try common variants such as Amazon, Amazon.com Services, and facility brand names.

Use a state filter for faster, cleaner results.

Use violationsExist: yes when you only want citation-heavy records.

Use a wider date range for low-volume establishments.

Disable detail expansion when you only need a quick inspection index.

Pagination behavior

OSHA result pages usually show 20 inspections per page.

The actor follows OSHA page links until it reaches maxItems.

It avoids visiting the same result URL twice.

Integrations

Use this actor in Apify datasets, webhooks, integrations, or API clients.

Common workflows include:

  • Weekly OSHA monitoring for a list of target companies.
  • Compliance dashboards in Google Sheets or BI tools.
  • Lead enrichment for safety vendors.
  • Insurance underwriting research before renewal.
  • Investigative datasets that combine OSHA records with company lists.

API usage

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/osha-inspections-violations-scraper').call({
establishment: 'amazon',
state: 'CA',
startDate: '2024-01-01',
endDate: '2024-12-31',
maxItems: 25,
});
console.log(run.defaultDatasetId);

Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/osha-inspections-violations-scraper').call(run_input={
'establishment': 'amazon',
'state': 'CA',
'startDate': '2024-01-01',
'endDate': '2024-12-31',
'maxItems': 25,
})
print(run['defaultDatasetId'])

cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~osha-inspections-violations-scraper/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"establishment":"amazon","state":"CA","startDate":"2024-01-01","endDate":"2024-12-31","maxItems":25}'

MCP usage

Use the Apify MCP server to run this actor from Claude Desktop or Claude Code.

MCP URL:

https://mcp.apify.com/?tools=automation-lab/osha-inspections-violations-scraper

Claude Code setup:

$claude mcp add apify-osha-inspections "https://mcp.apify.com/?tools=automation-lab/osha-inspections-violations-scraper"

Claude Desktop JSON config:

{
"mcpServers": {
"apify-osha-inspections": {
"url": "https://mcp.apify.com/?tools=automation-lab/osha-inspections-violations-scraper"
}
}
}

Example prompts:

  • "Run the OSHA inspections scraper for Amazon in California in 2024 and summarize accident inspections."
  • "Find OSHA inspections with violations for Tesla in Texas since 2023."
  • "Export current penalties and citation standards for this establishment list."

FAQ

Is OSHA login required?

No. The actor reads public OSHA IMIS pages available on osha.gov.

Can I scrape only inspections with violations?

Yes. Set violationsExist to yes and keep includeViolationDetails enabled to export citation and penalty fields.

Troubleshooting

I got zero results

Check spelling and try a shorter establishment keyword.

Try state: all or a wider date range.

OSHA may store legal names differently from brand names.

Some penalty fields are null

Not every inspection has violations or penalty data.

The actor keeps null values instead of inventing data.

Runs are slower with detail expansion

Detail expansion makes one extra OSHA request per inspection.

Disable includeViolationDetails for a faster inspection index.

Data freshness

The actor reads live public OSHA IMIS pages during each run.

It does not cache records between runs.

Legality and ethics

This actor extracts public OSHA government web pages.

Use the data responsibly.

Respect OSHA source attribution and verify critical records on the original OSHA detail URL.

Do not use the output to make automated decisions without human review.

Changelog

0.1

Initial private build for OSHA establishment search, inspection detail enrichment, penalty totals, and violation item extraction.

Support

Open an issue on Apify if you need additional OSHA fields or a different enforcement-data workflow.