# \[NO COOKIES] LinkedIn Post Fetcher (`scary_good_apis/linkedin-post-fetcher`) Actor

Retrieve detailed information about LinkedIn posts and their authors by ID (URN), up to 100 per run. No cookies required.

- **URL**: https://apify.com/scary\_good\_apis/linkedin-post-fetcher.md
- **Developed by:** [Scary Good APIs](https://apify.com/scary_good_apis) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 posts

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Post Fetcher

---

### 🚀 Features

- **Pay-Per-Result Pricing** - Pay only for posts delivered
- **Fetch Any Post by URN** - Complete, real-time data for any public LinkedIn post
- **Batch Fetching** - Up to 100 posts per run
- **Rich Data Extraction** - Full post content, media, engagement breakdown, and author profile
- **No Cookies Required** - No LinkedIn account, session cookies, or account risk

### 💰 Pricing

#### Pay-Per-Result Model

- **LinkedIn Posts**: $0.005 per post fetched
- **No per-run fee** - You only pay for the posts you retrieve
- **No infrastructure costs** - You only pay for actual results delivered, not the Actor runtime
- **No failed fetches charged** - API errors, deleted posts, and unsupported posts are free
- **Budget-aware** - Set a maximum cost per run and the actor only fetches what fits your budget

#### Example Costs

| Fetch Type | Cost |
|------------|------|
| Single post fetch | **$0.005** |
| Batch of 100 posts | **$0.50** |

### 📊 Output Data

#### LinkedIn Post Data Includes:

- **Author Information**: Name, profile URL, type (Person/Company), follower count, location
- **Post Content**: Full text, media (images, videos, documents)
- **Engagement Metrics**: Likes, comments, shares, reactions breakdown
- **Metadata**: Timestamp, URN, permissions

#### Multiple Output Views:

1. **Post Details** - Main table with key post information
2. **Engagement Metrics** - Detailed reaction and engagement data
3. **PPR Billing Details** - Transparent billing metadata
4. **Media Content** - Attached images, videos, and documents

#### Example Raw Output

```json
{
	"urn": "urn:li:ugcPost:7478186847056306177",
	"shareUrn": "urn:li:ugcPost:7478186847056306177",
	"approxPublishedAt": "1w",
	"timestamp": 1782938682331,
	"engagement": {
		"comments": 408,
		"reactions": {
			"LIKE": 3812,
			"PRAISE": 0,
			"EMPATHY": 0,
			"INTEREST": 0,
			"APPRECIATION": 0,
			"ENTERTAINMENT": 0
		},
		"shares": 0
	},
	"content": {
		"edited": false,
		"text": "We’re entering a new stage of the fight against Alzheimer’s. Faster diagnoses and more efficient research are on the horizon, and I’m optimistic they’ll give people living with the disease and their loved ones more time and more hope.",
		"textAttributes": [],
		"quotePost": false,
		"quotedPost": null,
		"hasImage": false,
		"hasMultipleImages": false,
		"hasVideo": true,
		"hasDocument": false,
		"hasLink": false,
		"isCelebration": false,
		"isJobPosting": false,
		"media": {
			"images": [],
			"videos": [
				{
					"contentUrl": "https://dms.licdn.com/playlist/vid/v2/D4E05AQErexIPDJOoLw/mp4-720p-30fp-crf28/B4EZ8fb1aMJYB8-/0/1782938834003?e=2147483647&v=beta&t=a5JkoXTsfBT_5iwQ8cP8bi7Z3oa_SFaL01UEsG29Zjk",
					"thumbnailUrl": "https://media.licdn.com/dms/image/v2/D4E05AQErexIPDJOoLw/videocover-high/B4EZ8fb1aMJYBM-/0/1782938829370?e=2147483647&v=beta&t=SXguHtyArCOXnZU2pEFCYKZQZSe1--Ltrj-mo7vwD2g",
					"duration": "PT1M",
					"width": 720,
					"height": 1280
				}
			],
			"articles": []
		},
		"jobPostingDetails": null
	},
	"group": null,
	"permissions": {
		"canComment": true,
		"canReact": true,
		"canShare": true,
		"canMessage": true
	},
	"poster": {
		"type": "Person",
		"name": "Bill Gates",
		"title": null,
		"profileUrl": "https://www.linkedin.com/in/williamhgates",
		"profileImage": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_200_200/B56ZRi8g.aGsAY-/0/1736826818802?e=2147483647&v=beta&t=bKWfN6UwwtiCqFWsG7rBELbd48qJOAMLdxhBzzkJV0k",
		"urn": "urn:li:member:251749025",
		"location": {
			"country": "US",
			"state": null,
			"city": null
		},
		"followersCount": 40496286,
		"currentPosition": {
			"companyUrn": "urn:li:organization:8736",
			"vanityId": "gates-foundation",
			"name": "Gates Foundation",
			"minEmployeeCount": 4207,
			"industry": "Non-profit Organizations",
			"jobLocation": {
				"country": "US",
				"state": "WA",
				"city": "Seattle"
			},
			"domain": "https://www.gatesfoundation.org/about/careers",
			"locationRaw": "Seattle",
			"description": "Guided by the belief that every life has equal value, the Gates Foundation works to help all people lead healthy, productive lives. In developing countries, we work with partners to create impactful solutions so that people can take charge of their futures and achieve their full potential. In the United States, we aim to ensure that everyone—especially those with the fewest resources—has access to the opportunities needed to succeed in school and life. Based in Seattle, Washington, the foundation is led by CEO Mark Suzman, under the direction of Bill Gates and our governing board.   ",
			"followers": 1511910,
			"slogan": null,
			"type": "Nonprofit",
			"yearFounded": null,
			"tags": [
				"Global Health",
				"Global Development",
				"US Education",
				"Gender Equality"
			]
		},
		"isFullDetails": true,
		"version": 1
	},
	"fromCache": true
}
````

### ⚙️ How to Use

#### Finding a Post's URN

Every LinkedIn post has a URN in its URL. Open the post and copy it from the address bar:

```text
https://www.linkedin.com/feed/update/urn:li:activity:7480183920727134209/
                                     └──────────── URN ────────────────┘
```

Both `urn:li:activity:...` and `urn:li:ugcPost:...` formats are supported.

#### Example Input

Pass 1–100 URNs per run:

```json
{
    "urns": [
        "urn:li:ugcPost:7478186847056306177",
        "urn:li:activity:7480183920727134209"
    ]
}
```

This fetches the full post data — content, media, engagement, and author profile — for each URN.

#### Partial Failures

If some URNs can't be fetched (deleted posts, unsupported content), the run still succeeds with the posts that worked — you're never charged for failures. Failed URNs and their reasons are saved to the `failed_urns` record in the run's key-value store.

### 📈 Use Cases

#### Post Monitoring

- Track engagement on your own or competitors' posts over time
- Re-fetch posts on a schedule to build engagement time series
- Detect edits and content changes

#### Lead Generation

- Enrich post URNs from other sources with full author profiles
- Qualify leads by follower count, company, and role
- Feed complete post data into your CRM or outreach tools

#### Market Research

- Analyze engagement on specific industry posts
- Capture company announcements with full context
- Study reaction breakdowns on viral content

#### Content Analysis

- Pull complete media and text for archived analysis
- Compare engagement across specific posts
- Verify post metadata and publish timing

### 🛡️ Data Quality & Reliability

- **Real-time Data** - Direct from LinkedIn
- **Complete Profiles** - Full author and company information
- **Accurate Metrics** - Real engagement counts and timestamps
- **Rate Limited** - Respects LinkedIn's usage policies
- **Error Handling** - Robust retry logic and error reporting

### 📋 Data Export

All data is available in multiple formats:

- **JSON** - Full structured data with all fields
- **CSV** - Flattened data perfect for spreadsheet analysis
- **Excel** - Formatted tables with proper data types
- **API Access** - Programmatic access via Apify API

### 🔗 Resources

- [Data Export Options](https://docs.apify.com/platform/storage/dataset)

# Actor input Schema

## `urns` (type: `array`):

LinkedIn post URNs (Uniform Resource Names) to fetch, up to 100 per run. Format: urn:li:activity:7480183920727134209 or urn:li:ugcPost:7478186847056306177.

## Actor input object example

```json
{
  "urns": [
    "urn:li:ugcPost:7478186847056306177"
  ]
}
```

# 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 = {
    "urns": [
        "urn:li:ugcPost:7478186847056306177"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scary_good_apis/linkedin-post-fetcher").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 = { "urns": ["urn:li:ugcPost:7478186847056306177"] }

# Run the Actor and wait for it to finish
run = client.actor("scary_good_apis/linkedin-post-fetcher").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 '{
  "urns": [
    "urn:li:ugcPost:7478186847056306177"
  ]
}' |
apify call scary_good_apis/linkedin-post-fetcher --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "[NO COOKIES] LinkedIn Post Fetcher",
        "description": "Retrieve detailed information about LinkedIn posts and their authors by ID (URN), up to 100 per run. No cookies required.",
        "version": "1.0",
        "x-build-id": "0fHJvJegETFHtvnEe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scary_good_apis~linkedin-post-fetcher/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scary_good_apis-linkedin-post-fetcher",
                "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/scary_good_apis~linkedin-post-fetcher/runs": {
            "post": {
                "operationId": "runs-sync-scary_good_apis-linkedin-post-fetcher",
                "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/scary_good_apis~linkedin-post-fetcher/run-sync": {
            "post": {
                "operationId": "run-sync-scary_good_apis-linkedin-post-fetcher",
                "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": [
                    "urns"
                ],
                "properties": {
                    "urns": {
                        "title": "LinkedIn Post URNs",
                        "minItems": 1,
                        "maxItems": 100,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "LinkedIn post URNs (Uniform Resource Names) to fetch, up to 100 per run. Format: urn:li:activity:7480183920727134209 or urn:li:ugcPost:7478186847056306177.",
                        "items": {
                            "type": "string",
                            "pattern": "^urn:([^:]*:){2}[^:]*$"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
