{
  "swagger": "2.0",
  "info": {
    "title": "AI Layoffs",
    "version": "1.0.0",
    "description": "New US WARN notices and job cuts recorded worldwide, and any company's layoffs by web domain, ticker or name, from AI Layoffs (ailayoffs.org). A free 30-day key is at https://ailayoffs.org/integrations. After the trial the WARN and layoff lists stay on with layoff alerts ($29 a month, or $290 a year); company lookups: $0.04 per lookup that returns a company; lookups that find nothing are free.",
    "contact": {
      "name": "AI Layoffs",
      "url": "https://ailayoffs.org/integrations",
      "email": "hello@ailayoffs.org"
    }
  },
  "host": "ailayoffs.org",
  "basePath": "/api/v1",
  "schemes": [
    "https"
  ],
  "consumes": [],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "X-API-Key",
      "description": "Your AI Layoffs key, from https://ailayoffs.org/integrations"
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/warn-notices": {
      "get": {
        "operationId": "ListWarnNotices",
        "summary": "List new WARN notices",
        "description": "US WARN notices of layoffs and closures, newest first, the day after a state publishes them. Keep each notice's ID to skip the ones already handled.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "States",
            "description": "Two-letter state codes, comma-separated (TX,CA). Empty for every state.",
            "x-ms-visibility": "important"
          },
          {
            "name": "min_jobs",
            "in": "query",
            "required": false,
            "type": "integer",
            "x-ms-summary": "Minimum jobs",
            "description": "Only notices stating at least this many jobs",
            "x-ms-visibility": "important"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "First read since",
            "description": "Notices first read on or after this day (YYYY-MM-DD, up to 90 days back)",
            "format": "date"
          },
          {
            "name": "company",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Employer contains",
            "description": "Words the employer's name holds"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "x-ms-summary": "Limit",
            "description": "At most this many (default 50, up to 200)",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "The notices",
            "schema": {
              "type": "object",
              "properties": {
                "notices": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable id of the notice: keep it to skip notices already handled",
                        "x-ms-summary": "Notice ID"
                      },
                      "employer": {
                        "type": "string",
                        "description": "The employer as the notice names it",
                        "x-ms-summary": "Employer"
                      },
                      "state": {
                        "type": "string",
                        "description": "Two-letter US state code",
                        "x-ms-summary": "State code"
                      },
                      "state_name": {
                        "type": "string",
                        "description": "The state's name",
                        "x-ms-summary": "State"
                      },
                      "location": {
                        "type": "string",
                        "description": "The site, as the notice names it",
                        "x-nullable": true,
                        "x-ms-summary": "Site"
                      },
                      "notice_date": {
                        "type": "string",
                        "description": "The date on the notice",
                        "x-nullable": true,
                        "format": "date",
                        "x-ms-summary": "Notice date"
                      },
                      "effective_date": {
                        "type": "string",
                        "description": "When the layoff or closure takes effect",
                        "x-nullable": true,
                        "format": "date",
                        "x-ms-summary": "Layoffs from"
                      },
                      "jobs": {
                        "type": "integer",
                        "description": "Jobs the notice states",
                        "x-nullable": true,
                        "x-ms-summary": "Jobs"
                      },
                      "closure": {
                        "type": "boolean",
                        "description": "Whether the site closes",
                        "x-nullable": true,
                        "x-ms-summary": "Closure"
                      },
                      "temporary": {
                        "type": "boolean",
                        "description": "Whether the layoff is temporary",
                        "x-nullable": true,
                        "x-ms-summary": "Temporary"
                      },
                      "amendment": {
                        "type": "boolean",
                        "description": "Whether the notice amends an earlier one",
                        "x-ms-summary": "Amendment"
                      },
                      "first_seen_at": {
                        "type": "string",
                        "description": "When AI Layoffs first read the notice",
                        "format": "date-time",
                        "x-ms-summary": "First read"
                      },
                      "page_url": {
                        "type": "string",
                        "description": "The state's page on AI Layoffs",
                        "x-nullable": true,
                        "x-ms-summary": "State page"
                      },
                      "source_name": {
                        "type": "string",
                        "description": "The state's WARN list",
                        "x-nullable": true,
                        "x-ms-summary": "Source"
                      },
                      "source_url": {
                        "type": "string",
                        "description": "The state's own WARN page",
                        "x-nullable": true,
                        "x-ms-summary": "Source URL"
                      }
                    }
                  },
                  "x-ms-summary": "Notices"
                },
                "count": {
                  "type": "integer",
                  "x-ms-summary": "Count"
                }
              }
            }
          },
          "401": {
            "description": "Not a valid key"
          },
          "403": {
            "description": "The key's trial has ended without layoff alerts"
          }
        }
      }
    },
    "/layoffs": {
      "get": {
        "operationId": "ListLayoffs",
        "summary": "List new layoffs",
        "description": "Job cuts recorded worldwide, newest first, with the roles, the country, what the employer said about AI and the source.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "ai_only",
            "in": "query",
            "required": false,
            "type": "boolean",
            "x-ms-summary": "Only cuts linked to AI",
            "description": "true for the cuts linked to AI only",
            "x-ms-visibility": "important"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Country",
            "description": "A country as the register names it (United States, Germany)"
          },
          {
            "name": "company",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Employer contains",
            "description": "Words the employer's name holds"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "x-ms-summary": "Limit",
            "description": "At most this many (default 50, up to 200)",
            "x-ms-visibility": "advanced"
          }
        ],
        "responses": {
          "200": {
            "description": "The cuts",
            "schema": {
              "type": "object",
              "properties": {
                "layoffs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Stable id of the cut: keep it to skip cuts already handled",
                        "x-ms-summary": "Job cut ID"
                      },
                      "company": {
                        "type": "string",
                        "description": "The employer",
                        "x-ms-summary": "Company"
                      },
                      "announced_on": {
                        "type": "string",
                        "description": "When the cut was announced",
                        "format": "date",
                        "x-ms-summary": "Announced on"
                      },
                      "recorded_on": {
                        "type": "string",
                        "description": "When the cut appeared on AI Layoffs",
                        "format": "date",
                        "x-ms-summary": "Recorded on"
                      },
                      "roles": {
                        "type": "integer",
                        "description": "Roles cut",
                        "x-nullable": true,
                        "x-ms-summary": "Roles"
                      },
                      "roles_note": {
                        "type": "string",
                        "description": "What the roles figure is",
                        "x-nullable": true,
                        "x-ms-summary": "Roles note"
                      },
                      "linked_to_ai": {
                        "type": "boolean",
                        "description": "Linked to AI by the employer or by credible reporting",
                        "x-ms-summary": "Linked to AI"
                      },
                      "what_the_employer_said": {
                        "type": "string",
                        "description": "What the employer said about AI",
                        "x-ms-summary": "What the employer said"
                      },
                      "country": {
                        "type": "string",
                        "description": "The country of the cut",
                        "x-nullable": true,
                        "x-ms-summary": "Country"
                      },
                      "ticker": {
                        "type": "string",
                        "description": "The employer's stock symbol",
                        "x-nullable": true,
                        "x-ms-summary": "Ticker"
                      },
                      "summary": {
                        "type": "string",
                        "description": "What was cut, in one or two sentences",
                        "x-ms-summary": "Summary"
                      },
                      "page_url": {
                        "type": "string",
                        "description": "The company's page on AI Layoffs",
                        "x-ms-summary": "Company page"
                      },
                      "source_name": {
                        "type": "string",
                        "description": "Who reported or published it",
                        "x-ms-summary": "Source"
                      },
                      "source_url": {
                        "type": "string",
                        "description": "The source",
                        "x-ms-summary": "Source URL"
                      }
                    }
                  },
                  "x-ms-summary": "Layoffs"
                },
                "count": {
                  "type": "integer",
                  "x-ms-summary": "Count"
                }
              }
            }
          },
          "401": {
            "description": "Not a valid key"
          },
          "403": {
            "description": "The key's trial has ended without layoff alerts"
          }
        }
      }
    },
    "/company": {
      "get": {
        "operationId": "FindCompanyLayoffs",
        "summary": "Find company layoffs",
        "description": "One company's job cuts and its US WARN notices since 2019, by web domain, ticker or name. A lookup that finds nothing is free; after the trial, $0.04 per lookup that returns a company; lookups that find nothing are free.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Web domain",
            "description": "A web domain, URL or email address (salesforce.com)",
            "x-ms-visibility": "important"
          },
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Ticker",
            "description": "A stock symbol (CRM)"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "type": "string",
            "x-ms-summary": "Company name",
            "description": "A company name, also an employer that is not listed"
          }
        ],
        "responses": {
          "200": {
            "description": "The company's record, or matched false",
            "schema": {
              "type": "object",
              "properties": {
                "matched": {
                  "type": "boolean",
                  "description": "False when the data holds nothing for the company (such a lookup is free)",
                  "x-ms-summary": "Matched"
                },
                "company": {
                  "type": "string",
                  "description": "The company",
                  "x-ms-summary": "Company"
                },
                "summary": {
                  "type": "object",
                  "x-ms-summary": "Summary",
                  "properties": {
                    "job_cuts": {
                      "type": "integer",
                      "x-ms-summary": "Job cuts"
                    },
                    "job_cuts_linked_to_ai": {
                      "type": "integer",
                      "x-ms-summary": "Job cuts linked to AI"
                    },
                    "latest_job_cut": {
                      "type": "string",
                      "description": "Date of the latest job cut",
                      "x-nullable": true,
                      "format": "date",
                      "x-ms-summary": "Latest job cut"
                    },
                    "warn_notices": {
                      "type": "integer",
                      "x-ms-summary": "WARN notices"
                    },
                    "warn_jobs": {
                      "type": "integer",
                      "x-ms-summary": "Jobs in WARN notices"
                    },
                    "latest_warn_notice": {
                      "type": "string",
                      "description": "Date of the latest WARN notice",
                      "x-nullable": true,
                      "format": "date",
                      "x-ms-summary": "Latest WARN notice"
                    }
                  }
                },
                "pages": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "x-ms-summary": "Pages on AI Layoffs"
                },
                "job_cuts": {
                  "type": "array",
                  "x-ms-summary": "Job cuts",
                  "items": {
                    "type": "object",
                    "properties": {
                      "announced": {
                        "type": "string",
                        "format": "date",
                        "x-ms-summary": "Announced"
                      },
                      "country": {
                        "type": "string",
                        "description": "Country",
                        "x-nullable": true,
                        "x-ms-summary": "Country"
                      },
                      "roles": {
                        "type": "integer",
                        "description": "Roles",
                        "x-nullable": true,
                        "x-ms-summary": "Roles"
                      },
                      "linked_to_ai": {
                        "type": "boolean",
                        "x-ms-summary": "Linked to AI"
                      },
                      "what_the_employer_said": {
                        "type": "string",
                        "x-ms-summary": "What the employer said"
                      },
                      "source": {
                        "type": "string",
                        "x-ms-summary": "Source"
                      },
                      "source_url": {
                        "type": "string",
                        "x-ms-summary": "Source URL"
                      }
                    }
                  }
                },
                "warn_notices": {
                  "type": "array",
                  "x-ms-summary": "WARN notices",
                  "items": {
                    "type": "object",
                    "properties": {
                      "employer_as_filed": {
                        "type": "string",
                        "x-ms-summary": "Employer as filed"
                      },
                      "state": {
                        "type": "string",
                        "x-ms-summary": "State"
                      },
                      "location": {
                        "type": "string",
                        "x-ms-summary": "Site"
                      },
                      "notice_date": {
                        "type": "string",
                        "format": "date",
                        "x-ms-summary": "Notice date"
                      },
                      "effective_date": {
                        "type": "string",
                        "format": "date",
                        "x-ms-summary": "Layoffs from"
                      },
                      "jobs": {
                        "type": "integer",
                        "description": "Jobs",
                        "x-nullable": true,
                        "x-ms-summary": "Jobs"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "None of domain, ticker or name was sent"
          },
          "401": {
            "description": "Not a valid key"
          },
          "403": {
            "description": "The key's trial or licence has ended"
          }
        }
      }
    },
    "/me": {
      "get": {
        "operationId": "TestConnection",
        "summary": "Test the connection",
        "description": "Whose key this is, its plan and when it ends.",
        "x-ms-visibility": "internal",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The key's account"
          },
          "401": {
            "description": "Not a valid key"
          }
        }
      }
    }
  },
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://ailayoffs.org"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://ailayoffs.org/legal/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Data;Sales and CRM"
    }
  ]
}