{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Company Employee Role Filter",
    "description": "Find the decision makers inside a target account: scrape a company's people and keep only the titles you care about - CMO, Marketing Director, Head of HR. Requires your own li_at session cookie, because LinkedIn publishes no employee list to logged-out visitors.",
    "version": "0.0",
    "x-build-id": "qpAZ6IbpMlA9afpKd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~linkedin-company-employee-filter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-linkedin-company-employee-filter",
        "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/fanndev~linkedin-company-employee-filter/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-linkedin-company-employee-filter",
        "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/fanndev~linkedin-company-employee-filter/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-linkedin-company-employee-filter",
        "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": {
          "companyUrls": {
            "title": "Company pages",
            "type": "array",
            "description": "Target accounts. A full /company/ URL or just the slug both work. Note LinkedIn blocks /school/ pages entirely for logged-out visitors, so universities will not resolve here.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Company pages (request list)",
            "type": "array",
            "description": "The same company links in the request-list format, for callers that already keep one.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sessionCookie": {
            "title": "Your li_at session cookie (required for employees)",
            "type": "string",
            "description": "LinkedIn publishes NO employee list to logged-out visitors: /company/{slug}/people/ redirects to the login wall and the private API answers 403. Without this cookie the run still succeeds and returns each company's public record, but no people. To get it: sign in to LinkedIn in your browser, open DevTools > Application > Cookies > www.linkedin.com, copy the VALUE of li_at. This actor never asks for your password and never signs in on your behalf. Scraping while signed in breaches LinkedIn's User Agreement and accounts do get restricted - use one you are willing to risk, pair it with a residential proxy, and keep the caps low."
          },
          "roleKeywords": {
            "title": "Keep only these roles",
            "type": "array",
            "description": "Keywords matched as whole words against each person's headline - 'CMO', 'Marketing Director', 'Head of HR'. Whole-word matching is deliberate: a substring search for 'HR' would drag in every 'Chris' and 'Thread'. Multi-word entries match as a phrase. Leave empty to keep everyone. Giving exactly ONE keyword is cheapest, because it is passed to LinkedIn's own search and narrows results server-side; several keywords are matched locally instead, since LinkedIn treats multiple terms as AND.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Drop these roles",
            "type": "array",
            "description": "Whole-word exclusions applied after the include filter - 'Assistant', 'Intern', 'Former'.",
            "items": {
              "type": "string"
            }
          },
          "maxEmployeesPerCompany": {
            "title": "Maximum people per company",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap per company, applied before role filtering. Keeping this modest is the best protection for your session cookie - long, greedy runs are what LinkedIn's abuse scoring reacts to.",
            "default": 100
          },
          "maxEmployees": {
            "title": "Maximum people in total",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Overall ceiling across every company, counted after role filtering.",
            "default": 500
          },
          "minDelaySeconds": {
            "title": "Minimum delay between requests",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "LinkedIn answers request bursts with HTTP 999 and a near-empty page. A randomised gap between requests is what keeps a run under that gate - and with a session cookie in play it is also what keeps the run looking like a person rather than a script.",
            "default": 3
          },
          "maxDelaySeconds": {
            "title": "Maximum delay between requests",
            "minimum": 0,
            "maximum": 120,
            "type": "integer",
            "description": "The ceiling of the randomised gap. Raise both bounds if the log shows rate-gate warnings.",
            "default": 8
          },
          "exportFormats": {
            "title": "Extra export files",
            "type": "array",
            "description": "Besides the dataset, write ready-made files into this run's key-value store.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "ndjson",
                "csv",
                "excel"
              ],
              "enumTitles": [
                "JSON",
                "NDJSON",
                "CSV",
                "Excel (XLSX)"
              ]
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy (strongly advised with a cookie)",
            "type": "object",
            "description": "Whenever you supply a session cookie, use RESIDENTIAL in your own country. LinkedIn scores the exit IP against where your account normally signs in, and an Apify datacenter IP is precisely the mismatch that gets a session flagged. The actor warns in the log if a cookie is supplied without one.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}