---
title: "Returns OSHA workplace-safety enforcement records from the Department of Labor's enforcement data: inspection cases (who was inspected, where, why, when) with optional violation citations attached (standard cited, violation type, penalties, abatement dates)"
method: GET
path: "/v1/osha-enforcement"
---

# Returns OSHA workplace-safety enforcement records from the Department of Labor's enforcement data: inspection cases (who was inspected, where, why, when) with optional violation citations attached (standard cited, violation type, penalties, abatement dates)

`GET /v1/osha-enforcement`

## Request

- Base URL: `https://api.keyvex.com`
- URL: `https://api.keyvex.com/v1/osha-enforcement`
- Auth: API key in header `x-api-key`

Returns OSHA workplace-safety enforcement records from the Department of Labor's enforcement data: inspection cases (who was inspected, where, why, when) with optional violation citations attached (standard cited, violation type, penalties, abatement dates). Use this when the user asks about: a company's workplace-safety record, OSHA penalties or citations, fatality/catastrophe investigations, inspection activity by state or industry (NAICS), or contractor safety research.  Result rows are INSPECTIONS. Pass include_violations=true to attach each inspection's citations under a `violations` array (or pass activity_nr for a direct lookup, which always includes them). min_penalty keeps only inspections with at least one violation whose initial or current penalty meets the threshold (implies include_violations).  insp_type codes (DOL's own legend): A=Accident, B=Complaint, C=Referral, D=Monitoring, E=Variance, F=FollowUp, G=Unprog Rel, H=Planned, I=Prog Related, J=Unprog Other, K=Prog Other, L=Other-L, M=Fat/Cat (fatality/catastrophe), N=Unprog Emph. Each record carries insp_type_label with the decoded value. Violation viol_type codes: S=Serious, W=Willful, R=Repeat, O=Other, U=Unclassified. Violations carry delete_flag='X' when the source later deleted the citation — rows are kept with the flag, never dropped.  Filter combinations note: server-side indexes support ONE of state / naics_code combined with the open_date sort + since/until. Other filters (establishment_name substring, insp_type, state+naics together, min_penalty) post-filter client-side over a widened fetch window. sort_by=case_mod_date is the 'recently updated cases' firehose and cannot be combined with state / naics_code / since / until.  Pure-publisher posture: DOL's enforcement rows as published — codes kept verbatim (with the source's own legend decoded alongside), no safety scoring. Each record's source_url links to the osha.gov establishment inspection-detail page.

## Query parameters

- `activity_nr` string
- `establishment_name` string
- `state` string
- `naics_code` string
- `insp_type` string
- `since` string
- `until` string
- `min_penalty` number
- `include_violations` boolean
- `sort_by` 'open_date' | 'case_mod_date'
- `sort_order` 'asc' | 'desc'
- `limit` integer

## Response `200`

JSON envelope: { results: [...], count, has_more }.

## Other responses

- `400`: Invalid parameter.
- `401`: Missing or invalid API key.
- `402`: This tool requires a higher plan (upgrade_required). Retrying will not help.
- `429`: Tier rate/quota limit reached (rate_limited). Retry-After points at the reset.

---

[API](https://skmtc.dev/keyvex/apis/keyvex-api.md) · [All operations](https://skmtc.dev/keyvex/apis/keyvex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/keyvex/apis/keyvex-api/revisions/01c0210c19cd?raw)
