# Add Tasks

Add LinkedIn post URLs to scrape commenters and likers using the lobstr.io API

Add LinkedIn post URLs as tasks to your squid. The scraper will extract all users who commented on or reacted to the post, along with their profile information.

<AccountSyncRequired platform="LinkedIn" />

<Note>Crawler ID: `8a309e0e0df48511111a9da6382b2ef8`</Note>

## Headers

<ParamField header="Authorization" type="string" required>
  Your API authentication token. Value: `Token YOUR_API_KEY`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Request body format. Value: `application/json`
</ParamField>

## URL Format

Use any LinkedIn post URL format:

`https://www.linkedin.com/posts/username_post-title-activity-123456789/`

`https://www.linkedin.com/feed/update/urn:li:activity:123456789/`

You can copy the URL directly from any LinkedIn post.

## Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **post_url** | string | Yes | URL of the LinkedIn Post to scrape |

<Tip>
  Scrape viral posts in your industry to build targeted lead lists from engaged audiences.
</Tip>

<Note>
  The scraper extracts both commenters and likers by default. Use settings to toggle each separately.
</Note>

<Tip>
  Posts from LinkedIn influencers often have high-quality engaged audiences for B2B outreach.
</Tip>

## Code Examples

<CodeGroup>
```bash cURL
curl -X POST "https://api.lobstr.io/api/v2/squid/YOUR_SQUID_ID/task" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "post_url": "https://www.linkedin.com/posts/example_great-post-activity-7403510298726375424-RIMy"
  }'
```

```python Python
import requests

API_TOKEN = "YOUR_API_TOKEN"
SQUID_ID = "YOUR_SQUID_ID"

url = f"https://api.lobstr.io/api/v2/squid/{SQUID_ID}/task"
headers = {
    "Authorization": f"Token {API_TOKEN}",
    "Content-Type": "application/json"
}
data = {
    "post_url": "https://www.linkedin.com/posts/example_great-post-activity-7403510298726375424-RIMy"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```
</CodeGroup>

## Response

```json 200
{
  "id": "task_abc123def456",
  "status": "pending",
  "created_at": "2025-01-15T10:30:00Z",
  "post_url": "https://www.linkedin.com/posts/example_great-post-activity-7403510298726375424-RIMy"
}
```
