# LinkedIn Profile Scrapper (`zerobreak/linkedin-profile-scrapper`) Actor

Fast LinkedIn Profile Scraper that extracts detailed profile data including work experience, education, skills, connections, and more. Ideal for recruitment, sales prospecting, market research, and bulk LinkedIn profile analysis.

- **URL**: https://apify.com/zerobreak/linkedin-profile-scrapper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 239 total users, 2 monthly users, 91.2% runs succeeded, 2 bookmarks
- **User rating**: 1.03 out of 5 stars

## Pricing

from $9.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LinkedIn Profile Scraper

Extract detailed information from LinkedIn profiles quickly and easily. Get comprehensive data including work experience, education, connections, and more.

### Features

- ✅ Scrape multiple LinkedIn profiles at once
- ✅ Extract complete profile information
- ✅ Get work experience and education history
- ✅ Retrieve connection and follower counts
- ✅ Export data in JSON format
- ✅ Fast and reliable processing

### How It Works

This actor uses a **two-step process**:

1. **Generate Snapshot ID**: Submit LinkedIn profile URLs to start the scraping process
2. **Fetch Data**: After 30 seconds, retrieve your scraped data using the snapshot ID

**Why two steps?** This approach ensures reliable data collection and prevents timeouts for large scraping jobs.

### Input

#### Required Fields

- **Action** (required): Choose between:
  - `generate_snap_id` - Start a new scraping job
  - `fetch_data` - Retrieve results from a completed job

#### For "Generate Snapshot ID" Action

- **LinkedIn Profile URLs** (required): Enter LinkedIn profile URLs, one per line

#### For "Fetch Data" Action

- **Snapshot ID** (required): The ID you received from the generate step

### Input Examples

#### Step 1: Start Scraping

```json
{
  "action": "generate_snap_id",
  "urls": "https://www.linkedin.com/in/williamhgates/\nhttps://www.linkedin.com/in/satyanadella/\nhttps://www.linkedin.com/in/jeffweiner08/"
}
```

**Result**: You'll receive a snapshot ID like `linkedIn_profile_s_abc123xyz`

#### Step 2: Get Your Data (Wait 30 seconds first!)

```json
{
  "action": "fetch_data",
  "snap_id": "linkedIn_profile_s_abc123xyz"
}
```

### Output

#### Data Fields Extracted

- Full Name
- Current Position & Company
- Location (City, Country)
- Professional Summary
- Complete Work Experience
- Education History
- Skills
- Number of Connections
- Number of Followers
- Profile URL
- Profile Picture

#### Example Output

```json
{
  "name": "Bill Gates",
  "city": "Seattle",
  "country_code": "us",
  "about": "Co-chair of the Bill & Melinda Gates Foundation. Founder of Breakthrough Energy...",
  "current_company": {
    "name": "Bill & Melinda Gates Foundation",
    "location": "Seattle, WA",
    "link": "https://www.linkedin.com/company/bill-&-melinda-gates-foundation"
  },
  "experience": [
    {
      "title": "Co-chair",
      "company": "Bill & Melinda Gates Foundation",
      "duration": "2000 - Present",
      "location": "Seattle, Washington"
    }
  ],
  "education": [
    {
      "school": "Harvard University",
      "degree": "Attended",
      "field_of_study": "Computer Science",
      "dates": "1973 - 1975"
    }
  ],
  "followers": 35720000,
  "connections": "500+",
  "url": "https://www.linkedin.com/in/williamhgates/",
  "avatar": "https://media.licdn.com/dms/image/..."
}
```

### Important: Wait Time

⚠️ **You must wait at least 30 seconds between steps 1 and 2**

The scraping process needs time to gather all the data. If you try to fetch data too soon, you may get an error or incomplete results.

**Pro tip**: Set a timer for 30 seconds after receiving your snapshot ID!

### Step-by-Step Guide

1. **Prepare Your URLs**
   - Collect the LinkedIn profile URLs you want to scrape
   - Make sure they're complete URLs (starting with https://)

2. **Start the Job**
   - Set Action to "Generate Snapshot ID"
   - Paste your URLs (one per line)
   - Click Run
   - **Copy the snapshot ID from the results**

3. **Wait**
   - Set a timer for 30 seconds
   - Grab a coffee ☕

4. **Get Your Data**
   - Set Action to "Fetch Data"
   - Paste the snapshot ID you copied
   - Click Run
   - Your data will appear in the dataset!

### Tips & Best Practices

#### URL Format

✅ **Correct**: `https://www.linkedin.com/in/username/`
❌ **Incorrect**: `linkedin.com/in/username` (missing https://)
❌ **Incorrect**: `https://www.linkedin.com/in/username/details/experience/` (too specific)

#### Batch Processing

- You can scrape up to 100 profiles at once
- Each URL should be on a new line
- No commas or separators needed

#### Error Handling

If data fetching fails:

1. Wait another 30 seconds
2. Try fetching again with the same snapshot ID
3. Check that your snapshot ID is complete and correct

### Use Cases

- **Recruitment**: Research candidates and their backgrounds
- **Sales Prospecting**: Gather information about potential leads
- **Market Research**: Analyze professionals in specific industries
- **Networking**: Research people before connecting
- **Competitive Analysis**: Study profiles of competitors' employees

### Pricing & Limits

- Charged per profile scraped
- No limit on number of profiles per run
- Snapshot IDs are valid for 24 hours
- Data is available in your dataset for 7 days

### Common Questions

**Q: How long does the snapshot ID remain valid?**
A: 24 hours. After that, you'll need to generate a new one.

**Q: Can I scrape profiles from different countries?**
A: Yes, any public LinkedIn profile worldwide.

**Q: What if a profile is private?**
A: Only publicly visible information will be extracted. Private profiles may return limited data.

**Q: Can I use the same snapshot ID multiple times?**
A: Yes! You can fetch data multiple times with the same snapshot ID within 24 hours.

**Q: What happens if I don't wait 30 seconds?**
A: You may receive an error or incomplete data. Always wait at least 30 seconds.

### Data Format

All data is returned in JSON format and automatically saved to your Apify dataset. You can export it as:

- JSON
- CSV
- Excel
- XML
- RSS

### Support

Having issues? Here's how to get help:

1. **Check the Logs**: The run logs contain detailed error messages
2. **Common Issues**:
   - "Invalid snapshot ID" → Check you copied the full ID
   - "Data not ready" → Wait longer before fetching
   - "Invalid URL" → Verify your LinkedIn URLs are correct
3. **Contact Support**: Reach out through Apify support for assistance

### Privacy & Legal

- This actor only accesses publicly available information
- Respect LinkedIn's Terms of Service
- Use scraped data responsibly and in compliance with applicable laws
- Do not use for spam or unauthorized purposes

### Updates & Changelog

We regularly update this actor to ensure compatibility with LinkedIn's structure. Check back for improvements and new features!

***

**Happy Scraping! 🚀**

# Actor input Schema

## `action` (type: `string`):

Choose whether to generate a snapshot ID or fetch data

## `snap_id` (type: `string`):

Snapshot ID to fetch data (required only for fetch_data action). ⚠️ IMPORTANT: Wait at least 30 seconds after generating snap_id before fetching data.

## `urls` (type: `string`):

Enter LinkedIn profile URLs, ONE URL PER LINE. You can add as many URLs as you want.

## Actor input object example

```json
{
  "action": "generate_snap_id",
  "snap_id": "linkedIn_profile_s_abc123xyz",
  "urls": "https://www.linkedin.com/in/williamhgates/\nhttps://www.linkedin.com/in/satyanadella/\nhttps://www.linkedin.com/in/jeffweiner08/"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "action": "generate_snap_id",
    "snap_id": "",
    "urls": "https://www.linkedin.com/in/williamhgates/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/linkedin-profile-scrapper").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 = {
    "action": "generate_snap_id",
    "snap_id": "",
    "urls": "https://www.linkedin.com/in/williamhgates/",
}

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

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

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

```

## CLI example

```bash
echo '{
  "action": "generate_snap_id",
  "snap_id": "",
  "urls": "https://www.linkedin.com/in/williamhgates/"
}' |
apify call zerobreak/linkedin-profile-scrapper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/linkedin-profile-scrapper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/BLvaP8deI7uD5shHk/builds/7omA0cxi9Dw5njIEk/openapi.json
