---
title: "Search LinkedIn's Ad Library"
method: GET
path: "/linkedin/ads"
tags: ["LinkedIn"]
---

# Search LinkedIn's Ad Library

`GET /linkedin/ads`

## Request

- Base URL: `https://api.scrapefield.com/v1`
- URL: `https://api.scrapefield.com/v1/linkedin/ads`
- Auth: one of:
  - HTTP bearer
  - none

Search the ads LinkedIn shows in its public Ad Library, by advertiser, by words in the ad or by company id, optionally by country and date: each ad's advertiser, format, headline, text, image or video, call to action, where it leads, when it ran, its impressions range and its targeting, about 25 a page. Use this to watch what a competitor advertises.

Give exactly one of `advertiser` or `company_id` or `query` to identify the search.

Costs 3 credits, whether the answer is fetched or served from cache. A failed call is refunded automatically.

## Query parameters

- `advertiser` string
- `company_id` string
- `query` string
- `countries` string
- `start_date` string
- `end_date` string
- `cursor` string
- `fresh` boolean
- `demo` boolean

## Response `200`

The request succeeded.

- object
  - `data` LinkedinAd[], required
    - `id` string, required: The Ad Library's id for the ad.
    - `url` string, uri, required: The ad in LinkedIn's Ad Library.
    - `advertiser` object, required: Who paid for the ad.
      - `name` string, nullable, required: The advertiser's name. `null` where the source does not give it.
      - `url` string, uri, nullable, required: Their company page, or a person's profile for an ad a person runs.
    - `format` string, nullable, required: As the library names it, e.g. "Single Image Ad".
    - `headline` string, nullable, required: The ad's headline.
    - `text` string, nullable, required: The ad's text.
    - `image_url` string, uri, nullable, required: The ad's image.
    - `video_url` string, uri, nullable, required: The ad's video.
    - `carousel_image_urls` string[], required: A carousel's images, in order.
    - `call_to_action` string, nullable, required: The button, e.g. "Learn more".
    - `destination_url` string, uri, nullable, required: Where the ad leads.
    - `first_shown` string, date-time, nullable, required: When it was first shown, as the library dates it.
    - `last_shown` string, date-time, nullable, required: When it was last shown, as the library dates it.
    - `impressions` string, nullable, required: The range the library shows, e.g. "1k-5k" or "<1k".
    - `impressions_by_country` object[], required: Where the ad was seen, as linkedin/ad gives it. Empty in a search.
      - `country` string, required: As the library names it.
      - `share` string, nullable, required: The share it shows, e.g. "61%" or "<1%".
    - `targeting` object, required: Whom the ad was aimed at, as the library shows it.
      - `language` string, nullable, required: As the library prints it.
      - `location` string, nullable, required: As the library prints it.
  - `meta` Meta, required
    - `request_id` string, required: Quote this if you contact support.
    - `credits_charged` integer, required: The endpoint's published cost. 0 for a demo answer, and for a list emptied because everyone in it asked not to be served. A failed call has no `meta`: it answers with an error, and is refunded.
    - `credits_remaining` integer
    - `cached` boolean, required
    - `fetched_at` string, date-time, required: When the data was actually fetched — the original time on a cache hit, so freshness is always visible.
    - `next_cursor` string, nullable, required: Pass as `cursor` for the next page. `null` on the last page. It lasts as long as the answer is cached.
    - `demo` boolean: Present, and true, on a demo answer (`?demo=true` with no key).
    - `note` string: On a demo answer: what it is, and what a live call costs.

## Other responses

- `400`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `401`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `403`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `404`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `429`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `500`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `501`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `502`: Something went wrong. `error.code` is stable; `error.message` says what to do next.

---

[API](https://skmtc.dev/scrapefield/apis/scrapefield-api.md) · [All operations](https://skmtc.dev/scrapefield/apis/scrapefield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrapefield/apis/scrapefield-api/revisions/cc5961ac63cf?raw)
