{
  "openapi": "3.0.1",
  "info": {
    "title": "OSHA Injury & Illness Data (ITA Form 300A) Rate Monitor",
    "description": "Establishment-level OSHA Form 300A injury and illness data from the OSHA Injury Tracking Application (ITA), CY2016 onward. Total Case Rate and DART injury rates from OSHA's own formula, a peer-industry median benchmark computed from the filers themselves, and a year-over-year delta. Keyless.",
    "version": "1.0",
    "x-build-id": "49A9POOlI7RcB3xzb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~osha-ita-injury-illness-establishment-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-osha-ita-injury-illness-establishment-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/malonestar~osha-ita-injury-illness-establishment-monitor/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-osha-ita-injury-illness-establishment-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/malonestar~osha-ita-injury-illness-establishment-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-osha-ita-injury-illness-establishment-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "states",
          "years"
        ],
        "properties": {
          "states": {
            "title": "States (REQUIRED)",
            "type": "array",
            "description": "REQUIRED. Two-letter state codes to return establishments for, e.g. [\"CO\"] or [\"TX\",\"NM\"]. OSHA publishes roughly 400,000 establishment records per calendar year, so an unscoped national run is rejected before it starts rather than billed. Matching is case-insensitive on purpose: the CY2022 file carries 24 mixed-case spellings such as \"Fl\", \"ca\" and \"Co\", and a case-sensitive filter silently drops those establishments. OSHA also publishes AS, GU, MP, PR, VI and the military codes AA, AE and AP.",
            "items": {
              "type": "string"
            }
          },
          "years": {
            "title": "Calendar years (REQUIRED)",
            "type": "array",
            "description": "REQUIRED. Calendar years of Form 300A data, e.g. [\"2024\"]. OSHA collects one year at a time and publishes each year as a separate 12-85 MB download, so at most 3 years per run. Summary data exists from 2016 onward; the exact list of published years is read live from OSHA's own data page on every run and an unpublished year fails loudly with the list of years that do exist. In \"delta\" mode pass exactly one year — the prior year is fetched automatically.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "establishments",
              "delta"
            ],
            "type": "string",
            "description": "\"establishments\" returns one row per establishment per calendar year, with the OSHA-formula Total Case Rate and DART rate plus a peer-industry benchmark. \"delta\" compares the requested year against the year before it and returns one row per establishment with the rate change and a filing_status of continuing / new_filer / stopped_filing. Omitted = \"establishments\"."
          },
          "naicsPrefixes": {
            "title": "NAICS prefixes (optional filter)",
            "type": "array",
            "description": "Optional. Two- to six-digit NAICS prefixes, e.g. [\"23\"] for construction, [\"2382\"] for building-equipment contractors, [\"238310\"] for drywall contractors, [\"622\"] for hospitals. Matching is by PREFIX rather than exact code because OSHA stores three NAICS vintages side by side in the same file (2012, 2017 and 2022 codes all appear in CY2024, plus a \"0\" vintage sentinel), so an exact-code filter against one vintage's code list silently loses whole industries. Leave empty for all industries.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains (optional filter)",
            "type": "string",
            "description": "Optional. Case-insensitive substring matched against BOTH establishment_name and company_name, e.g. \"Kroger\" or \"Post Acute\". Useful for tracking one employer's whole establishment footprint across a state. Leave blank for all names."
          },
          "minEmployees": {
            "title": "Minimum annual average employees",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Optional. Keep only establishments reporting at least this many annual average employees. An establishment that reports no employee count is excluded when this is above 0, because an unreported count is not a small count. Note OSHA does not validate this figure — the CY2024 file contains a single establishment reporting 41,092,597 employees, which is flagged rather than corrected. Omitted or 0 = no employee filter."
          },
          "onlyWithRecordableCases": {
            "title": "Only establishments that recorded a case",
            "type": "boolean",
            "description": "When true, keep only establishments that reported at least one recordable case or death. Roughly 43% of CY2024 filers reported zero cases, and a zero-case filing is a real, meaningful answer, so this is off by default. Turning it on does not change any rate — it only narrows which establishments are returned and therefore what you are billed for.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on emitted rows — each row is one billed result. Enforced by a single audited code path for both modes plus a pre-push tripwire. When the cap bites, rows are ordered trustworthy-rate-first (an establishment reporting 547 employees against 6,571 hours produces an arithmetically valid but meaningless rate, and those sort below the sound ones rather than dominating the top of your results), and every emitted row carries results_truncated=true and matched_rows_total so a capped answer is never mistaken for a complete one. Omitted = 500."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}