HazardLedger API

Programmatic access to the same Safety Scores and OSHA record data the site shows. For teams screening vendors, contractors, or job sites at scale.

Authentication

Every request needs a Team API key. Send it as an X-API-Key header or as Authorization: Bearer <key>. Keys are metered per hour; the response returns 429 with a Retry-After header when you exceed your plan's rate.

Get an establishment

GET /api/v1/establishments/:id — returns the score, band, confidence, industry percentile, full inspection and citation history, and the multi-year injury trend for one establishment. Only publicly-scorable establishments (a strong or reviewed match) resolve; anything else returns 404.

curl -H "X-API-Key: hlk_your_key_here" \
  https://hazardledger.com/api/v1/establishments/EST_ID

Example response shape:

{
  "id": "…",
  "name": "…",
  "address": { "street": "…", "city": "…", "state": "TX", "zip": "…" },
  "naics_code": "238160",
  "industry": "Roofing Contractors",
  "score": 42,
  "band": "some_concerns",
  "confidence": "strong",
  "industry_percentile": 38,
  "inspection_count": 4,
  "inspections": [ /* activity_nr, open_date, type, scope, violations[] */ ],
  "injury_trend": [ /* per-year DART / TRC rates */ ],
  "source": "OSHA enforcement + ITA 300A"
}

What the API does not do

A score never depends on who is asking or whether they pay — the API returns the same verdict a free visitor sees, and no employer can buy a change to it. The exact weighting behind a score isn't part of the response; the methodology covers the factors, bands, and data sources.

Get a key

Team/API access is provisioned per account. Sign in to your account, then request a key.

Data is public OSHA enforcement + ITA Form 300A, benchmarked against BLS SOII industry averages. HazardLedger is independent and not affiliated with OSHA, the Department of Labor, or BLS.