# Linkedin Profile Scraper ($2/1000 results) (`api-ninja/linkedin-profile-scraper`) Actor

Collect LinkedIn profile posts, reactions, comments, images, videos, documents, and events.

- **URL**: https://apify.com/api-ninja/linkedin-profile-scraper.md
- **Developed by:** [API ninja](https://apify.com/api-ninja) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does LinkedIn Profile Scraper do?

[LinkedIn Profile Scraper](https://apify.com/api-ninja/linkedin-profile-scraper) collects **posts, reactions, comments, images, videos, documents, and events** from [LinkedIn](https://www.linkedin.com/) member profiles. Enter profile URLs or usernames, select the activity you need, and get a readable dataset with the **complete original record in `rawData`**. Start with one profile and the default Posts selection, or combine several modes in one run.

No LinkedIn login or session cookies are required in the input. Run the Actor manually or use Apify's API, schedules, run monitoring, webhooks, and integrations to send results to spreadsheets, databases, or automation tools.

| Mode             | What you can collect                                                                                                    |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
| 📝 **Posts**     | Available post text, author details, publication dates, media, and engagement.                                          |
| 👍 **Reactions** | A profile's reaction activity, including reactions to posts or comments, the target content, and replies when supplied. |
| 💬 **Comments**  | The profile's own comments and replies, with dates, engagement, parent-comment context, and original post details.      |
| 📸 **Images**    | Image previews, available descriptions, largest available images, dimensions, and resolution variants.                  |
| 🎬 **Videos**    | Thumbnails, post text, readable duration, reaction breakdown, comments, and shares.                                     |
| 📄 **Documents** | Cover previews, titles, page counts, PDF links, and available preview pages.                                            |
| 📅 **Events**    | Event titles, status, replay duration, views or attendees, preview images, and event links.                             |

Fields depend on what the source returns. This Actor focuses on **profile activity**; it does not extract a complete résumé, work history, education, or contact database.

### Why use LinkedIn Profile Scraper?

- **Content research:** review the topics, formats, videos, and documents shared by creators or industry experts.
- **Engagement analysis:** compare post performance and understand which conversations a profile joins.
- **Market monitoring:** follow the public activity of founders, executives, competitors, or potential partners.
- **Resource discovery:** find presentations, playbooks, PDFs, and event replays shared by relevant profiles.
- **Automated reporting:** schedule recurring runs and feed the results into Google Sheets, Make, Zapier, or your own application.

Each mode has a table tailored to its content, so you can review a comment as a comment, a document as a document, and a reaction alongside the content that received it.

### How to scrape LinkedIn profile activity

1. Open [LinkedIn Profile Scraper](https://apify.com/api-ninja/linkedin-profile-scraper) and choose **Start** or the available trial option.
2. Add at least one **LinkedIn profile URL or username** in the Input tab.
3. Under **What to scrape**, select one or more modes. **Profile posts** is selected by default.
4. Set **Maximum results per profile and mode**. The default is **100**.
5. Enable **Parse all results** only if you want to continue through all pages the source makes available.
6. Start the run, then open **Output** to review **All profile activity** or a mode-specific table.
7. Export your dataset or pass it to another tool.

The Actor retries a failed request up to **three times after the first attempt**, with a one-second delay. If a profile/mode job still fails, it reports the failure and continues with the remaining jobs. A successful run can therefore contain partial results; check the logs when a selected mode is missing.

### Input

| Field             | Type             | Default              | Description                                                                                                                             |
| ----------------- | ---------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `profileUrls`     | Array of strings | Required; no default | LinkedIn member profile URLs or usernames, one per entry. For example, `https://www.linkedin.com/in/linasbeliunas/` or `linasbeliunas`. |
| `scraperModes`    | Array of strings | `["posts"]`          | Select any combination of `posts`, `reactions`, `comments`, `images`, `videos`, `documents`, and `events`.                              |
| `maxResults`      | Integer          | `100`                | Maximum records saved **for each profile and each selected mode**. Minimum `1`. Ignored when `parseAllResults` is enabled.              |
| `parseAllResults` | Boolean          | `false`              | Continue pagination until the source returns no more available results.                                                                 |

#### LinkedIn profile scraper input example

This example collects up to 100 videos and 100 document records from one profile:

```json
{
    "profileUrls": ["linasbeliunas"],
    "scraperModes": ["videos", "documents"],
    "maxResults": 100,
    "parseAllResults": false
}
```

For posts only, provide `profileUrls` and leave the other settings at their defaults.

#### How do limits work across profiles and modes?

The maximum is **per profile, per mode**, rather than a total for the run. Two profiles, three selected modes, and `maxResults: 100` can produce up to **600 dataset records**. The source may return fewer records.

Counts refer to returned activity records. A comment record can contain parent or reply context, and a document record can contain multiple preview images. These nested objects do not each consume another result from the limit. Content can also appear in multiple modes—for example, an image post in both Posts and Images—and is not merged across modes.

#### Which LinkedIn links are supported?

Use HTTPS member profile URLs under `/in/` or usernames for every mode. Empty entries are removed, usernames are converted to profile URLs, and duplicate normalized entries are removed.

**Posts mode also accepts LinkedIn post URLs and `lnkd.in` short links.** A post URL identifies its member author, then the Actor collects that author's profile posts; it does not limit the run to that one post. Short links must resolve within LinkedIn to a supported profile or post. The other six modes require profile URLs or usernames. For a run with several modes selected, use profile inputs throughout.

Company pages, job links, and search URLs are not profile inputs. There are no time filters in this Actor.

### Output

Every saved item includes `scraperMode`, `requestedProfileUrl`, and the complete original source record in `rawData`. Normalized fields make the data easier to read and export; optional fields are omitted when unavailable.

The default **All profile activity** table provides a combined overview. Use the individual tables for the most useful details:

| Table                      | Main information                                                                                                     |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **LinkedIn profile posts** | Author, full available post text, media, publication date, and engagement.                                           |
| **Profile reactions**      | Who reacted, reaction type, post/comment target, target author and engagement, and the reactor's reply when present. |
| **Profile comments**       | Commenter, own comment or reply, date, reactions, replies, parent context, and original post.                        |
| **Profile images**         | Image preview, available description, resolution, image link, post link, and URL expiry.                             |
| **Profile videos**         | Thumbnail, post text, duration, engagement, post link, and thumbnail details.                                        |
| **Profile documents**      | Cover, title, page count, PDF link, preview pages, and URL expiry.                                                   |
| **Profile events**         | Preview, title, status, replay duration, separate views/attendees, and event link.                                   |

Table views select columns; they do not split or filter the underlying dataset by mode. In mixed runs, use `scraperMode` to filter records in your exports or downstream workflow.

#### Example video and document records

These illustrative records show selected fields for the input above. Post text is shortened, and `rawData` and temporary media links are omitted from this example for readability. Actual results retain the complete returned record.

```json
[
    {
        "scraperMode": "videos",
        "requestedProfileUrl": "https://www.linkedin.com/in/linasbeliunas/",
        "postType": "VIDEO",
        "postText": "It’s fascinating that Silicon Valley predicted AI assistants 10 years early…",
        "videoDuration": "1:23",
        "videoDurationSeconds": 83,
        "publishedText": "7h ago",
        "reactions": 411,
        "comments": 56,
        "shares": 16,
        "postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7519339458727403520/"
    },
    {
        "scraperMode": "documents",
        "requestedProfileUrl": "https://www.linkedin.com/in/linasbeliunas/",
        "postType": "DOCUMENT",
        "documentTitle": "Jev Engineering Playbook",
        "documentPageCount": 12,
        "documentPreviewPageCount": 3,
        "documentScanRequiredForDownload": true,
        "postUrl": "https://www.linkedin.com/feed/update/urn:li:activity:7509539889277894657/"
    }
]
```

You can download the dataset in various formats such as **JSON, HTML, CSV, or Excel**. JSON is useful when you want nested fields such as `rawData`, resolution variants, reaction breakdowns, or preview-page objects. Choose a mode-specific view or a field selection for a focused spreadsheet export.

### LinkedIn profile data fields

| Fields                                                                        | Meaning                                                                                                                                             |
| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `scraperMode`, `requestedProfileUrl`                                          | Activity mode and source profile or supplied posts-mode link. Usernames are normalized to profile URLs.                                             |
| `postText`, `postUrl`, `postType`                                             | Available post text or image description, source post link, and content type. Events use `eventTitle`; documents use `documentTitle`.               |
| `publishedAt`, `publishedText`                                                | Publication timestamp derived from the activity URN and relative-time text when supplied. Event publication is **not** an event start time.         |
| `authorName`, `authorHeadline`, `authorUrl`                                   | Original post author details when available. A reaction target or commenter can be a different person.                                              |
| `reactions`, `reactionBreakdown`, `comments`, `shares`                        | Post/video engagement when supplied. These are distinct from comment or reaction-target engagement.                                                 |
| `reactionType`, `reactionTargetType`, `targetText`, `targetUrl`               | Reaction indicated by the activity header, whether its target is a post or comment, and the target content/link. Unknown reaction types stay empty. |
| `targetAuthorName`, `targetReactions`, `targetReplies`                        | Reaction target author and engagement.                                                                                                              |
| `commentText`, `commentType`, `commentPublishedAt`, `commentUrl`              | The profile's own comment or reply in Comments mode. In Reactions mode, comment fields describe the selected comment target.                        |
| `commentReactions`, `commentReplies`, `parentCommentText`, `parentCommentUrl` | Comment engagement and parent context. Parent text appears only when included by the source.                                                        |
| `imageUrl`, `imageDimensions`, `imageVariants`                                | Largest available primary image, its dimensions, and available resolution variants. Resolution variants are not separate photos.                    |
| `videoDuration`, `videoDurationSeconds`, `videoThumbnailUrl`                  | Readable/numeric video duration and thumbnail. Videos mode does not turn thumbnails into playable video links.                                      |
| `documentTitle`, `documentPageCount`, `documentUrl`                           | Document title, reported page count, and PDF link when available.                                                                                   |
| `documentPreviewPages`, `documentPreviewPageCount`                            | Available preview pages, which can be fewer than the document's total pages.                                                                        |
| `eventTitle`, `eventStatus`, `eventDuration`, `eventUrl`                      | Event title, returned status, replay duration, and event link.                                                                                      |
| `eventViews`, `eventAttendees`, `eventInsight`                                | Separate audience counts parsed from explicit labels, plus the original audience text.                                                              |
| `mediaPreviewUrl`                                                             | Image, video thumbnail, document cover, or event preview.                                                                                           |
| `rawData`                                                                     | Complete unmodified source item, including fields not shown in the overview. This is the individual record, not the page-level pagination envelope. |

### How much does it cost to scrape LinkedIn profiles?

Check this Actor's [Pricing tab](https://apify.com/api-ninja/linkedin-profile-scraper/pricing) for the current rates, any minimum run charge, and plan-specific terms. Prices and free-credit eligibility depend on the active offer and your Apify account; this README does not promise a fixed number of free results.

For a controlled first run, choose one profile, one mode, and a small `maxResults` value. Selecting additional modes increases the number of requests and potential results. **Parse all results** removes the per-mode result cap and can increase runtime and cost. A result limit controls dataset size; it is not a dollar spending cap. Review the run's usage and account limits before scaling up.

### Tips and API access

#### Collect all available activity

Enable `parseAllResults` to follow the available pagination. This collects what the source exposes; it does not guarantee every historical post, reaction, comment, or event. Pagination stops on empty results, missing continuation tokens, or repeated tokens.

#### Save temporary media links promptly

Image, thumbnail, PDF, and preview URLs can be signed and expire. The Actor exposes expiry fields when supplied. Download any files you need to retain in your own workflow; this Actor saves links and metadata rather than downloading the files or transcribing their content.

#### Schedule monitoring and integrations

Create an [Apify schedule](https://docs.apify.com/actors/running/schedules) for recurring collection, then use [integrations](https://docs.apify.com/integrations) or webhooks to deliver results. Each run collects the requested activity again; incremental history and cross-run deduplication belong in your downstream workflow. Use `scraperMode` together with source identifiers such as activity URNs, comment URNs, or event IDs when comparing records.

#### Use the LinkedIn profile scraper API

Use the same JSON input from JavaScript, Python, or any HTTP client. For a small run, the synchronous endpoint returns dataset items directly:

```bash
curl --request POST \
    --url 'https://api.apify.com/v2/actors/api-ninja~linkedin-profile-scraper/run-sync-get-dataset-items' \
    --header "Authorization: Bearer $APIFY_TOKEN" \
    --header 'Content-Type: application/json' \
    --data '{
        "profileUrls": ["linasbeliunas"],
        "scraperModes": ["videos", "documents"],
        "maxResults": 10,
        "parseAllResults": false
    }'
```

Set `APIFY_TOKEN` to your Apify API token in your own environment. See the Actor's [API tab](https://apify.com/api-ninja/linkedin-profile-scraper/api) and [Apify API documentation](https://docs.apify.com/api) for clients and asynchronous runs. For long runs, start asynchronously and retrieve the dataset after completion.

### Other LinkedIn Scraping Tools

Choose the tool that matches the source you want to explore:

- 👤 **[LinkedIn Profile Posts Scraper](https://apify.com/api-ninja/linkedin-profile-posts-scraper)**: A dedicated workflow for posts published by member profiles.
- 💡 **[LinkedIn Post Reactions Scraper](https://apify.com/api-ninja/linkedin-post-reactions-scraper)**: Collect people who reacted to specific posts and their reaction types.
- 💬 **[LinkedIn Post Comments Scraper](https://apify.com/api-ninja/linkedin-post-comments-scraper)**: Collect comments and optional replies from specific post URLs.
- 🏢 **[LinkedIn Company Posts Scraper](https://apify.com/api-ninja/linkedin-company-posts-scraper)**: Collect posts, media, and engagement from company pages.
- 🔁 **[LinkedIn Post Reposters Scraper](https://apify.com/api-ninja/linkedin-post-reposters-scraper)**: Find people and companies that reposted a post.
- 🔎 **[LinkedIn Post Search Scraper](https://apify.com/api-ninja/linkedin-post-search-scraper)**: Discover posts using keywords and filters.
- 💼 **[LinkedIn Jobs Scraper](https://apify.com/api-ninja/linkedin-jobs-scraper)**: Search and extract structured job listings.

### FAQ and support

#### What is the difference between profile reactions and post reactions?

**Profile reactions** follows the activity of the profiles you provide: what those people reacted to. **Post reactions** starts from specific post URLs and collects the people who reacted to those posts. Likewise, Comments mode here follows a profile's own comments and replies; the dedicated Post Comments Scraper collects comments on a specified post.

#### Why are some fields or modes empty?

Availability varies by profile, content type, and source response. Image descriptions may contain only a generic interface label, a video record may provide a thumbnail without a playable stream, and a reply may identify its parent without returning the parent's text. Unavailable content stays empty. Some normalized post counters default to `0` when the source omits them; inspect `rawData` when you need to distinguish zero from an unreported metric. An empty mode can also mean the source has no available activity of that type.

#### Can I get playable videos, full PDFs, or event recordings?

Videos mode returns the thumbnail and metadata present in the supplied response, which may not include a playable video URL. Documents mode provides a PDF link when available; cover previews are not the complete PDF. Events mode links to the event/replay page. The Actor does not download media files, bypass a document's download requirements, or extract transcripts.

#### Why did a profile or selected mode fail?

Check that the input is a member profile URL or username and that the activity is available. Post URLs and short links are supported only in Posts mode. Review run logs for the failed profile/mode job; provider availability or an unexpected response can cause a failure even after retries. Other jobs can still complete and their saved output remains available. If every job fails, the run ends unsuccessfully.

#### Is it legal to scrape LinkedIn activity?

Use the Actor responsibly and review LinkedIn's terms and the privacy and data-protection requirements that apply to your situation. Public availability does not remove obligations when collecting or using personal data. This tool is not affiliated with LinkedIn.

#### Where can I get help or request a custom workflow?

For help, feature requests, or a custom LinkedIn workflow, contact the developer through the [API ninja profile](https://apify.com/api-ninja). Include the affected mode, run ID, expected behavior, and a reproducible input without credentials or sensitive data.

# Actor input Schema

## `scraperModes` (type: `array`):

Select one or more activity types. Profile posts uses the original posts scraper.

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

One public LinkedIn profile URL or username per row. Posts also supports LinkedIn post URLs and lnkd.in short links; other modes require profiles.

## `maxResults` (type: `integer`):

Save up to this many results for each selected mode for each profile. Ignored when Parse all results is enabled.

## `parseAllResults` (type: `boolean`):

Continue pagination for every selected mode until the API returns no more available results.

## Actor input object example

```json
{
  "scraperModes": [
    "posts"
  ],
  "profileUrls": [
    "https://www.linkedin.com/in/linasbeliunas/"
  ],
  "maxResults": 100,
  "parseAllResults": false
}
```

# Actor output Schema

## `results` (type: `string`):

Browse useful overview fields and complete original records in rawData.

# 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 = {
    "profileUrls": [
        "https://www.linkedin.com/in/linasbeliunas/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-ninja/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 = { "profileUrls": ["https://www.linkedin.com/in/linasbeliunas/"] }

# Run the Actor and wait for it to finish
run = client.actor("api-ninja/linkedin-profile-scraper").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 '{
  "profileUrls": [
    "https://www.linkedin.com/in/linasbeliunas/"
  ]
}' |
apify call api-ninja/linkedin-profile-scraper --silent --output-dataset

```

## MCP server setup

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

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/Nk9UQ2ye3I5gGhuu5/builds/aFArG7iCT1CMV2Os3/openapi.json
