{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Company Custom Headcount Scraper",
    "description": "Real LinkedIn employee counts by location, function, school, skill or field of study, plus the official company headcount and breakdown tables. No login, no cookies. MCP-ready.",
    "version": "0.2",
    "x-build-id": "dyHahhLQJFgXlbRah"
  },
  "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 (10 on the free plan). NOT person /in/ URLs, /school/ pages, or /showcase/ pages.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (for the optional public sample)",
            "type": "string",
            "description": "Free text such as software engineer. Only used when 'Add a public profile sample' is on; it does not change the LinkedIn counts. Leave empty for counts only."
          },
          "locations": {
            "title": "Where they live",
            "type": "array",
            "description": "Place names such as United States or San Francisco. Returns LinkedIn's real count of people at the company who list that place, when it is in the company's top-15 locations. Prefer this text field for new jobs.",
            "items": {
              "type": "string"
            }
          },
          "functions": {
            "title": "What they do",
            "type": "array",
            "description": "Job functions such as Engineering or Sales. Returns LinkedIn's real count for that function when it is in the company's top-15 functions.",
            "items": {
              "type": "string"
            }
          },
          "skills": {
            "title": "Skills",
            "type": "array",
            "description": "Skills such as Python or Leadership. Real LinkedIn count when the skill is in the company's top-15 skills.",
            "items": {
              "type": "string"
            }
          },
          "schools": {
            "title": "Where they studied",
            "type": "array",
            "description": "School names such as Stanford University. Real LinkedIn count when the school is in the company's top-15 schools.",
            "items": {
              "type": "string"
            }
          },
          "fieldsOfStudy": {
            "title": "What they studied",
            "type": "array",
            "description": "Fields of study such as Computer Science. Real LinkedIn count when it is in the company's top-15 fields.",
            "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"
            }
          },
          "maxSampleProfiles": {
            "title": "Max sample profiles",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many sample profiles to keep when the sample is on. Default 10, maximum 30 (three search pages).",
            "default": 10
          },
          "includeBreakdown": {
            "title": "Always return breakdown tables",
            "type": "boolean",
            "description": "Return the top-15 lists (locations, functions, schools, skills, fields of study) with real LinkedIn counts even when you set no filter. Filters above switch this on by themselves. Billed as one 'people breakdown' per company.",
            "default": false
          },
          "includeKeywordSample": {
            "title": "Add a public profile sample (optional extra)",
            "type": "boolean",
            "description": "Also return a sample of public LinkedIn profiles that match your keywords and filters. A sample is NOT a headcount. Billed per search page that returns profiles (up to 10 profiles each). Off by default.",
            "default": false
          },
          "trackGrowth": {
            "title": "Track headcount growth (optional extra)",
            "type": "boolean",
            "description": "Save each company's headcount in your own account and, on the next run, return the change since the last run (people and percent). The first run only saves a baseline and is not charged for this extra. Off by default.",
            "default": false
          },
          "maxCompanies": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of company pages to process and bill this run. Default 25, up to 100 (10 on the free plan). Prefill is 1 so 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
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}