{
  "openapi": "3.0.1",
  "info": {
    "title": "All-in one Linkedin Scraper",
    "description": "LinkedIn scraper — NO COOKIES NEEDED. 8 scraping modes:Profiles, Companies,Jobs,Posts,Search,Search_profile, Profile Complete. Zero risk to your LinkedIn account. Multi-source search engine for maximum reliability. Pay per result from $1/1K. Apify subscription discounts. MCP-compatible for AI agents",
    "version": "0.1",
    "x-build-id": "20FRNpiXNkCCpnFV4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/get-leads~linkedin-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-get-leads-linkedin-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/get-leads~linkedin-scraper/runs": {
      "post": {
        "operationId": "runs-sync-get-leads-linkedin-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/get-leads~linkedin-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-get-leads-linkedin-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "profiles",
              "companies",
              "jobs",
              "posts",
              "search",
              "search_profiles",
              "profile_complete",
              "company_employees",
              "monitor"
            ],
            "type": "string",
            "description": "What to scrape. Companies/Jobs/Search work WITHOUT cookies. Profiles/Posts/Search Profiles/Profile Complete/Company Employees work best WITH a cookie. 'profiles' = profile data (15 fields). 'companies' = company pages (15 fields). 'jobs' = job search with filters (20 fields). 'posts' = posts with engagement + hashtags, cookie required (14 fields). 'search' = find profiles by keywords (9 fields). 'search_profiles' = search by name + full enrichment (15 fields). 'profile_complete' = profile + about + posts + engagement score (19 fields). 'company_employees' = find people at a company (8 fields). Smart proxy routing: DC for Companies/Jobs/Posts/Search, residential only for Profiles/Search Profiles/Profile Complete.",
            "default": "profiles"
          },
          "urls": {
            "title": "LinkedIn URLs",
            "type": "array",
            "description": "LinkedIn URLs to scrape. Profiles: /in/username. Companies: /company/name. Posts: profile or company URLs. Profile Complete: /in/username. Not needed for Jobs or Search modes (use Search Query instead).",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Search keywords (for Jobs, Search, and Search Profiles modes). For Search Profiles: enter a person's name (e.g., 'Sunny Savita') to find and fully scrape all matching LinkedIn profiles. Examples: 'software engineer', 'Sunny Savita', 'Naveen Jain'."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Location filter for Jobs and Search modes. Examples: 'San Francisco', 'United States', 'London, UK'."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results to return. Default: 25.",
            "default": 25
          },
          "timePosted": {
            "title": "Time Posted",
            "enum": [
              "24h",
              "week",
              "month"
            ],
            "type": "string",
            "description": "Filter jobs by when they were posted."
          },
          "jobType": {
            "title": "Job Type",
            "enum": [
              "full-time",
              "part-time",
              "contract",
              "temporary",
              "volunteer",
              "internship"
            ],
            "type": "string",
            "description": "Filter by job type."
          },
          "experienceLevel": {
            "title": "Experience Level",
            "enum": [
              "internship",
              "entry",
              "associate",
              "mid-senior",
              "director",
              "executive"
            ],
            "type": "string",
            "description": "Filter by experience level."
          },
          "workType": {
            "title": "Work Type",
            "enum": [
              "onsite",
              "remote",
              "hybrid"
            ],
            "type": "string",
            "description": "Filter by work arrangement."
          },
          "startDate": {
            "title": "Start Date (Posts Mode)",
            "type": "string",
            "description": "Filter posts from this date onwards (YYYY-MM-DD format). Posts mode only. Requires li_at cookie. Example: '2025-01-01'."
          },
          "endDate": {
            "title": "End Date (Posts Mode)",
            "type": "string",
            "description": "Filter posts up to this date (YYYY-MM-DD format). Posts mode only. Requires li_at cookie. Example: '2026-04-01'."
          },
          "discoverEmails": {
            "title": "Discover Emails",
            "type": "boolean",
            "description": "Try to find email addresses for profiles by scraping employer websites and generating email patterns. Adds ~2-4 seconds per profile. Works for Profiles, Search Profiles, and Profile Complete modes.",
            "default": true
          },
          "hunterApiKey": {
            "title": "Hunter.io API Key (Optional — Email Finder)",
            "type": "string",
            "description": "Optional Hunter.io API key for email enrichment. When provided, Hunter Email Finder is used as fallback after website scraping. Get your free API key at hunter.io/api-keys (25 free searches/month)."
          },
          "proxyConfig": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Smart routing: residential proxy only for Profiles/Search Profiles/Profile Complete (direct LinkedIn access). All other modes use cheaper datacenter proxies automatically.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "minDelay": {
            "title": "Min Delay (ms)",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Minimum delay between requests in milliseconds.",
            "default": 2000
          },
          "maxDelay": {
            "title": "Max Delay (ms)",
            "minimum": 1000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum delay between requests in milliseconds.",
            "default": 5000
          },
          "cookie": {
            "title": "LinkedIn Cookie (Optional — Unlocks Richer Data)",
            "type": "string",
            "description": "Paste your li_at cookie here to unlock enhanced data. Without cookie, all 8 modes work fine using search engines. With cookie, you get:\n\n• Profiles: +experience, education, skills, certifications, languages (5x more fields)\n• Company Employees: 1000+ employees instead of ~10-20\n• Search Profiles: better discovery + richer enrichment\n• Profile Complete: full about section + structured posts\n\nHow to get your li_at cookie: Open LinkedIn in Chrome → F12 → Application → Cookies → linkedin.com → copy the 'li_at' value.\n\nLeave empty for cookie-free mode (zero risk to your account)."
          },
          "urlsFileUrl": {
            "title": "URLs File (Batch Input)",
            "type": "string",
            "description": "URL to a text or CSV file containing LinkedIn URLs (one per line). Use this for batch runs with 100+ URLs instead of pasting them manually. Supports plain text (.txt) and CSV files. Lines starting with # are ignored."
          },
          "alertEmail": {
            "title": "Alert Email (Monitor Mode)",
            "type": "string",
            "description": "Email address for health check alerts. Used in monitor mode — receives alerts when runs fail or return empty results."
          },
          "webhookUrl": {
            "title": "Webhook URL (Optional)",
            "type": "string",
            "description": "URL to receive a POST request when the scraper finishes. The webhook payload includes: mode, itemCount, datasetId, runId, status. Useful for large batch runs — get notified when results are ready instead of polling."
          },
          "linkedinCookies": {
            "title": "LinkedIn Cookies (Admin Only)",
            "type": "array",
            "description": "Internal use only. Leave empty.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}