# linkedin_ads.search

Ads in the LinkedIn Ad Library for an advertiser, a keyword or a payer: the advertiser, the kind of ad, its text, headline and media, newest first.

LinkedIn Ad Library search, one of the LinkedIn Ad Library scrapers.

| | |
| --- | --- |
| Id | `linkedin_ads.search` |
| Version | 1 |
| Billed per | record — 1 unit for each record of a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/linkedin_ads.search/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `advertiser` | string | no | The advertiser's name, as on its LinkedIn page, e.g. `Microsoft`. Give at least one of `advertiser`, `keyword` and `payer`. Limit: at least 1 characters, at most 200 characters. |
| `keyword` | string | no | Words to search the ads for. Limit: at least 1 characters, at most 200 characters. |
| `payer` | string | no | The name of whoever paid for the ads, e.g. an agency. Limit: at least 1 characters, at most 200 characters. |
| `countries` | array of string | no | Only ads shown in these countries: two-letter codes such as `US` or `DE`. Leave empty for every country. |
| `ran_from` | string | no | Only ads that ran on or after this day (`YYYY-MM-DD`). The library goes back one year. Limit: matches ^\d{4}-\d{2}-\d{2}$. |
| `ran_to` | string | no | Only ads that ran on or before this day (`YYYY-MM-DD`). Limit: matches ^\d{4}-\d{2}-\d{2}$. |
| `max_results` | integer | no | The most ads to return. They load 24 at a time, so a larger number takes longer; fewer come back when the library has no more. Limit: 1 to 120. Default: `24`. |

- Give at least one of `advertiser`, `keyword` and `payer`; together they narrow the search. `advertiser` is the name on the organisation's LinkedIn page.
- `countries` takes two-letter codes; `ran_from` and `ran_to` are given together and go back one year, as long as the library keeps an ad.
- A record is what the library's list shows: a long text ends with `…` and has `text_truncated` `true`. Read the ad with [`linkedin_ads.ad`](https://docs.enrichednow.com/scrapers/linkedin_ads.ad.md) for the whole text, who paid, the dates, impressions and targeting.
- A search nothing matches ends `ok` with zero records. When the library stops answering part-way through a long list, the run ends `partial` with the ads read so far — see [the reasons of this family](https://docs.enrichednow.com/results-and-statuses.md#linkedin-ad-library).

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `position` | integer | The ad's place in the results, from 1. |
| `ad_id` | string | LinkedIn's id of the ad: the number in its address in the library. |
| `url` | string | The ad's page in the Ad Library. |
| `advertiser_name` | string or null | The organisation that runs the ad. |
| `advertiser_logo` | string or null | The advertiser's logo. |
| `format` | string or null | The kind of ad, as the library names it, e.g. `Single Image Ad`, `Video Ad`, `Carousel Ad`, `Document Ad`, `Message Ad`, `Event Ad`, `Spotlight Ad`. |
| `creative_type` | string or null | LinkedIn's own code for the kind of ad, e.g. `SPONSORED_STATUS_UPDATE`, `SPONSORED_VIDEO`. |
| `text` | string or null | The ad's text. A results page cuts a long text short; `linkedin_ads.ad` returns it whole. |
| `text_truncated` | boolean | True when the results page cut the text short (it then ends with `…`). Default: `false`. |
| `headline` | string or null | The headline under the image or video. |
| `images` | array of string | The ad's image, or the still of its video. |
| `document_pages` | array of string | The preview pages of a document ad, as images. |
| `slides` | array of object | The slides of a carousel ad, in order. |
| `slides[].title` | string or null | The slide's caption. |
| `slides[].image` | string or null | The slide's image. |
| `slides[].link_url` | string or null | Where the slide leads. Given on the ad's own page (`linkedin_ads.ad`), not in search results. |
| `event_time` | string or null | When an event ad's event takes place, as the library writes it. |
| `fetched_at` | string (date-time) | When the library was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/linkedin_ads.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"advertiser":"Deloitte","countries":["GB"],"max_results":5}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "linkedin_ads.search",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "advertiser": "Deloitte",
    "countries": [
      "GB"
    ],
    "max_results": 5
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": null,
  "units_per_record": 1,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "position": 1,
      "ad_id": "1609212913",
      "url": "https://www.linkedin.com/ad-library/detail/1609212913",
      "advertiser_name": "Deloitte",
      "advertiser_logo": "https://media.licdn.com/dms/image/v2/C560BAQGNtpblgQpJoQ/company-logo_100_100/company-logo_100_100/0/1662120928214/deloitte_logo?e=1796860800&v=beta&t=3ELVNRGPjgG86gGiaoyWjiwVWydHFiFgOUodub3yQ_o",
      "format": "Video Ad",
      "creative_type": "SPONSORED_VIDEO",
      "text": "Deloitte projects are always a team effort.\n\nThat means we listen to each other to support each other’s needs and use ou…",
      "text_truncated": true,
      "headline": "What Matters To You?",
      "images": [
        "https://media.licdn.com/dms/image/v2/D4D10AQGDLuKhKAUbqw/videocover-high/B4DaE15HP9JMBM-/0/1791905531701?e=2147483647&v=beta&t=lDURNElrhmP5ukbVDRcH7Y5QlxP18dEjRnWQ5bXGawI"
      ],
      "document_pages": [],
      "slides": [],
      "event_time": null,
      "fetched_at": "2026-11-19T18:07:40.932729Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the LinkedIn Ad Library scrapers](https://docs.enrichednow.com/results-and-statuses.md#linkedin-ad-library) are in their own section there.
