KeyVex Osha Enforcement API

The Osha Enforcement API from KeyVex — 1 operation(s) for osha enforcement.

GitHub OpenAPI

Operations 1

GET /v1/osha-enforcement Returns OSHA workplace-safety enforcement records from the Department of… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/keyvex-com:keyvex-com-osha-enforcement-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

keyvex-com-osha-enforcement-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KeyVex Osha Enforcement API
  version: 0.102.0
  termsOfService: https://keyvex.com/terms
  description: 'US public financial-disclosure data — congressional trades, insider filings (Form 4), lobbying, Treasury auctions, member profiles. Requires an API key — create a free one at https://keyvex.com and send it as the header `x-api-key: `. A free key returns most public-record datasets (one year of history; no market-price data and a few heavy datasets are on paid plans only), capped at 60 requests/day; paid plans raise the caps. The daily allowance resets at midnight Eastern.'
servers:
- url: https://api.keyvex.com
security:
- ApiKeyAuth: []
tags:
- name: Osha Enforcement
paths:
  /v1/osha-enforcement:
    get:
      operationId: get_osha_enforcement
      summary: Returns OSHA workplace-safety enforcement records from the Department of…
      description: '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.'
      parameters:
      - name: activity_nr
        in: query
        required: false
        description: Direct lookup by OSHA inspection activity number (e.g., '317465899'). Returns the inspection with its violations attached. Fastest path.
        schema:
          type: string
      - name: establishment_name
        in: query
        required: false
        description: Case-insensitive substring against the inspected establishment's name (e.g., 'amazon', 'dollar general'). Client-side filter.
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Two-letter site state (e.g., 'TX', 'CA').
        schema:
          type: string
      - name: naics_code
        in: query
        required: false
        description: 'Exact NAICS industry code of the inspected site (e.g., ''238160'' roofing contractors). Note: ''000000'' on many pre-NAICS-era records.'
        schema:
          type: string
      - name: insp_type
        in: query
        required: false
        description: One-letter inspection-type code (e.g., 'M' Fat/Cat, 'B' Complaint, 'H' Planned — full legend in the tool description).
        schema:
          type: string
      - name: since
        in: query
        required: false
        description: Inspection open_date lower bound (YYYY-MM-DD inclusive).
        schema:
          type: string
      - name: until
        in: query
        required: false
        description: Inspection open_date upper bound (YYYY-MM-DD inclusive).
        schema:
          type: string
      - name: min_penalty
        in: query
        required: false
        description: Keep only inspections with at least one violation whose initial or current penalty is >= this amount (dollars). Implies include_violations=true.
        schema:
          type: number
      - name: include_violations
        in: query
        required: false
        description: When true, attaches each returned inspection's violation citations under a `violations` array (standard, type, penalties, abatement/contest dates). Default false.
        schema:
          type: boolean
      - name: sort_by
        in: query
        required: false
        description: 'Sort key. Default: open_date. case_mod_date = most recently UPDATED cases (cannot combine with state/naics_code/since/until).'
        schema:
          type: string
          enum:
          - open_date
          - case_mod_date
      - name: sort_order
        in: query
        required: false
        description: 'Default: desc (most recent first).'
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: limit
        in: query
        required: false
        description: Maximum inspections to return. Default 50, max 500.
        schema:
          type: integer
      responses:
        '200':
          description: 'JSON envelope: { results: [...], count, has_more }.'
        '400':
          description: Invalid parameter.
        '401':
          description: Missing or invalid API key.
        '402':
          description: This tool requires a higher plan (upgrade_required). Retrying will not help.
        '429':
          description: Tier rate/quota limit reached (rate_limited). Retry-After points at the reset.
      tags:
      - Osha Enforcement
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key