{
  "openapi": "3.0.1",
  "info": {
    "title": "OSHA Injury Data Scraper - US Employer & Workplace-Safety Leads",
    "description": "Scrape OSHA ITA Form 300A injury data: every US establishment that filed an annual injury summary — name, EIN, address, NAICS, employee count, injury counts, TRIR/DART rates & lead score. Filter by state, NAICS, size & injury rate. Firmographic B2B leads + monitoring, no browser.",
    "version": "0.1",
    "x-build-id": "ZKeuuc5rRIgq7VS7I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~osha-injury-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-osha-injury-data-scraper",
        "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/scrapesage~osha-injury-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-osha-injury-data-scraper",
        "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/scrapesage~osha-injury-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-osha-injury-data-scraper",
        "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",
        "properties": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Filter to one or more US states by 2-letter code (e.g. `TX`, `CA`, `OH`). Leave empty to scan the whole national file.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by city name (case-insensitive, substring match).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Filter by ZIP code. A 5-digit value matches exactly; a shorter prefix (e.g. `770`) matches a region.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes / prefixes",
            "type": "array",
            "description": "Filter by NAICS industry code. A prefix matches a whole branch — e.g. `23` = all construction, `2382` = building-equipment contractors, `311` = food manufacturing.",
            "items": {
              "type": "string"
            }
          },
          "naicsSectors": {
            "title": "NAICS sectors (2-digit)",
            "type": "array",
            "description": "Quick filter by top-level NAICS sector. Examples: `23` Construction, `31`/`32`/`33` Manufacturing, `48`/`49` Transportation & Warehousing, `62` Health Care, `21` Mining/Oil & Gas, `22` Utilities.",
            "items": {
              "type": "string"
            }
          },
          "industryQuery": {
            "title": "Industry contains",
            "type": "string",
            "description": "Free-text filter on the industry description (e.g. `roofing`, `nursing`, `warehousing`, `meat`)."
          },
          "companyNameQuery": {
            "title": "Establishment / company name contains",
            "type": "string",
            "description": "Filter to establishments whose establishment name or company name contains this text (case-insensitive)."
          },
          "establishmentTypes": {
            "title": "Establishment type",
            "type": "array",
            "description": "Keep only private, state-government or local-government establishments.",
            "items": {
              "type": "string",
              "enum": [
                "private",
                "stateGovernment",
                "localGovernment"
              ],
              "enumTitles": [
                "Private industry",
                "State government",
                "Local government"
              ]
            }
          },
          "minEmployees": {
            "title": "Minimum employees",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only establishments with at least this many annual-average employees. Great for targeting larger employers with bigger budgets."
          },
          "maxEmployees": {
            "title": "Maximum employees",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only establishments with at most this many annual-average employees."
          },
          "minRecordableCases": {
            "title": "Minimum recordable cases",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only establishments reporting at least this many total OSHA-recordable cases for the year."
          },
          "minTrir": {
            "title": "Minimum TRIR",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only establishments with a Total Recordable Incident Rate at or above this value (cases per 100 full-time workers). The US private-industry average is ~2.7 — set 4–8 to find high-injury sites."
          },
          "hasInjuriesOnly": {
            "title": "Only establishments with recordable injuries",
            "type": "boolean",
            "description": "Keep only establishments that reported at least one recordable injury or illness.",
            "default": false
          },
          "hasFatalitiesOnly": {
            "title": "Only establishments with a fatality",
            "type": "boolean",
            "description": "Keep only establishments that reported one or more work-related deaths.",
            "default": false
          },
          "hasLostTimeOnly": {
            "title": "Only establishments with lost-time cases",
            "type": "boolean",
            "description": "Keep only establishments with days-away or job-transfer/restriction (DART) cases.",
            "default": false
          },
          "withEinOnly": {
            "title": "Only establishments with an EIN",
            "type": "boolean",
            "description": "Keep only records that include the employer EIN (useful for B2B record matching).",
            "default": false
          },
          "minLeadScore": {
            "title": "Minimum lead score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only establishments with a lead score (0–100) at or above this value."
          },
          "yearFilingFor": {
            "title": "Filing year",
            "type": "integer",
            "description": "Which reporting year to scrape (the year the Form 300A summarizes). Leave empty for the latest year available. Years 2016–present are published by OSHA."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "leadScore",
              "employeesHigh",
              "trirHigh",
              "recordableCasesHigh",
              "lostWorkdaysHigh",
              "fatalities",
              "name",
              "none"
            ],
            "type": "string",
            "description": "Order of returned records (the cap is applied after sorting).",
            "default": "leadScore"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of establishment records to return. The full national file holds roughly 350,000+ establishments per year.",
            "default": 1000
          },
          "deduplicateResults": {
            "title": "Deduplicate",
            "type": "boolean",
            "description": "Drop duplicate establishments (by OSHA establishment ID) within a run, keeping the first seen.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new establishments)",
            "type": "boolean",
            "description": "Remember establishments seen in previous runs (per Monitor key) and only output NEW ones. Ideal with Apify Schedules for a fresh-leads feed as more employers file each year. Works independently of the platform scheduler.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the saved monitor state, so different filter sets keep separate memories. Use a distinct key per saved search.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The OSHA open-data files are public and download fine without a proxy (the default). If a run is blocked, enable Apify Proxy — the actor automatically escalates to US residential when needed.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}