# LinkedIn Profile Scraper (`oneary/linkedin-profile-scraper`) Actor

👔 Extract rich LinkedIn profile data at scale — names, headlines, locations, about sections, work experience, education, skills, and connection counts. Uses Playwright with proxy rotation to reliably scrape public profiles. Perfect for lead generation, talent sourcing, and professional net

- **URL**: https://apify.com/oneary/linkedin-profile-scraper.md
- **Developed by:** [Luan](https://apify.com/oneary) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## LinkedIn Profile Scraper

[![Built with Crawlee](https://img.shields.io/badge/Built%20with-Crawlee-0d1117?style=flat-square)](https://crawlee.dev)
[![Apify Actor](https://img.shields.io/badge/Apify-Actor-FF6D00?style=flat-square)](https://apify.com/oneary/linkedin-profile-scraper)

> **Extract structured profile data from LinkedIn at scale.**  
> Collect names, headlines, locations, about sections, work experience, education, skills, and more — all through a reliable, proxy-backed Playwright crawler built on Apify.

---

### ✨ Features

- **Full profile extraction** — name, headline, location, about section, profile picture URL
- **Work experience** — titles, companies, duration, descriptions
- **Education** — schools, degrees, years attended
- **Skills** — complete list of profile skills
- **Connection count** — approximate follower/connection numbers
- **Proxy-powered** — uses Apify residential proxies to avoid blocks and rate limits
- **Configurable concurrency** — tune speed vs. reliability
- **Headless by default** — runs in headless Chromium for production, switch to headful for debugging
- **Error resilient** — failed profiles are logged with HTML snapshots for later review
- **Clean JSON output** — every profile is saved as a structured dataset row

---

### 🚀 Quick Start

#### Run on Apify Cloud

1. Go to [oneary/linkedin-profile-scraper](https://apify.com/oneary/linkedin-profile-scraper)
2. Click **Try** or **Run**
3. Paste LinkedIn profile URLs (one per line)
4. Hit **Start**

#### Run Locally with Apify CLI

```bash
## Clone and install
git clone https://github.com/oneary/linkedin-profile-scraper.git
cd linkedin-profile-scraper
npm install

## Run locally
apify run -p
````

***

### 📥 Input

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | `array` | `[]` | LinkedIn profile URLs to scrape (e.g. `https://www.linkedin.com/in/username/`) |
| `maxProfiles` | `integer` | `10` | Maximum number of profiles to scrape (`0` = no limit) |
| `proxyConfiguration` | `object` | Apify proxy (RESIDENTIAL) | Proxy settings for reliable scraping |
| `maxConcurrency` | `integer` | `5` | Simultaneous browser pages |
| `useHeadful` | `boolean` | `false` | Run browser in visible mode (debug only) |
| `waitForTimeoutSecs` | `integer` | `30` | Max seconds to wait for page load |

**Example input:**

```json
{
  "startUrls": [
    { "url": "https://www.linkedin.com/in/satyanadella/" },
    { "url": "https://www.linkedin.com/in/sundarpichai/" }
  ],
  "maxProfiles": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "maxConcurrency": 3
}
```

***

### 📤 Output

Each scraped profile produces a JSON object like this:

```json
{
  "name": "Satya Nadella",
  "headline": "Chairman and CEO at Microsoft",
  "location": "Redmond, Washington, United States",
  "about": "Satya Nadella is the Chairman and Chief Executive Officer of Microsoft...",
  "profilePicture": "https://media.licdn.com/dms/image/...",
  "experience": [
    {
      "title": "Chairman and CEO",
      "company": "Microsoft",
      "duration": "Feb 2014 - Present",
      "description": "Responsible for the overall strategy..."
    }
  ],
  "education": [
    {
      "school": "University of Chicago Booth School of Business",
      "degree": "MBA",
      "years": "1997 - 1999"
    }
  ],
  "skills": ["Leadership", "Cloud Computing", "AI", "Strategy", "M&A"],
  "connections": 500,
  "url": "https://www.linkedin.com/in/satyanadella/",
  "scrapedAt": "2026-05-30T12:00:00.000Z"
}
```

Results are stored in the Apify **dataset** and can be exported as JSON, CSV, XML, or Excel.

***

### 🛡️ Proxy & Anti-Blocking

This actor uses **Apify Residential Proxies** by default — the gold standard for LinkedIn scraping. Key strategies:

- Random user-agent rotation per request
- Realistic viewport dimensions
- `networkidle` wait condition ensures full page render
- Configurable concurrency to stay under rate limits
- HTML snapshots saved on failure for forensics

> **Tip:** For best results, use residential proxies from the same region as your target profiles.

***

### 📦 Dependencies

- [Crawlee](https://crawlee.dev) — web scraping framework by Apify
- [Playwright](https://playwright.dev) — browser automation
- [Apify SDK](https://docs.apify.com/sdk/js/) — Apify platform integration

***

### 🧪 Development

```bash
## Install dependencies
npm install

## Run with local input
apify run -p

## Debug with headful browser
apify run -p --input-variable useHeadful=true

## Run tests
npm test
```

***

### 🔒 Disclaimer

This actor scrapes **public** LinkedIn profile data, visible to anyone without logging in. Always comply with LinkedIn's [User Agreement](https://www.linkedin.com/legal/user-agreement) and respect robots.txt directives. The authors are not responsible for misuse.

***

### 📄 License

Apache 2.0 — see [LICENSE](./LICENSE) for details.

***

*Built with ❤️ by [oneary](https://apify.com/oneary) on Apify*

# Actor input Schema

## `startUrls` (type: `array`):

List of LinkedIn profile URLs to scrape. Each should be a full URL like https://www.linkedin.com/in/username/

## `maxProfiles` (type: `integer`):

Maximum number of profile pages to scrape. Set to 0 for no limit (scrapes all provided URLs).

## `proxyConfiguration` (type: `object`):

Apify proxy configuration for region-specific scraping and avoiding blocks.

## `maxConcurrency` (type: `integer`):

Maximum number of browser pages to open simultaneously.

## `useHeadful` (type: `boolean`):

Run browser in visible mode (headful). Useful for debugging — set to false (headless) for production.

## `waitForTimeoutSecs` (type: `integer`):

Max time in seconds to wait for the profile page to fully load before timing out.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.linkedin.com/in/satyanadella/"
    }
  ],
  "maxProfiles": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 5,
  "useHeadful": false,
  "waitForTimeoutSecs": 30
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.linkedin.com/in/satyanadella/"
        }
    ],
    "maxProfiles": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    },
    "maxConcurrency": 5,
    "waitForTimeoutSecs": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("oneary/linkedin-profile-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.linkedin.com/in/satyanadella/" }],
    "maxProfiles": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
    "maxConcurrency": 5,
    "waitForTimeoutSecs": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("oneary/linkedin-profile-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.linkedin.com/in/satyanadella/"
    }
  ],
  "maxProfiles": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 5,
  "waitForTimeoutSecs": 30
}' |
apify call oneary/linkedin-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=oneary/linkedin-profile-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Profile Scraper",
        "description": "👔 Extract rich LinkedIn profile data at scale — names, headlines, locations, about sections, work experience, education, skills, and connection counts. Uses Playwright with proxy rotation to reliably scrape public profiles. Perfect for lead generation, talent sourcing, and professional net",
        "version": "0.1",
        "x-build-id": "9MsmAgyEdXg4RhqFI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/oneary~linkedin-profile-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-oneary-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/oneary~linkedin-profile-scraper/runs": {
            "post": {
                "operationId": "runs-sync-oneary-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/oneary~linkedin-profile-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-oneary-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": {
                    "startUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "List of LinkedIn profile URLs to scrape. Each should be a full URL like https://www.linkedin.com/in/username/",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxProfiles": {
                        "title": "Max profiles",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of profile pages to scrape. Set to 0 for no limit (scrapes all provided URLs).",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy configuration for region-specific scraping and avoiding blocks.",
                        "default": {
                            "useApifyProxy": true
                        }
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of browser pages to open simultaneously.",
                        "default": 5
                    },
                    "useHeadful": {
                        "title": "Use headful browser",
                        "type": "boolean",
                        "description": "Run browser in visible mode (headful). Useful for debugging — set to false (headless) for production.",
                        "default": false
                    },
                    "waitForTimeoutSecs": {
                        "title": "Wait for page timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Max time in seconds to wait for the profile page to fully load before timing out.",
                        "default": 30
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
