{
  "openapi": "3.0.1",
  "info": {
    "title": "DOL Enforcement Rollup — Employer Wage-Theft Violator API",
    "description": "Roll up US Department of Labor enforcement actions by employer. Aggregates WHD wage-theft cases (back wages, penalties, employees affected) with optional EBSA/ERISA into per-employer summaries and repeat-violator flags.",
    "version": "1.0",
    "x-build-id": "4fuR6RM9QFTBy7KgX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~dol-enforcement-rollup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-dol-enforcement-rollup",
        "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~dol-enforcement-rollup/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-dol-enforcement-rollup",
        "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~dol-enforcement-rollup/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-dol-enforcement-rollup",
        "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": {
          "apiKey": {
            "title": "DOL API key",
            "type": "string",
            "description": "Your free U.S. Department of Labor Open Data API key. Register at https://dataportal.dol.gov/registration (instant, free) and paste the key here. Can also be supplied via the DOL_API_KEY environment variable. Required — the DOL data endpoint rejects unauthenticated requests."
          },
          "mode": {
            "title": "Output granularity",
            "enum": [
              "rollup",
              "cases"
            ],
            "type": "string",
            "description": "\"rollup\" returns one aggregated row per employer (total back wages, total cases, employees affected, finding date range, agency list, repeat_violator flag). \"cases\" returns one normalized row per individual enforcement case.",
            "default": "rollup"
          },
          "sources": {
            "title": "Enforcement sources",
            "type": "array",
            "description": "Which DOL agencies to pull. Empty = WHD only (Wage and Hour Division — the shippable default). Add EBSA to include ERISA Form 5500 penalty cases (OCATS). OFCCP is scaffolded but not yet enabled.",
            "items": {
              "type": "string",
              "enum": [
                "WHD",
                "EBSA"
              ],
              "enumTitles": [
                "WHD — Wage & Hour Division",
                "EBSA — ERISA Form 5500 penalties"
              ]
            },
            "default": []
          },
          "employer": {
            "title": "Employer name (contains)",
            "type": "string",
            "description": "Optional. Case-insensitive substring matched against the employer trade name and legal name (e.g. \"walmart\", \"tyson foods\"). Leave blank to return all employers."
          },
          "state": {
            "title": "State (2-letter code)",
            "type": "string",
            "description": "Optional. Filter to employers in a single US state by its 2-letter postal code (e.g. \"CA\", \"TX\", \"NY\")."
          },
          "naics": {
            "title": "NAICS code prefix",
            "type": "string",
            "description": "Optional. Filter by industry NAICS code prefix (e.g. \"722\" for food service, \"23\" for construction). Matches codes that start with this value."
          },
          "sinceDate": {
            "title": "Findings since (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. Only include cases whose findings end date is after this date (e.g. \"2023-01-01\"). Use it to pull only recent enforcement activity."
          },
          "repeatThreshold": {
            "title": "Repeat-violator threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "In rollup mode, an employer is flagged repeat_violator when its total case count is greater than this value (default 1 = more than one case). Any case carrying a WHD repeat/willful flag also sets it true.",
            "default": 1
          },
          "maxResults": {
            "title": "Max cases per source",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Cap on the number of raw enforcement cases fetched PER source before rollup. Lower it for quick tests; raise it for a full pull.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}