# LinkedIn Ads

Extract LinkedIn ad details, ad copy, media URL, and call-to-action buttons from Ad Library URLs

**Pricing:** $2 / 1k ads

**Endpoint:** `POST /api/v1/agents/linkedin/ads-library/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `urls` | string | Yes | LinkedIn Ad Library URL (or company URL). |
| `maxResults` | integer | No | Number of ads to return. Use 0 for all. |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/linkedin/ads-library/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"urls":"..."}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/linkedin/ads-library/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "urls": "..."
}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `adUrl` | Ad URL | url |
| `advertiser` | Advertiser | text |
| `advertiserUrl` | Advertiser URL | url |
| `advertiserLogo` | Advertiser Logo | image |
| `paidBy` | Paid By | text |
| `format` | Format | text |
| `headline` | Headline | text |
| `body` | Body | text |
| `clickUrl` | Click URL | url |
| `started` | Started | text |
| `ended` | Ended | text |
| `daysActive` | Days Active | number |
| `impressions` | Impressions | text |
| `impressionsByCountry` | Impressions By Country | object_array |
| `targetingLocation` | Targeting Location | text |
| `mediaUrl` | Media URL | url |
| `mediaType` | Media Type | text |
