{
  "openapi": "3.0.1",
  "info": {
    "title": "WARN Layoff Notices: 7 States (TX CA WA OR MD VA NC) $3/1k",
    "description": "WARN Act layoff notices (company layoffs and closures) from 7 official state sources (TX, CA, WA, OR, MD, VA, NC). Filter by notice-date window, workers affected, closures only. Employer, headcount, dates, closure flag. New-since-last-run for alerts. CSV, JSON, API. $0.003 per notice.",
    "version": "0.1",
    "x-build-id": "MPK7NRZcUet4Egixw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~warn-layoff-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-warn-layoff-alerts",
        "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/transparent_meteorite~warn-layoff-alerts/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-warn-layoff-alerts",
        "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/transparent_meteorite~warn-layoff-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-warn-layoff-alerts",
        "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 (2-letter)",
            "type": "array",
            "description": "States to pull (2-letter codes). Supported: TX (Texas open data), OR (Oregon HECC tracker), CA (California EDD current-quarter report), WA (Washington ESD database), MD (Maryland DLLR), VA (Virginia VEC/VirginiaWorks), NC (North Carolina Commerce), MI (Michigan LEO). Any other code is skipped with a note in the log. Oregon rows include notices that Oregon filed for multi-state employers; the row's state field is the actual layoff location when the tracker gives one, and source_state is OR.",
            "default": [
              "TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Notices from the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only notices with a notice date in the last N days (max 365). The Texas open-data feed is updated irregularly, so the default is a full year to make sure you always see the latest filings.",
            "default": 365
          },
          "noticeDateFrom": {
            "title": "Notice date from (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices filed on or after this date, YYYY-MM-DD. Overrides 'Notices from the last N days'. Use with 'to' for an exact window."
          },
          "noticeDateTo": {
            "title": "Notice date to (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only notices filed on or before this date, YYYY-MM-DD (inclusive). Leave empty for no upper bound."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on notices returned, and charged, in this run. Each notice is $0.003, so 50 notices = $0.15.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since last run (deduped)",
            "type": "boolean",
            "description": "Skip notices you already received in an earlier run (matched by employer + notice date + city), so a schedule never charges twice for the same notice. Turn off to re-pull the same window.",
            "default": true
          },
          "minLayoffCount": {
            "title": "Minimum layoff count",
            "minimum": 0,
            "type": "integer",
            "description": "Same as 'Minimum affected workers' (kept for older saved tasks). 0 = no minimum.",
            "default": 0
          },
          "minAffectedWorkers": {
            "title": "Minimum affected workers",
            "minimum": 0,
            "type": "integer",
            "description": "Only notices affecting at least this many workers. 0 = no minimum. Same filter as 'Minimum layoff count' (the larger of the two applies). Try 100 for large layoffs only.",
            "default": 0
          },
          "onlyClosures": {
            "title": "Only plant and business closures",
            "type": "boolean",
            "description": "Keep only notices whose filed type says closure, shutdown or relocation (CA, WA, OR, MD, VA, NC, MI publish a type). Texas publishes no type, so Texas rows are skipped when this is on.",
            "default": false
          },
          "apolloApiKey": {
            "title": "Apollo API key (optional)",
            "type": "string",
            "description": "Your Apollo.io API key. When set, each notice gets the employer's website domain and main phone from an Apollo company search (company-level only, no personal emails). Uses your Apollo credits, and adds a separate $0.05 charge only when a domain or phone is actually found. Can also be set with the APOLLO_API_KEY environment variable."
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Free app token from data.texas.gov. Only needed for very frequent pulls. Can also be set with the SOCRATA_APP_TOKEN environment variable."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Optional. Delivered notices are POSTed here as JSON batches: { source, count, records: [...] }. Works with any n8n, Make or Zapier webhook.",
            "default": ""
          },
          "webhookBatchSize": {
            "title": "Webhook batch size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Records per webhook POST.",
            "default": 100
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}