# LinkedIn Scraper (`codingfrontend/linkedin-scraper`) Actor

General LinkedIn scraper that can search for jobs, companies, people, and posts. Supports multiple search modes with full data extraction, pagination, and filtering.

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

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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 Scraper (General)

A versatile LinkedIn scraper that supports four search modes: **jobs**, **companies**, **people**, and **posts**. One actor for all your LinkedIn data needs.

### Features

- Four search modes: jobs, companies, people, posts
- Full pagination support for large result sets
- Filters by location, date posted, and job type
- Handles optional LinkedIn authentication for extended access
- Unified output schema across all modes
- Dataset views: **Overview** and **Full Details**

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchMode` | string | ✅ | `jobs` | `jobs`, `companies`, `people`, or `posts` |
| `query` | string | ✅ | — | Search keywords (e.g. `"software engineer"`, `"Microsoft"`, `"AI trends"`) |
| `location` | string | — | `United States` | Location filter (for jobs/people searches) |
| `maxItems` | integer | — | `50` | Max items to scrape (1–500) |
| `datePosted` | string | — | `anyTime` | `anyTime`, `pastMonth`, `pastWeek`, `past24Hours` |
| `jobType` | string | — | any | `F` = Full-time, `P` = Part-time, `C` = Contract, `T` = Temporary, `I` = Internship |
| `linkedinCookie` | string | — | — | LinkedIn `li_at` session cookie (required for people/companies/posts) |
| `scrapeDetails` | boolean | — | `true` | Visit each result for full details |
| `proxyConfiguration` | object | — | — | Proxy settings (residential recommended) |

### Search Mode Guide

| Mode | Auth Required | What It Scrapes |
|---|---|---|
| `jobs` | No | Job listings via LinkedIn's public guest API |
| `companies` | Recommended | Company search result cards |
| `people` | Yes | Person search results (requires `li_at` cookie) |
| `posts` | Yes | Content/post search results |

### Getting the LinkedIn Cookie

1. Log into LinkedIn in your browser
2. Open DevTools → Application → Cookies → `linkedin.com`
3. Copy the value of the `li_at` cookie
4. Paste it into the `linkedinCookie` input field

### Output Fields

| Field | Type | Description |
|---|---|---|
| `type` | string | Result type: `job`, `company`, `person`, or `post` |
| `title` | string | Job title, company name, person name, or post snippet |
| `subtitle` | string | Company (for jobs), industry (companies), headline (people) |
| `url` | string | LinkedIn URL for this result |
| `location` | string | Location of the result |
| `description` | string | Full description, about text, or post content |
| `imageUrl` | string | Logo, profile photo, or post image |
| `metadata` | object | Type-specific data (jobId, followers, likes, hashtags, etc.) |
| `searchQuery` | string | Query that produced this result |
| `searchMode` | string | The search mode used |
| `scrapedAt` | string | ISO 8601 timestamp |

### Example Output — Jobs Mode

```json
{
  "type": "job",
  "title": "Software Engineer",
  "subtitle": "Google",
  "url": "https://www.linkedin.com/jobs/view/...",
  "location": "Mountain View, CA",
  "metadata": { "jobId": "1234567890", "postedDate": "2026-05-10" },
  "searchQuery": "software engineer",
  "searchMode": "jobs",
  "scrapedAt": "2026-05-12T22:43:58.494Z"
}
````

### Example Output — People Mode

```json
{
  "type": "person",
  "title": "Jane Smith",
  "subtitle": "Senior Product Manager at Stripe",
  "url": "https://www.linkedin.com/in/jane-smith/",
  "location": "San Francisco, CA",
  "metadata": { "connectionDegree": "2nd" },
  "searchQuery": "product manager",
  "searchMode": "people",
  "scrapedAt": "2026-05-12T22:43:58.494Z"
}
```

### Dataset Views

- **Overview**: Type, title, subtitle, URL, location, search query, search mode, scraped date
- **Full Details**: All overview fields + description, metadata, image URL

### Notes

- Jobs mode uses LinkedIn's public API — no authentication needed
- People, companies, and posts modes require a valid `li_at` session cookie
- Residential proxies are strongly recommended for all modes
- For focused scraping, use the dedicated scrapers: `linkedin-jobs-scraper`, `linkedin-company-scraper`, `linkedin-person-scraper`, `linkedin-post-search`

# Actor input Schema

## `searchMode` (type: `string`):

What to search for on LinkedIn.

## `query` (type: `string`):

Search keywords. For jobs: 'software engineer', companies: 'Microsoft', people: 'John Doe', posts: 'AI trends'.

## `location` (type: `string`):

Location filter (for jobs and people searches). E.g. 'United States', 'San Francisco, CA', 'Remote'.

## `maxItems` (type: `integer`):

Maximum number of items to scrape.

## `datePosted` (type: `string`):

Filter by when the job/post was published.

## `jobType` (type: `string`):

Employment type filter.

## `linkedinCookie` (type: `string`):

LinkedIn session cookie for accessing protected content (required for people/companies).

## `scrapeDetails` (type: `boolean`):

Visit each result page for complete details. Slower but more data.

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

Proxy settings. Residential proxies strongly recommended for LinkedIn.

## Actor input object example

```json
{
  "searchMode": "jobs",
  "query": "product manager",
  "location": "United States",
  "maxItems": 50,
  "datePosted": "anyTime",
  "jobType": "",
  "scrapeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "query": "software engineer",
    "location": "United States",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/linkedin-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 = {
    "query": "software engineer",
    "location": "United States",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/linkedin-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 '{
  "query": "software engineer",
  "location": "United States",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call codingfrontend/linkedin-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Scraper",
        "description": "General LinkedIn scraper that can search for jobs, companies, people, and posts. Supports multiple search modes with full data extraction, pagination, and filtering.",
        "version": "1.0",
        "x-build-id": "T1bkp2P2u0QYXWBGA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/codingfrontend~linkedin-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-codingfrontend-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/codingfrontend~linkedin-scraper/runs": {
            "post": {
                "operationId": "runs-sync-codingfrontend-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/codingfrontend~linkedin-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-codingfrontend-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": [
                    "query",
                    "searchMode"
                ],
                "properties": {
                    "searchMode": {
                        "title": "Search Mode",
                        "enum": [
                            "jobs",
                            "companies",
                            "people",
                            "posts"
                        ],
                        "type": "string",
                        "description": "What to search for on LinkedIn.",
                        "default": "jobs"
                    },
                    "query": {
                        "title": "Search Query / Keywords",
                        "type": "string",
                        "description": "Search keywords. For jobs: 'software engineer', companies: 'Microsoft', people: 'John Doe', posts: 'AI trends'."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Location filter (for jobs and people searches). E.g. 'United States', 'San Francisco, CA', 'Remote'.",
                        "default": "United States"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of items to scrape.",
                        "default": 50
                    },
                    "datePosted": {
                        "title": "Date Posted (for jobs/posts)",
                        "enum": [
                            "anyTime",
                            "pastMonth",
                            "pastWeek",
                            "past24Hours"
                        ],
                        "type": "string",
                        "description": "Filter by when the job/post was published.",
                        "default": "anyTime"
                    },
                    "jobType": {
                        "title": "Job Type (jobs mode only)",
                        "enum": [
                            "",
                            "F",
                            "P",
                            "C",
                            "T",
                            "I"
                        ],
                        "type": "string",
                        "description": "Employment type filter.",
                        "default": ""
                    },
                    "linkedinCookie": {
                        "title": "LinkedIn Cookie (li_at)",
                        "type": "string",
                        "description": "LinkedIn session cookie for accessing protected content (required for people/companies)."
                    },
                    "scrapeDetails": {
                        "title": "Scrape Full Details",
                        "type": "boolean",
                        "description": "Visit each result page for complete details. Slower but more data.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Residential proxies strongly recommended for LinkedIn."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
