{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Profile Scraper With Company Enrichment",
    "description": "LinkedIn Profile Scraper extracts data from any public LinkedIn profile. Capture names, titles, experience, education, skills, contact info, and activity details. Ideal for recruitment, lead generation, research, and workflows needing structured professional profile data.",
    "version": "0.1",
    "x-build-id": "WmMlotmGOPDTrJRl8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~linkedin-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-linkedin-profile-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/api-empire~linkedin-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-linkedin-profile-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/api-empire~linkedin-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-linkedin-profile-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",
        "properties": {
          "profileUrls": {
            "title": "🎯 Profile URLs to enrich",
            "type": "array",
            "description": "Public LinkedIn profile links to enrich (e.g. linkedin.com/in/username). One per line; processed in order. Vanity (/in/handle) and URN (/in/ACoAA…) URLs both accepted.",
            "items": {
              "type": "string"
            }
          },
          "companyEnrichment": {
            "title": "🏢 Enrich with company firmographics",
            "type": "boolean",
            "description": "When on, adds a companyEnrichment block resolved from the employer's public company page. Turn off for a pure profile scrape. Default is true.",
            "default": true
          },
          "maxCompanyFetches": {
            "title": "🔢 Max company page fetches",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of DISTINCT company pages fetched per run (dedupe means repeats are free). 0 = unlimited. Example: 5 → at most 5 unique employers enriched. Default is 0.",
            "default": 0
          },
          "includeLeadProfile": {
            "title": "🧲 Build flat lead block",
            "type": "boolean",
            "description": "When on, adds a leadProfile block with flat CRM-ready fields + derived seniority. Default is true.",
            "default": true
          },
          "bySeniority": {
            "title": "🎚️ Keep only these seniorities",
            "type": "array",
            "description": "Filter: keep only profiles whose derived seniority matches (substring match). Leave empty to keep all. Levels: C-Suite / Executive, VP, Director, Manager, Senior, Mid-Level / Professional, Entry / Individual Contributor.",
            "items": {
              "type": "string"
            }
          },
          "byIndustry": {
            "title": "🏭 Keep only these industries",
            "type": "array",
            "description": "Filter: keep only profiles whose enriched company industry contains one of these terms (case-insensitive, e.g. 'software', 'finance'). Requires companyEnrichment on. Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "requireCurrentCompany": {
            "title": "✅ Require a current company",
            "type": "boolean",
            "description": "Filter: drop profiles with no detectable current employer (e.g. students / open-to-work with no company). Default is false.",
            "default": false
          },
          "locationContains": {
            "title": "📍 Keep only these locations",
            "type": "array",
            "description": "Filter: keep only profiles whose location contains one of these terms (case-insensitive, e.g. 'United States', 'London'). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "includeSimilarProfiles": {
            "title": "👥 People also viewed",
            "type": "boolean",
            "description": "Include the 'People also viewed' / similar profiles list — useful for expanding a lead list. Default is true.",
            "default": true
          },
          "includeProjects": {
            "title": "📁 Projects",
            "type": "boolean",
            "description": "Include the Projects section (name, dates, description, contributors). Default is true.",
            "default": true
          },
          "includeRecommendations": {
            "title": "⭐ Recommendations",
            "type": "boolean",
            "description": "Include written recommendations from other members (credibility / social proof). Default is true.",
            "default": true
          },
          "scrapingApiUrlTemplate": {
            "title": "Scraping API URL template",
            "type": "string",
            "description": "Examples:\n  • ScrapingBee:  https://app.scrapingbee.com/api/v1/?api_key=YOUR_KEY&url={url}&premium_proxy=true&country_code=us\n  • ScraperAPI:   http://api.scraperapi.com/?api_key=YOUR_KEY&url={url}&premium=true\n  • Scrapingdog:  https://api.scrapingdog.com/linkedin/?api_key=YOUR_KEY&url={url}\nLeave empty to skip."
          },
          "useWaybackSnapshot": {
            "title": "🗄️ Wayback Machine fallback",
            "type": "boolean",
            "description": "If LinkedIn blocks and no scraping API succeeds, look up an existing Wayback Machine snapshot of the URL (free, fast). Applies to both profile and company pages. Default is true.",
            "default": true
          },
          "useWaybackSavePageNow": {
            "title": "💾 Wayback Save-Page-Now fallback",
            "type": "boolean",
            "description": "If no existing snapshot is found, trigger Wayback Save Page Now to create a fresh one. Slow (30-60s/profile) and rate-limited (~15/min) but free and needs no login. Disable for large bulk runs. Default is true.",
            "default": true
          },
          "maxRetries": {
            "title": "🔁 Max fetch retries",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many direct-fetch attempts per profile/company page before falling back (exponential backoff + jitter; escalates to a RESIDENTIAL proxy on a block/authwall). Default 5.",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "⏱️ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout for each profile/company fetch. Default 30.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select Apify Proxy (RESIDENTIAL recommended) or custom proxy URLs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}