Skip to content
SafetyRecord logoSafetyRecord
Data / API v1.1.1

OSHA Data API

Read-only JSON access to OSHA inspections, citations and penalties from U.S. Department of Labor records, with the citation changes we detected since September 21, 2026.

Records come from the U.S. Department of Labor. This API adds the changes detected on citations, flags on withheld values, SafetyRecord's grouping of inspections into establishments, and stable cursor paging.

This product uses the DOL Data API but is not endorsed or certified by the DOL. SafetyRecord.org is not affiliated with, endorsed or certified by OSHA, the Department of Labor or any government agency.

Quick start

Base URL https://safetyrecord.org/api/v1. Send your key in the Authorization header. Every response is JSON with data and meta.

curl -s https://safetyrecord.org/api/v1/inspections?state=OH&naics=332710&limit=1 \
  -H "Authorization: Bearer $SAFETYRECORD_API_KEY"

/status and /openapi.json need no key. meta.data_as_of is the newest date recorded anywhere in the inspection and citation data.

Example response, not a real record
{
  "data": [
    {
      "activity_nr": 123456789,
      "establishment_id": 4567890,
      "reporting_id": "0000000",
      "estab_name": "EXAMPLE MANUFACTURING LLC",
      "site_address": "100 EXAMPLE RD",
      "site_city": "TOLEDO",
      "site_state": "OH",
      "site_zip": "43604",
      "owner_type": "A",
      "owner_type_label": "Private",
      "sic_code": null,
      "naics_code": "332710",
      "insp_type": "H",
      "insp_type_label": "Planned",
      "insp_scope": "A",
      "insp_scope_label": "Complete",
      "safety_hlth": "S",
      "safety_hlth_label": "Safety",
      "adv_notice": "N",
      "adv_notice_label": "No",
      "union_status": "N",
      "union_status_withheld": false,
      "union_status_label": "No",
      "nr_in_estab": 85,
      "nr_in_estab_withheld": false,
      "open_date": "2026-05-28",
      "case_mod_date": "2026-07-14",
      "close_conf_date": "2026-06-30",
      "close_conf_date_withheld": false,
      "close_case_date": null,
      "close_case_date_withheld": false
    }
  ],
  "meta": {
    "api_version": "1.1.1",
    "data_as_of": "2026-10-19",
    "source_notice": "This product uses the DOL Data API but is not endorsed or certified by the DOL.",
    "next_cursor": "WyIyMDI2LTA1LTI4IiwxMjM0NTY3ODld",
    "limit": 1
  }
}

Keys

Keys are issued on request from the Data page and look like sr_live_ followed by 43 characters. Send Authorization: Bearer <key> (RFC 6750). A key in the URL is refused with 400, because URLs end up in logs. Keys are for servers: there is no CORS support, so never put a key in a browser or an app.

Each key carries a business-use statement: the data is used only for decisions about businesses, not to screen individual people for employment, housing, credit or personal insurance. The statement is renewed every 12 months; after that the key answers 401 certification-expired until it is renewed. See the API terms.

Paging

Lists are newest first, by open_date then activity_nr, both descending. limit is 1 to 500, default 100. When another page follows, meta.next_cursor is set and the response carries an RFC 8288 Link header with rel="next". Pass the cursor back with the same filters. On the last page next_cursor is null and there is no Link header. Cursors are opaque; do not build them yourself.

Errors

Every error is RFC 9457 problem details, application/problem+json, with type, title, status and usually detail. Each type links to its row below.

typeStatusWhen
invalid-parameter400A path or query parameter, or the cursor, is malformed; an unknown or repeated parameter; a key sent in the URL; a request body.
invalid-token401No key, or a key that is not valid or has been revoked. The response carries WWW-Authenticate.
certification-expired401The business-use statement of the key is older than 12 months. The body carries certification_expires_at.
not-found404No record with this identifier is held.
gone410The record is no longer served by this API. No reason is given.
method-not-allowed405Any method other than GET, HEAD, OPTIONS. The response carries Allow.
quota-exceeded429The monthly quota of the key is used up. Retry-After gives the seconds until it resets.
overloaded503Too many requests are in progress. Retry after a second.
timeout503The query took longer than 5 seconds. Narrow the filters or retry.
internal500An unexpected error. Each response carries X-Request-Id; quote it when you contact us.

Quota

Each key has a monthly request quota; trial keys get 10,000 requests a month. Every request counts, including errors after the key is accepted, and the count resets at the start of each calendar month in UTC. Responses carry RateLimit-Policy and RateLimit headers as defined in the IETF draft draft-ietf-httpapi-ratelimit-headers (a draft, not yet a standard): the quota, the requests left and the seconds until the reset. Over the quota the API answers 429 with Retry-After.

Data rules

  • Field names and values are DOL's. Each field in the schemas below carries a provenance: source: As DOL publishes it. normalized: DOL's value with a documented cleanup. withheld-rule: DOL's value, withheld by a SafetyRecord rule: the value is null and <field>_withheld is true. derived: Computed by SafetyRecord.org.
  • Some values are withheld and returned as null with a _withheld flag: employee counts of 99,999 or more, union status before 1975, and close or final order dates outside 1970 to next year.
  • Money is a decimal string such as "16550.00", so no precision is lost. Dates are YYYY-MM-DD and timestamps are UTC (RFC 3339).
  • _label fields decode a code only where the website already decodes it. An unknown code is returned as recorded, with a null label.
  • Citation items OSHA deleted are included and carry delete_flag "X". The website does not list them.
  • NAICS codes are recorded for inspections opened from 2002 on. Almost all earlier inspections carry DOL's placeholder 000000, which is not accepted as a filter.
  • Citation revisions start on September 21, 2026; changes before that date were not captured.
  • Establishments are SafetyRecord's grouping of inspections by employer and location (beta). They are not OSHA entities and have no parent companies, and an inspection can move between groupings.
  • 404 means we never held the identifier. 410 means the record is no longer served by this API.
  • Having OSHA inspection records is common for businesses in regulated industries. A record describes what OSHA recorded; on its own it does not establish that an employer is unsafe or at fault.

Versioning

The contract follows Semantic Versioning 2.0.0; the current version is 1.1.1. New fields, endpoints and filters are minor versions, so ignore fields you do not know. A breaking change gets a new path (/v2), and /v1 stays available at least 6 months after the Deprecation and Sunset headers are first sent. Every change is listed in the changelog.

Endpoints

GET /v1/inspections

List inspections

Newest first, by open_date then activity_nr, both descending. Cursor paged: pass next_cursor from the previous page as cursor, with the same filters. NAICS codes are recorded for inspections opened from 2002 on; almost all earlier inspections carry DOL's placeholder 000000, which is not accepted as a filter.

ParameterInTypeDescription
state?querystringTwo-letter USPS code of the site state, as DOL records it.
naics?querystringExact six-digit NAICS code as DOL records it. 000000 is rejected (DOL's placeholder).
opened_from?querystring (date)Earliest open_date, inclusive.
opened_to?querystring (date)Latest open_date, inclusive.
cursor?querystringOpaque value from meta.next_cursor of the previous page. Use it with the same filters.
limit?queryinteger

Returns array of Inspection. Statuses: 200, 400, 401, 429, 500, 503.

GET /v1/inspections/{activity_nr}

One inspection
ParameterInTypeDescription
activity_nrpathinteger (int64)OSHA's inspection number (DOL activity_nr).

Returns Inspection. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/inspections/{activity_nr}/citations

Citations of one inspection

All citation items of the inspection, by citation_id. Items OSHA deleted are included and carry delete_flag "X"; the website does not list them.

ParameterInTypeDescription
activity_nrpathinteger (int64)OSHA's inspection number (DOL activity_nr).

Returns array of Citation. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/citations/{activity_nr}/{citation_id}

One citation item
ParameterInTypeDescription
activity_nrpathinteger (int64)OSHA's inspection number (DOL activity_nr).
citation_idpathstringDOL citation_id (citation, item and group, for example 01001A).

Returns Citation. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/citations/{activity_nr}/{citation_id}/revisions

Field changes detected on one citation item

Oldest first. Recorded from 2026-09-21; changes before that date were not captured. An old_value of null means no value was recorded before the change. A final_order_date outside 1970 through next year is withheld as on the citation. An empty list means no change was detected.

ParameterInTypeDescription
activity_nrpathinteger (int64)OSHA's inspection number (DOL activity_nr).
citation_idpathstringDOL citation_id (citation, item and group, for example 01001A).

Returns array of CitationRevision. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/establishments/{establishment_id}

One establishment (SafetyRecord grouping, beta)Beta

An establishment is SafetyRecord.org's grouping of inspections by employer and location. It is not an OSHA entity and has no parent companies. Inspections can move between groupings, and a grouping merged into another returns 404. Counts are ours.

ParameterInTypeDescription
establishment_idpathinteger (int64)

Returns Establishment. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/establishments/{establishment_id}/inspections

Inspections in one establishment (beta)Beta

Newest first, by open_date then activity_nr, both descending. Cursor paged.

ParameterInTypeDescription
establishment_idpathinteger (int64)
cursor?querystringOpaque value from meta.next_cursor of the previous page. Use it with the same filters.
limit?queryinteger

Returns array of Inspection. Statuses: 200, 400, 401, 404, 410, 429, 500, 503.

GET /v1/status

Service and data freshnessNo key

Returns Status. Statuses: 200, 400, 500, 503.

GET /v1/openapi.json

This contract as JSONNo key

Returns The OpenAPI document. Statuses: 200.

Schemas

A ? after a field name means the field may be absent. The full machine-readable contract is at /api/v1/openapi.json.

Problem

RFC 9457 Problem Details. type resolves to an anchor in the guide.

FieldTypeProvenanceDescription
typestring (uri)
titlestring
statusinteger
detail?string
instance?string
certification_expires_at?string (date-time)Only on certification-expired.

Meta

FieldTypeProvenanceDescription
api_versionstring
data_as_ofstring (date) or nullNull only if the freshness figures have not been computed yet. Newest date recorded anywhere in the inspection and citation data (open, case modification, case closed, issuance, contest or final order date, not after today).
source_noticestringAlways "This product uses the DOL Data API but is not endorsed or certified by the DOL.".

ListMeta

FieldTypeProvenanceDescription
api_versionstring
data_as_ofstring (date) or nullNull only if the freshness figures have not been computed yet. Newest date recorded anywhere in the inspection and citation data (open, case modification, case closed, issuance, contest or final order date, not after today).
source_noticestringAlways "This product uses the DOL Data API but is not endorsed or certified by the DOL.".
next_cursorstring or nullPass as cursor for the next page; null on the last page.
limitinteger

Inspection

FieldTypeProvenanceDescription
activity_nrinteger (int64)sourceDOL Activity NR, OSHA's inspection number.
establishment_idinteger (int64) or nullderivedSafetyRecord grouping this inspection belongs to (beta).
reporting_idstring or nullsourceDOL Reporting ID.
estab_namestring or nullnormalizedDOL Establishment Name, with a leading employer ID number removed.
site_addressstring or nullsourceDOL Site Street Address.
site_citystring or nullsourceDOL Site City.
site_statestring or nullsourceDOL Site State.
site_zipstring or nullsourceDOL Site Zip Code.
owner_typestring or nullsourceDOL Owner Type: A Private, B LocalGovt, C StateGovt, D Federal.
owner_type_labelstring or nullderived
sic_codestring or nullsourceDOL SIC. Null when none is recorded.
naics_codestring or nullsourceDOL NAICS Code. 000000 is DOL's placeholder for no code.
insp_typestring or nullsourceDOL Inspection Type, codes A to N.
insp_type_labelstring or nullderived
insp_scopestring or nullsourceDOL Inspection Scope: A Complete, B Partial, C Records, D NoInspection.
insp_scope_labelstring or nullderived
safety_hlthstring or nullsourceDOL Safety/Health: S safety, H health.
safety_hlth_labelstring or nullderived
adv_noticestring or nullsourceDOL Advance Notice: Y Yes, N No.
adv_notice_labelstring or nullderived
union_statusstring or nullwithheld-ruleDOL Union Status (Y, U, A Yes; N, B No). Withheld for inspections opened before 1975.
union_status_withheldboolean
union_status_labelstring or nullderivedYes or No per DOL's list. A blank value has no label (DOL maps blank to No; we do not).
nr_in_estabinteger or nullwithheld-ruleDOL Number of Employees in the establishment. Withheld at 99,999 or above. A recorded 0 is returned as 0.
nr_in_estab_withheldboolean
open_datestring (date) or nullsourceDOL Open Date.
case_mod_datestring (date) or nullsourceDOL Case Modification Date.
close_conf_datestring (date) or nullwithheld-ruleDOL Closing Conference Date. Withheld when the year is before 1970 or after next year.
close_conf_date_withheldboolean
close_case_datestring (date) or nullwithheld-ruleDOL Case Closed Date. Withheld when the year is before 1970 or after next year.
close_case_date_withheldboolean

Citation

FieldTypeProvenanceDescription
activity_nrinteger (int64)source
citation_idstringsourceDOL Citation ID (citation, item, group).
delete_flagstring or nullsourceDOL Delete Flag, X means OSHA deleted the item.
standardstring or nullsourceDOL Standard cited.
vio_typestring or nullsourceDOL Violation Type: S Serious, W Willful, R Repeat, O Other, U Unclassified. Other codes are returned as recorded.
vio_type_labelstring or nullderivedOnly for the five codes in DOL's list.
issuance_datestring (date) or nullsource
abate_datestring (date) or nullsource
abate_completestring or nullsourceDOL Abate Complete code.
current_penaltyMoneysourceU.S. dollars as a decimal string with two places, for example "16550.00".
initial_penaltyMoneysourceU.S. dollars as a decimal string with two places, for example "16550.00".
contest_datestring (date) or nullsourceDOL Contested Date.
final_order_datestring (date) or nullwithheld-ruleDOL Final Order Date. Withheld when the year is before 1970 or after next year.
final_order_date_withheldboolean
nr_instancesinteger or nullsource
nr_exposedinteger or nullsource
recstring or nullsourceDOL Rec code.
gravitystring or nullsourceDOL Gravity, "Level of Gravity for Serious Violations". OSHA's penalty memo of January 7, 2025 (Table 2) defines only 10 (High), 5 (Moderate) and 1 (Low), for serious violations. Other values are returned as recorded.
emphasisstring or nullsource
hazcatstring or nullsourceDOL Hazard Category.
fta_insp_nrinteger (int64) or nullsourceDOL FTA Inspection NR.
fta_issuance_datestring (date) or nullsource
fta_penaltyMoneysourceU.S. dollars as a decimal string with two places, for example "16550.00".
fta_contest_datestring (date) or nullsource
fta_final_order_datestring (date) or nullsource
hazsub1string or nullsource
hazsub2string or nullsource
hazsub3string or nullsource
hazsub4string or nullsource
hazsub5string or nullsource

CitationRevision

FieldTypeProvenanceDescription
fieldstringCitation field that changed.
old_valueobjectValue before, as JSON (string, number or null).
old_value_withheldbooleanTrue when old_value is null because the withholding rule of the field applies.
new_valueobjectValue after, as JSON (string, number or null).
new_value_withheldbooleanTrue when new_value is null because the withholding rule of the field applies.
sourcestring or one of weekly_reconcileHow the change was detected.
detected_atstring (date-time)

Establishment

FieldTypeProvenanceDescription
establishment_idinteger (int64)derived
namestringnormalizedDisplay name of the grouping, as on the website.
naics_codestring or nullderived
total_inspectionsintegerderived
total_violationsintegerderived
total_penaltiesMoneysourceU.S. dollars as a decimal string with two places, for example "16550.00".
serious_countintegerderived
willful_countintegerderived
repeat_countintegerderived
other_countintegerderived
first_inspection_datestring (date) or nullderived
last_inspection_datestring (date) or nullderived
locationsarray of object

Status

FieldTypeProvenanceDescription
api_versionstring
data_as_ofstring (date) or nullSame as meta.data_as_of.
refreshed_atstring (date-time) or nullWhen these freshness figures were last computed; null if they have not been computed yet.
newest_inspection_openedstring (date) or nullNewest inspection open date, not after today.
noticestring or nullSet while DOL adds no new inspections, for example "DOL has added no new inspections since 2026-09-23. Records already published are still updated."