# Add Tasks

Add LinkedIn profile URLs to scrape using the lobstr.io API

Add LinkedIn profile URLs as tasks to your squid. The scraper will extract comprehensive profile data from each LinkedIn profile you provide.

You can use various LinkedIn profile URL formats, including international versions.

<AccountSyncRequired platform="LinkedIn" />

<Note>Crawler ID: `5c11752d8687df2332c08247c4fb655a`</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 Formats

**Supported URL formats:**

`https://www.linkedin.com/in/username/`

`https://linkedin.com/in/username`

`https://fr.linkedin.com/in/username/` (international)

The URL must be a valid LinkedIn profile URL containing `/in/` followed by the user's identifier.

## Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| **url** | string | Yes | LinkedIn profile URL to scrape |

<Tip>
  You can add profiles in bulk by making multiple API requests or using the batch upload feature.
</Tip>

<Note>
  The scraper accepts both standard and international LinkedIn profile URLs (e.g., fr.linkedin.com, de.linkedin.com).
</Note>

<Tip>
  Use Sales Navigator lead export URLs or regular LinkedIn profile URLs - both work with this scraper.
</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 '{
    "url": "https://www.linkedin.com/in/williamhgates/"
  }'
```

```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 = {
    "url": "https://www.linkedin.com/in/williamhgates/"
}

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

## Response

```json 200
{
  "id": "task_abc123def456",
  "squid_id": "YOUR_SQUID_ID",
  "url": "https://www.linkedin.com/in/williamhgates/",
  "status": "pending",
  "created_at": "2024-01-15T10:30:00Z"
}
```
