LinkedIn Ad Library API — Search Ads by Keyword
Documentation menu
FetchLayer FetchLayer API

Search ads by keyword

Search the LinkedIn Ad Library for public ads matching a keyword or phrase — the ads B2B buyers are actually served. Filter by country, date range, payer, impressions band and targeting category, and page through the results with a cursor. Coverage begins 1 June 2023, and dateRange defaults to the last 30 days, so widen it for a historical view.

POST /search-ads Ads
https://api.fetchlayer.dev/linkedin-ad-library/search-ads
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

query string required

Keyword or phrase to search the Ad Library for (max 500 characters).

advertiser string optional

Also restrict the search to advertisers whose name contains this.

country string optional

Two-letter country code, or ALL. (default: ALL)

countries string[] optional

Several countries at once (max 20). Overrides country.

payer string optional

Name on the ad’s "paid for by" line.

dateRange string optional

last-30-days, current-month, current-year, last-year, or custom-date-range. Widen it before concluding an advertiser has gone quiet. (default: last-30-days)

startDate string optional

Only ads running on or after this YYYY-MM-DD date. Pair with dateRange custom-date-range.

endDate string optional

Only ads running on or before this YYYY-MM-DD date. Pair with dateRange custom-date-range.

impressionsMin number optional

Only ads with at least this many impressions (max 1000000000). EU-targeted ads only.

impressionsMax number optional

Only ads with at most this many impressions (max 1000000000). EU-targeted ads only.

includedTargeting string[] optional

Only ads that targeted these categories: LANGUAGE, LOCATION, AUDIENCE, DEMOGRAPHIC, COMPANY, EDUCATION, JOB, INTERESTS_AND_TRAITS. EU-targeted ads only.

excludedTargeting string[] optional

Only ads that excluded these targeting categories. EU-targeted ads only.

sortOrder string optional

Orders the whole result set by date: newest or oldest. (default: newest)

limit number optional

Maximum ads returned (max 2000), or -1 for everything available. (default: 30)

pages number optional

Pages of results to collect in one request (max 100), or -1 for the maximum allowed. Each page walked bills as one request.

cursor string optional

Resume from a previous response's nextCursor. Only valid for the same filters.

delayMs number optional

Milliseconds to wait between pages (max 30000).

sortBy string optional

Reorders only the ads in this response: start_date, end_date, advertiser, or none.

sortDirection string optional

asc or desc.

Response Fields

search-ads

Search ads by keyword

filters object

The filters this search actually ran with, after defaults were applied.

ads object[]

The matching ads, newest first unless sortOrder or sortBy says otherwise.

ads[].adId string

Ad Library id — the handle for ad-detail and ad-media.

ads[].adLibraryUrl string

Public Ad Library permalink for this ad.

ads[].format string

Ad format, e.g. SPONSORED_STATUS_UPDATE, SPONSORED_INMAILS, SPONSORED_UPDATE_CAROUSEL, SPOTLIGHT_V2. A newly introduced format is reported as-is.

ads[].formatLabel string

LinkedIn’s own label for the format, e.g. "Message Ad".

ads[].advertiser object

Name, display name, LinkedIn page URL and id, profile type (company, member, school, showcase), tagline, logo and promotedBy.

ads[].payer string

The entity named on the ad’s "paid for by" line.

ads[].creative object

Body copy, headline, CTA labels, destination link, videos, images and attachments (carousel cards, documents, events, job postings).

ads[].creative.bodyTruncated boolean

True in search results, where the copy is shortened. Call ad-detail for the full text.

ads[].startDate string

YYYY-MM-DD. Published only for ads whose targeting includes the EU; null otherwise.

ads[].endDate string

YYYY-MM-DD. Published only for ads whose targeting includes the EU; null otherwise.

ads[].runDatesLabel string

LinkedIn’s own run-dates sentence, verbatim.

ads[].impressions object

Impressions band and per-country share. Null for any ad whose targeting does not include the EU. Always a band, never an exact figure — LinkedIn publishes no spend for any ad.

ads[].targeting object

The targeting categories and values the advertiser chose, with inclusions and exclusions. Null for any ad whose targeting does not include the EU.

adCount number

Number of ads in this response.

totalMatchCount number

Ads matching these filters across every page, when LinkedIn reports it.

pagesScraped number

Pages actually walked. Each page counts as one request against your plan.

nextCursor string

Pass back as cursor to continue from where this response stopped. Only valid for the same filters.

hasNextPage boolean

Whether more results are available beyond this response.

notes string[]

Caveats about this particular result — a walk cut short, a filter the upstream capped. Read it before treating a result set as complete.

Request

curl -X POST "https://api.fetchlayer.dev/linkedin-ad-library/search-ads" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"query":"marketing automation","country":"US","dateRange":"current-year","limit":30}'

Response

{
  "adCount": 30,
  "totalMatchCount": 412,
  "pagesScraped": 1,
  "hasNextPage": true,
  "notes": [],
  "ads": [
    {
      "adId": "512345678",
      "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/512345678",
      "format": "SPONSORED_STATUS_UPDATE",
      "formatLabel": "Single Image Ad",
      "advertiser": {
        "name": "Acme Software",
        "profileUrl": "https://www.linkedin.com/company/acme-software",
        "profileType": "company"
      },
      "payer": "Acme Software Inc.",
      "creative": {
        "headline": "Cut your reporting time in half",
        "body": "See how revenue teams…",
        "bodyTruncated": true,
        "ctaTexts": [
          "Learn more"
        ]
      },
      "startDate": "2026-07-14",
      "impressions": {
        "totalLabel": "10k-50k",
        "totalMin": 10000,
        "totalMax": 50000
      }
    }
  ]
}