# LinkedIn All-in-One Scraper ✅ No cookies (`scrapeforge/linkedin-all-in-one`) Actor

Search LinkedIn posts by keywords, scrape profile posts, company posts, and get post details — all in one actor. Powered by real-time data, no cookies required.

- **URL**: https://apify.com/scrapeforge/linkedin-all-in-one.md
- **Developed by:** [ScrapeForge](https://apify.com/scrapeforge) (community)
- **Categories:** Social media, Lead generation, Jobs
- **Stats:** 6 total users, 3 monthly users, 65.7% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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/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 All-in-One Scraper

Search LinkedIn posts by keyword, scrape profile posts, company posts, or fetch individual post details — all in a single actor.

### Features

- **Post Search** — Search any LinkedIn post by keywords, with filters by company, author, date range, and content type
- **Profile Posts** — Extract all posts from one or more LinkedIn profiles
- **Company Posts** — Extract all posts from one or more LinkedIn company pages
- **Post Detail** — Get full details for specific posts by URL
- No cookies or LinkedIn account required
- Real-time data
- Automatic pagination

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | string | `post-search`, `profile-posts`, `company-posts`, or `post-detail` |
| `search` | string | Keywords (post-search only) |
| `profileUrls` | array | LinkedIn profile URLs |
| `companyUrls` | array | LinkedIn company page URLs |
| `postUrls` | array | LinkedIn post URLs (post-detail only) |
| `postedLimit` | string | Filter by recency: `24h`, `week`, `month` (post-search only) |
| `sortBy` | string | `relevance` or `date` (post-search only) |
| `contentType` | string | `videos`, `images`, `documents`, etc. (post-search only) |
| `maxPosts` | integer | Max posts to extract (0 = unlimited, default: 100) |

### Output

Each item in the dataset contains:

```json
{
  "id": "urn:li:activity:1234567890",
  "url": "https://www.linkedin.com/posts/...",
  "content": "Post text content...",
  "postedAt": "2024-01-15",
  "postedTimestamp": 1705276800,
  "author": {
    "id": "...",
    "name": "John Doe",
    "url": "https://www.linkedin.com/in/johndoe/",
    "avatar": "https://..."
  },
  "engagement": {
    "likes": 142,
    "comments": 23,
    "shares": 8,
    "reactions": 156
  },
  "media": {
    "images": ["https://..."],
    "video": null
  },
  "article": {
    "title": "Article title",
    "description": "...",
    "url": "https://..."
  },
  "isRepost": false,
  "repostedBy": null,
  "source": "post-search"
}
````

### Example Inputs

#### Search posts by keyword

```json
{
  "mode": "post-search",
  "search": "artificial intelligence startup",
  "postedLimit": "week",
  "sortBy": "date",
  "maxPosts": 50
}
```

#### Get posts from a company

```json
{
  "mode": "company-posts",
  "companyUrls": ["https://www.linkedin.com/company/openai/"],
  "maxPosts": 100
}
```

#### Get posts from a profile

```json
{
  "mode": "profile-posts",
  "profileUrls": ["https://www.linkedin.com/in/satyanadella/"],
  "maxPosts": 50
}
```

#### Get post details

```json
{
  "mode": "post-detail",
  "postUrls": [
    "https://www.linkedin.com/posts/username_activity-1234567890-abcd"
  ]
}
```

# Actor input Schema

## `mode` (type: `string`):

Choose what to scrape.

## `search` (type: `string`):

Keywords to search for in LinkedIn posts. Supports boolean operators (e.g. "AI AND startup"). Only used in post-search mode.

## `profileUrls` (type: `array`):

LinkedIn profile URLs to scrape posts from. Used in profile-posts and post-search (author filter) modes.

## `companyUrls` (type: `array`):

LinkedIn company page URLs to scrape posts from. Used in company-posts and post-search (company filter) modes.

## `postUrls` (type: `array`):

LinkedIn post URLs to retrieve details for. Only used in post-detail mode.

## `postedLimit` (type: `string`):

Filter posts by how recently they were posted. Only used in post-search mode.

## `sortBy` (type: `string`):

Sort posts by relevance or most recent. Only used in post-search mode.

## `contentType` (type: `string`):

Filter by content type. Only used in post-search mode.

## `maxPosts` (type: `integer`):

Maximum number of posts to extract. Use 0 for unlimited.

## Actor input object example

```json
{
  "mode": "post-search",
  "search": "artificial intelligence startup",
  "profileUrls": [
    "https://www.linkedin.com/in/username/"
  ],
  "companyUrls": [
    "https://www.linkedin.com/company/openai/"
  ],
  "postUrls": [
    "https://www.linkedin.com/posts/username_activity-1234567890-abcd"
  ],
  "postedLimit": "",
  "sortBy": "relevance",
  "contentType": "",
  "maxPosts": 100
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeforge/linkedin-all-in-one").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapeforge/linkedin-all-in-one").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 '{}' |
apify call scrapeforge/linkedin-all-in-one --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn All-in-One Scraper ✅ No cookies",
        "description": "Search LinkedIn posts by keywords, scrape profile posts, company posts, and get post details — all in one actor. Powered by real-time data, no cookies required.",
        "version": "1.0",
        "x-build-id": "hQ0HzD6hLIEO8bG59"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapeforge~linkedin-all-in-one/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapeforge-linkedin-all-in-one",
                "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/scrapeforge~linkedin-all-in-one/runs": {
            "post": {
                "operationId": "runs-sync-scrapeforge-linkedin-all-in-one",
                "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/scrapeforge~linkedin-all-in-one/run-sync": {
            "post": {
                "operationId": "run-sync-scrapeforge-linkedin-all-in-one",
                "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": "Mode",
                        "enum": [
                            "post-search",
                            "profile-posts",
                            "company-posts",
                            "post-detail"
                        ],
                        "type": "string",
                        "description": "Choose what to scrape.",
                        "default": "post-search"
                    },
                    "search": {
                        "title": "Search keywords",
                        "type": "string",
                        "description": "Keywords to search for in LinkedIn posts. Supports boolean operators (e.g. \"AI AND startup\"). Only used in post-search mode."
                    },
                    "profileUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "LinkedIn profile URLs to scrape posts from. Used in profile-posts and post-search (author filter) modes.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "companyUrls": {
                        "title": "Company URLs",
                        "type": "array",
                        "description": "LinkedIn company page URLs to scrape posts from. Used in company-posts and post-search (company filter) modes.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "postUrls": {
                        "title": "Post URLs",
                        "type": "array",
                        "description": "LinkedIn post URLs to retrieve details for. Only used in post-detail mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "postedLimit": {
                        "title": "Posted within",
                        "enum": [
                            "",
                            "24h",
                            "week",
                            "month"
                        ],
                        "type": "string",
                        "description": "Filter posts by how recently they were posted. Only used in post-search mode.",
                        "default": ""
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "relevance",
                            "date"
                        ],
                        "type": "string",
                        "description": "Sort posts by relevance or most recent. Only used in post-search mode.",
                        "default": "relevance"
                    },
                    "contentType": {
                        "title": "Content type",
                        "enum": [
                            "",
                            "videos",
                            "images",
                            "documents",
                            "live_videos",
                            "collaborative_articles",
                            "jobs"
                        ],
                        "type": "string",
                        "description": "Filter by content type. Only used in post-search mode.",
                        "default": ""
                    },
                    "maxPosts": {
                        "title": "Max posts",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of posts to extract. Use 0 for unlimited.",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
