Developer Docs

Oshify API

Free access to OSHA and BLS workplace safety data. No API key required.

Quick Reference

MethodEndpointDescription
GET/api/naicsReturns all NAICS sector codes with names, descriptions, and 3-digit subsector lists.
GET/api/injury-ratesReturns BLS SOII injury and illness rate data by NAICS sector.

Endpoints

GET/api/naics

Returns all NAICS sector codes with names, descriptions, and 3-digit subsector lists. Filter to a single sector using the optional `sector` parameter.

Parameters

sectorstringoptional

Filter by NAICS sector code (e.g. "23", "31-33", "62"). Returns a single sector object when provided.

Example Request

GET /api/naics?sector=23

Example Response

{
  "data": {
    "code": "23",
    "name": "Construction",
    "description": "Establishments primarily engaged in...",
    "subsectors": [
      { "code": "236", "name": "Construction of Buildings" },
      { "code": "237", "name": "Heavy and Civil Engineering Construction" },
      { "code": "238", "name": "Specialty Trade Contractors" }
    ]
  },
  "meta": {
    "source": "U.S. Census Bureau NAICS 2022",
    "total_sectors": 20,
    "total_subsectors": 99,
    "api_version": "1.0",
    "docs": "https://oshify.com/api-docs"
  }
}
GET/api/injury-rates

Returns BLS SOII injury and illness rate data by NAICS sector. Includes Total Recordable Incident Rate (TRIR), DART rate, and Days Away from Work rate. Omit `naics` to return all sectors.

Parameters

naicsstringoptional

Filter by NAICS sector code (e.g. "23", "62"). Omit to return all sectors.

yearstringoptional

Reference year for injury data. Supported: 2019, 2020, 2021, 2022, 2023. Defaults to 2023.

Example Request

GET /api/injury-rates?naics=23&year=2023

Example Response

{
  "data": {
    "naics": "23",
    "year": 2023,
    "industry": "Construction",
    "trir": 3.5,
    "dart": 2.2,
    "lostWorkdayRate": 1.4,
    "source": "BLS SOII",
    "note": "Sample data — live BLS API integration coming soon"
  },
  "meta": {
    "year": 2023,
    "record_count": 1,
    "source": "BLS Survey of Occupational Injuries and Illnesses (SOII)",
    "source_url": "https://www.bls.gov/iif/soii-data.htm",
    "note": "Sample data — live BLS API integration in development",
    "api_version": "1.0",
    "docs": "https://oshify.com/api-docs"
  }
}

Data Sources

NAICS
U.S. Census Bureau NAICS 2022
North American Industry Classification System, 2022 revision. 20 top-level sectors, 99 3-digit subsectors covered.
BLS SOII
Bureau of Labor Statistics — Survey of Occupational Injuries and Illnesses
Annual survey providing estimates of nonfatal workplace injuries and illnesses. TRIR, DART, and DAFW rates by industry. Live BLS API integration in development.
OSHA
OSHA Enforcement Database
Inspection, citation, and penalty records published by OSHA. Enforcement data endpoint coming soon.

Usage & Rate Limits

No API key required. All endpoints are publicly accessible.

Rate limiting is coming soon. Please keep requests to a reasonable volume in the interim.

Data is provided for informational purposes. Always verify safety data against official BLS and OSHA publications.

Questions or integrations? Contact us