{
  "openapi": "3.0.1",
  "info": {
    "title": "Company Departures - People Who Left, by Domain",
    "description": "Former employees by company domain: give company domains, get one row per person who left, with previous title, year or month they left, and current title and company when on file. Free plan: 100 domains per run. Pay per departure delivered. No login or cookies.",
    "version": "0.1",
    "x-build-id": "KpehBUNP1aumuNIjc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2bdata~departures-by-company/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2bdata-departures-by-company",
        "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/b2bdata~departures-by-company/runs": {
      "post": {
        "operationId": "runs-sync-b2bdata-departures-by-company",
        "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/b2bdata~departures-by-company/run-sync": {
      "post": {
        "operationId": "run-sync-b2bdata-departures-by-company",
        "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",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "title": "Which companies did they leave? (domains, website URLs or emails)",
            "type": "array",
            "description": "Company domains to list former employees for. Example: [\"stripe.com\", \"https://www.openai.com/about\", \"jane@microsoft.com\"]. A website URL or an email address is reduced to its domain; a company name is not a domain and is listed in the MISSES record as invalid_domain. Each domain is looked up once; repeats are listed in MISSES as duplicate_input. A domain with no company on file, or nobody who left in the window, returns one free notice row. Free plan: 100 domains per run.",
            "items": {
              "type": "string"
            }
          },
          "leftAfterYear": {
            "title": "Left in or after which year?",
            "minimum": 1990,
            "type": "integer",
            "description": "Keep people whose position at the company ended in this calendar year or later. Example: 2024. Omit for last year (a run in 2026 uses 2025). The match is by year: a person who left in December of the year before is not in, one who left in January of that year is. Range 1990 to the current year."
          },
          "titleRoles": {
            "title": "Current seniority filter (optional)",
            "type": "array",
            "description": "Keep only people whose CURRENT role has one of these seniority levels, for example people who left and are now VPs: [\"cxo\", \"vp\"]. It does not filter the role they had at the company they left. Leave empty for everyone. Levels: cxo, vp, director, manager, founder, other. People with no current job on file are dropped when this is set.",
            "items": {
              "type": "string",
              "enum": [
                "cxo",
                "vp",
                "director",
                "manager",
                "founder",
                "other"
              ],
              "enumTitles": [
                "C-level (cxo)",
                "VP",
                "Director",
                "Manager",
                "Founder",
                "Other (everyone else)"
              ]
            }
          },
          "countries": {
            "title": "Where do they live now? Country codes (optional)",
            "type": "array",
            "description": "Two-letter country codes of the person's profile location, up to 60. Example: [\"us\", \"gb\", \"au\"]. Omit to search North America, Europe and Asia. People whose profile names no country, and people in Africa, South America and Oceania, are only found when you list their countries here.",
            "items": {
              "type": "string"
            }
          },
          "includePreviousRole": {
            "title": "Add previous title and month left",
            "type": "boolean",
            "description": "On (default): each person's profile is read to add previousTitle, leftYear and leftMonth from their position at the company. Off: faster, and rows carry only the departure itself and the current job. A person whose profile still shows an open position at that company is dropped, free.",
            "default": true
          },
          "maxPeoplePerDomain": {
            "title": "Max departures per domain",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most departures delivered for any one domain, so a large employer cannot use up your run. Default 100, maximum 1000.",
            "default": 100
          },
          "limit": {
            "title": "Max departures in total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most departures delivered in the whole run, which also caps what is charged. Domains not reached are listed in MISSES and are not charged. Default 100, maximum 10000.",
            "default": 100
          },
          "includePhones": {
            "title": "Add phone numbers (add-on)",
            "type": "boolean",
            "description": "Adds a phone number to each person who has one on record. Charged per person with a phone: $0.005 on the Free plan ($4.996 per 1,000), less on higher plans. People without a phone cost nothing extra. Off by default.",
            "default": false
          },
          "includeEmails": {
            "title": "Add work emails (add-on)",
            "type": "boolean",
            "description": "Adds a work email to each person who has one on record. Charged per person with an email: $0.00096 on the Free plan ($0.963 per 1,000), less on higher plans. People without an email cost nothing extra. Off by default.",
            "default": false
          },
          "includeAudit": {
            "title": "Include audit fields",
            "type": "boolean",
            "description": "Adds requestId, latencyMs and inputRaw to each row under audit. Omit for clean rows.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}