---
title: "LinkedIn Ad Library Scraper | ScrapeCrate"
description: "B2B ads from the LinkedIn Ad Library. $0.20 per 1,000 ads, free monthly credit to try it. Run it from the web, the API or MCP."
url: https://scrapecrate.com/apps/linkedin-ads
markdown: https://scrapecrate.com/apps/linkedin-ads.md
---

# LinkedIn Ad Library Scraper

B2B ads from the LinkedIn Ad Library.

**Price:** $0.20 per 1,000 ads.

LinkedIn ads by keyword or advertiser with copy, format, run dates and targeting summary.

## Input

- `q` (string, optional): Keyword or phrase in the ad (required unless advertiser is set)
- `country` (string, optional, default ALL): Two-letter country code where the ads were shown, or ALL
- `date_range` (enum, optional, default all): When the ads ran (or active_from / active_to)

## Use it from your code

```bash
curl -X POST "https://api.scrapecrate.com/v1/apps/linkedin-ads/runs?wait=60" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"q":"crm","country":"ALL","date_range":"all"},"max_items":100}'
```

```javascript
const res = await fetch("https://api.scrapecrate.com/v1/apps/linkedin-ads/runs?wait=60", {
  method: "POST",
  headers: { "X-API-Key": process.env.API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "q": "crm",
      "country": "ALL",
      "date_range": "all"
    },
    "max_items": 100
  }),
});
const { run } = await res.json();
console.log(run.status, run.result_count);

// The results
const items = await fetch(`https://api.scrapecrate.com/v1/runs/${run.id}/items?format=json`, {
  headers: { "X-API-Key": process.env.API_KEY },
}).then((r) => r.json());
```

```python
import os, requests

res = requests.post(
    "https://api.scrapecrate.com/v1/apps/linkedin-ads/runs?wait=60",
    headers={"X-API-Key": os.environ["API_KEY"]},
    json={
      "input": {
        "q": "crm",
        "country": "ALL",
        "date_range": "all"
      },
      "max_items": 100
    },
)
run = res.json()["run"]
print(run["status"], run["result_count"])

items = requests.get(
    f"https://api.scrapecrate.com/v1/runs/{run['id']}/items?format=json",
    headers={"X-API-Key": os.environ["API_KEY"]},
).json()["items"]
```

```bash
# Claude Code
claude mcp add --transport http scrapecrate https://api.scrapecrate.com/mcp

# Then ask, in Claude, ChatGPT or Cursor:
LinkedIn ads about CRM software from the last 30 days
```

## Output example

```json
{
  "source": "linkedin",
  "id": "1647173344",
  "url": "https://www.linkedin.com/ad-library/detail/1647173344",
  "advertiser": {
    "name": "Example Software"
  },
  "format": "image",
  "body": "Your CRM, your ads and your site visits side by side.",
  "images": [
    {
      "type": "image",
      "url": "https://media.licdn.com/dms/image/example.jpg"
    }
  ],
  "videos": [],
  "variants_count": 1
}
```

[API reference](https://scrapecrate.com/meta-ad-library-api.md)

You pay only for the results you get. Results are kept 30 days.
