{
  "openapi": "3.0.1",
  "info": {
    "title": "California WARN Layoff Notices – EDD Closures & Layoffs Feed",
    "description": "California WARN Act layoff, closure and relocation notices from the official EDD report: company, address, city, county, notice/effective dates, employees affected and NAICS industry. Filters, onlyNew mode for schedules. $1 per 1,000 notices.",
    "version": "0.1",
    "x-build-id": "p8p1EzFCzt4CDgbYe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~warn-layoff-notices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-warn-layoff-notices",
        "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/gazidev~warn-layoff-notices/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-warn-layoff-notices",
        "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/gazidev~warn-layoff-notices/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-warn-layoff-notices",
        "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": "This version covers California (CA) only, from the official EDD WARN report. Other states are ignored with a warning.",
            "items": {
              "type": "string",
              "enum": [
                "CA"
              ],
              "enumTitles": [
                "California (EDD)"
              ]
            },
            "default": [
              "CA"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices whose date (see 'Date to filter on') is within this many days of today. 0 = the whole file. The EDD file holds the current programme year (from 1 July).",
            "default": 30
          },
          "dateField": {
            "title": "Date to filter on",
            "enum": [
              "processedDate",
              "noticeDate",
              "effectiveDate"
            ],
            "type": "string",
            "description": "Which date 'Days back' and the sort order use. 'Processed date' is when EDD received/processed the notice (best for a daily feed).",
            "default": "processedDate"
          },
          "minEmployees": {
            "title": "Minimum employees affected",
            "minimum": 0,
            "type": "integer",
            "description": "Skip notices with fewer affected employees. 0 = no minimum.",
            "default": 0
          },
          "layoffTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "Layoff",
                "Closure",
                "Relocation"
              ],
              "enumTitles": [
                "Layoff",
                "Closure",
                "Relocation"
              ]
            }
          },
          "permanence": {
            "title": "Permanent or temporary",
            "enum": [
              "any",
              "permanent",
              "temporary"
            ],
            "type": "string",
            "description": "Filter on the 'Permanent / Temporary' part of the EDD notice type. Some notices say 'Not known at this time'.",
            "default": "any"
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Optional California counties, e.g. 'Los Angeles', 'Santa Clara' ('County' is optional). Leave empty for the whole state.",
            "items": {
              "type": "string"
            }
          },
          "industries": {
            "title": "Industries (NAICS)",
            "type": "array",
            "description": "Optional. Matches the NAICS sector code or label EDD gives, e.g. '31-33', 'Manufacturing', 'Health', 'Information'.",
            "items": {
              "type": "string"
            }
          },
          "companyContains": {
            "title": "Company name contains",
            "type": "array",
            "description": "Optional keywords; a notice is kept when its company name contains any of them (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "onlyUpcoming": {
            "title": "Only upcoming layoffs",
            "type": "boolean",
            "description": "Keep only notices whose effective date is today or later.",
            "default": false
          },
          "fallbackToLatest": {
            "title": "If nothing is in the date window, return the latest notices",
            "type": "boolean",
            "description": "When 'Days back' finds no notice (e.g. in early July, when EDD starts a new programme-year file), output up to 10 of the latest notices matching your other filters instead, from the current file or from EDD's previous programme-year report (PDF; no industry field). Rows get fallback: true. Off = return nothing. Never used with onlyNew.",
            "default": true
          },
          "includeCallCenterRelocations": {
            "title": "Include call-center relocation notices",
            "type": "boolean",
            "description": "Also read EDD's separate call-center relocation sheet (covers 2023 onwards, usually a handful of rows).",
            "default": false
          },
          "onlyNew": {
            "title": "Only new notices (for schedules)",
            "type": "boolean",
            "description": "Remember notices already output in a named key-value store and output (and charge) only notices not seen in earlier runs.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory store name (onlyNew)",
            "type": "string",
            "description": "Name of the key-value store in your account that remembers seen notices. Use a different name per schedule/filter set.",
            "default": "warn-layoff-notices-seen"
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on notices output (newest first). 0 = no cap.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}