API Documentation
Access the federal OSHA enforcement database programmatically or via MCP agent tools.
Authentication
All API and MCP calls require an OSHACheck API key. Keys are available on Team and Enterprise plans.
Pass your key in the request header:
X-OSHACheck-Key: oc_live_your_key_here
Or as the api_key argument when calling MCP tools.
MCP (Model Context Protocol)
OSHACheck supports the MCP Streamable HTTP transport. Connect any MCP-compatible AI agent directly to federal OSHA data.
Example MCP initialize request:
POST https://oshacheck.org/api/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"clientInfo": { "name": "my-agent", "version": "1.0" }
}
}Tool: search_osha_records
Search the OSHA enforcement database for any US employer. Returns inspection history, violation details, risk score, and AI risk assessment.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
| company_name | string | Yes | Employer name. Partial matching applied automatically. |
| state | string | No | Two-letter state code e.g. "TX". Omit for all states. |
| date_from | string | No | MM/DD/YYYY. Default: 01/01/2010. |
| date_to | string | No | MM/DD/YYYY. Default: today. |
| case_status | string | No | "all" | "open" | "closed". Default: all. |
| max_results | number | No | Max inspections to return. Default: 50, max: 100. |
| api_key | string | Yes | Your OSHACheck API key. |
Example MCP call
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_osha_records",
"arguments": {
"company_name": "Acme Construction",
"state": "TX",
"date_from": "01/01/2020",
"max_results": 25,
"api_key": "oc_live_your_key_here"
}
}
}Response fields
{
"company_name": "Acme Construction",
"state": "TX",
"risk_score": 47,
"risk_level": "Moderate",
"total_inspections": 12,
"total_violations": 34,
"total_penalties": 28500,
"most_recent_inspection": "2024-03-15",
"ai_summary": "...",
"inspections": [...],
"search_period": { "from": "01/01/2020", "to": "05/26/2026" },
"source": "US Department of Labor OSHA Enforcement Database",
"data_retrieved_at": "2026-05-26T14:32:00Z",
"report_url": "https://oshacheck.org/search/abc-123"
}Tool: get_report
Retrieve a previously generated OSHACheck report by its search ID.
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "get_report",
"arguments": {
"search_id": "abc-123-def-456",
"api_key": "oc_live_your_key_here"
}
}
}Rate Limits & Credits
| Plan | Credits / month | API keys | Price |
|---|---|---|---|
| Business | 400 credits/month | Up to 3 keys | $799/month |
| Enterprise | 1,500 credits/month | Up to 10 keys | $2,499/month |
Each successful search_osha_records call consumes one search credit. get_report calls are free.