Query OSHA inspection, violation, and accident enforcement data via the DOL Enforcement Data API
domain: developer.dol.gov · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Register a developer account at the DOL Developer Portal and generate an API token from the "My Tokens" page.
Send requests to the OSHA Enforcement dataset with your token in the `X-API-KEY` header.
Query the Inspection table for inspection metadata (`activity_nr`, `estab_name`, `insp_type`, `open_date`, `close_case_date`, NAICS/SIC codes), the Violation table for citations (`citation_id`, `standard`, `viol_type`, `current_penalty`, `issuance_date`), or the Accident/Accident Injury tables for fatality/injury narratives, joining on `activity_nr`/`summary_nr`.
Page through results using offset-based pagination since each call returns a maximum of 200 records.
Request JSON output by appending `/format/json` to the request URL where applicable (the legacy v1 API defaults to XML unless an `Accept: application/json` header is sent).
Known gotchas
The default response format differs by API generation — the legacy v1 API defaults to XML unless you send an `Accept: application/json` header, while data.dol.gov defaults to JSON and uses a `/format/json`|`/format/xml` URL suffix instead.
Each dataset table (Inspection, Violation, Accident, etc.) is queried and paginated independently — join them client-side on shared keys like `activity_nr`.
DOL has been migrating this dataset to a newer Open Data Portal and has signaled the older enforcement site will eventually be retired, so confirm you're pointed at the current active endpoint before building long-term integrations.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?