{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Company Custom Headcount Scraper",
    "description": "Count employees at a public LinkedIn company by keyword, location, function, skill, or school. Returns official LinkedIn employeeCount plus a cookieless public-profile sample for custom filters. No login. MCP-ready.",
    "version": "0.1",
    "x-build-id": "mLVhUFGKvNZKPdjr0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~linkedin-company-custom-headcount-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-linkedin-company-custom-headcount-scraper",
        "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/khadinakbar~linkedin-company-custom-headcount-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-linkedin-company-custom-headcount-scraper",
        "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/khadinakbar~linkedin-company-custom-headcount-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-linkedin-company-custom-headcount-scraper",
        "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": [
          "companyUrls"
        ],
        "properties": {
          "companyUrls": {
            "title": "LinkedIn company pages",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Public LinkedIn company pages to count. Accepts full URLs such as https://www.linkedin.com/company/apple or vanity slugs such as apple. One company per line, up to 100. NOT person /in/ URLs, /school/ pages, or /showcase/ pages.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Employee keywords",
            "type": "string",
            "description": "Free-text keywords used to filter public people results, such as software engineer or account executive. Combined with the company name in a Google site:linkedin.com/in search. Leave empty to return only the official LinkedIn employeeCount. NOT a LinkedIn Recruiter boolean string."
          },
          "locations": {
            "title": "Where they live",
            "type": "array",
            "description": "Location labels to AND into the custom filter, such as United States or San Francisco. Human-readable text is preferred for agents. This is not a LinkedIn geo ID field — use whereTheyLive for numeric IDs.",
            "items": {
              "type": "string"
            }
          },
          "functions": {
            "title": "What they do",
            "type": "array",
            "description": "Job-function labels such as Engineering or Sales. These become extra quoted phrases on the public people search. Use whatTheyDo if you already have LinkedIn function IDs from another tool.",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "title": "Skills",
            "type": "array",
            "description": "Skill labels such as Python or Java. Applied only to the public-profile sample, not to LinkedIn Recruiter skill facets.",
            "items": {
              "type": "string"
            }
          },
          "schools": {
            "title": "Where they studied",
            "type": "array",
            "description": "School names such as Stanford University. Used as public-search phrases. This is not a private alumni roster.",
            "items": {
              "type": "string"
            }
          },
          "fieldsOfStudy": {
            "title": "What they studied",
            "type": "array",
            "description": "Field-of-study labels such as Computer Science. Combined with other custom filters on the public people search.",
            "items": {
              "type": "string"
            }
          },
          "whereTheyLive": {
            "title": "LinkedIn geo IDs",
            "type": "array",
            "description": "Optional LinkedIn geo IDs for compatibility with other headcount tools. Known IDs such as 103644278 (United States) are mapped to labels; unknown IDs are skipped and listed on the row. Prefer the locations text field for new jobs.",
            "items": {
              "type": "integer"
            }
          },
          "whatTheyDo": {
            "title": "LinkedIn function IDs",
            "type": "array",
            "description": "Optional LinkedIn function IDs. 8 is Engineering, 25 is Sales, 18 is Operations. Unknown IDs are skipped rather than guessed.",
            "items": {
              "type": "integer"
            }
          },
          "whatTheyAreSkilledAt": {
            "title": "LinkedIn skill IDs",
            "type": "array",
            "description": "Optional LinkedIn skill IDs. Only a small public map is supported; unmapped IDs are recorded as unresolved. Prefer the skills text field.",
            "items": {
              "type": "integer"
            }
          },
          "whereTheyStudied": {
            "title": "LinkedIn school IDs",
            "type": "array",
            "description": "Optional LinkedIn school IDs. Known examples: 2584 Stanford, 3084 Harvard. Unknown IDs are skipped.",
            "items": {
              "type": "integer"
            }
          },
          "whatTheyStudied": {
            "title": "LinkedIn field-of-study IDs",
            "type": "array",
            "description": "Optional LinkedIn field-of-study IDs. Prefer fieldsOfStudy text labels when the ID map does not contain the value.",
            "items": {
              "type": "integer"
            }
          },
          "includeSampleProfiles": {
            "title": "Include matching public profiles",
            "type": "boolean",
            "description": "When custom filters are set, attach a small public LinkedIn /in/ sample that matched the filter. Defaults to true. Disable to keep only official employeeCount plus a zero customHeadcount. Sample profiles are not billed separately.",
            "default": true
          },
          "maxSampleProfiles": {
            "title": "Max sample profiles",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many matching public profiles to keep when filters are on. Default 10, maximum 50. This caps the customHeadcount sample; it is not a LinkedIn Recruiter census.",
            "default": 10
          },
          "maxCompanies": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of company pages to process and bill this run. Default 25. Extra URLs beyond the cap are ignored. Prefill is 1 so quality tests finish quickly.",
            "default": 25
          },
          "includeSubsidiaries": {
            "title": "Include subsidiaries",
            "type": "boolean",
            "description": "Requested for compatibility with other headcount tools. Public cookieless data does not expand a subsidiary graph, so the Actor still counts only the requested company and records a warning. Default false.",
            "default": false
          },
          "providerOrder": {
            "title": "Data provider order",
            "enum": [
              "scrapecreators-first",
              "sociavault-first"
            ],
            "type": "string",
            "description": "Which public-data provider to try first for the company page and optional people sample. The other provider is the automatic fallback. Keep the default unless you have a reason to prefer SociaVault.",
            "default": "scrapecreators-first"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}