LurkAPI
Docs · Search LinkedIn ads

Search LinkedIn ads

Search LinkedIn's public Ad Library by advertiser or keyword.

1 credit per callFresh within 1 hourMCP tool: linkedin_search_ads
GEThttps://api.lurkapi.com/v1/linkedin/ads/search

Example responseView as markdown

When to use this

One page of Ad Library previews, up to about 24 ads. Pass company (advertiser name), keyword, or both. Search previews may truncate ad text; use ad details to inspect one creative and its disclosures. Each page costs one credit and does not fetch the individual ad detail pages. Pass paginationToken with the same filters for the next page. Country codes are comma-separated and run dates use YYYY-MM-DD. LinkedIn covers roughly the last year; delivery and targeting disclosures depend on the ad and region. A missing total on pagination pages is null. Block pages and malformed pagination metadata are upstream failures.

Parameters

All parameters go in the query string.

ParameterDescription
company
stringoptional
Advertiser name to search, e.g. HubSpot.
keyword
stringoptional
Words in the ad copy.
Example
hubspot
countries
stringoptional
Only ads delivered in these countries, as comma-separated two-letter codes such as DE,FR. EU is not supported as a country filter.
startDate
stringoptional
First date of the custom date range, YYYY-MM-DD. Supply endDate too; LinkedIn covers roughly the past year.
endDate
stringoptional
Last date of the custom date range, YYYY-MM-DD. Supply startDate too.
paginationToken
stringoptional
Token from the previous page. Keep company, keyword, countries and dates the same.

Example request

Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.

Language

Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….

Show the example response (2 KB)
{
  "success": true,
  "credits_remaining": 999997,
  "credits_charged": 1,
  "ads": [
    {
      "id": "1629910236",
      "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1629910236",
      "advertiser": {
        "name": "SparkGrid Software",
        "url": null
      },
      "creativeType": "SPONSORED_STATUS_UPDATE",
      "format": "Single Image Ad",
      "text": "Keep sensitive files in Box while HubSpot workflows create folders, send…",
      "headline": "Governed Box document workflows, run from HubSpot.",
      "images": [
        "https://media.licdn.com/dms/image/v2/D5610AQEL3M7oKHGAzw/image-shrink_12…"
      ],
      "videos": [],
      "cta": null
    },
    {
      "id": "1578246174",
      "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1578246174",
      "advertiser": {
        "name": "Bill Stathopoulos",
        "url": null
      },
      "creativeType": "SPONSORED_STATUS_UPDATE",
      "format": "Single Image Ad",
      "text": "My team ran outbound campaigns on signals and got 53 positive replies fr…",
      "headline": null,
      "images": [
        "https://media.licdn.com/dms/image/v2/D4D22AQGvafUbekf-RQ/feedshare-shrin…"
      ],
      "videos": [],
      "cta": null
    }
  ],
  "total": 52399,
  "isLastPage": false,
  "paginationToken": "1578246174-1790604283338"
}

Response fields

Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.

Show all 21 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
adsobject[]Ad previews in LinkedIn's search order.
ads[].idstringLinkedIn Ad Library ad id.
ads[].adLibraryUrlstringPublic detail page for this ad.
ads[].advertiserobjectThe advertiser shown on the ad.
ads[].advertiser.namestringnullableAdvertiser name shown on the preview.
ads[].advertiser.urlstringnullableAdvertiser's LinkedIn page, when linked.
ads[].creativeTypestringnullableRaw creative type LinkedIn publishes in its preview markup.
ads[].formatstringnullableHuman-readable ad format shown by LinkedIn, when available.
ads[].textstringnullableVisible ad copy. Search previews may truncate it; use ad details for the full public copy.
ads[].headlinestringnullableAd headline when the preview exposes one.
ads[].imagesstring[]Preview and carousel image URLs in source order. URLs can expire.
ads[].videosobject[]Video variants from the ad preview, or an empty list.
ads[].videos[].urlstringPlayable video source URL.
ads[].videos[].bitratenumbernullableSource bitrate in bits per second when supplied by LinkedIn.
ads[].ctastringnullableCall-to-action text shown on the preview.
totalnumbernullableTotal matching ads, when shown on the first search page; null on fragments without a count.
paginationTokenstringnullableToken for the next page; null when LinkedIn supplies none.
isLastPagebooleanTrue when LinkedIn reports the final page or a confirmed empty search.

Caching and freshness

Responses are cached for up to 1 hour, so a repeat call within that window can return the same data. It still costs 1 credit.

Errors

Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.

StatusCodeMeaning
401missing_api_keyNo API key. Send it in the x-api-key header.
401invalid_api_keyThe key is unknown or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack or wait for tomorrow's top-up.
405method_not_allowedEndpoints take GET with query params.
429rate_limitedToo many calls at once. Wait for the retry-after seconds, then retry.
500internal_errorSomething broke on our side. Retry; 5xx errors are free.
502upstream_errorThe platform didn't give a usable answer. Retry; 5xx errors are free.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds; 5xx errors are free.
504upstream_timeoutThe platform took over 30 seconds to answer. Retry; timeouts are free.

Use it in Claude

Once LurkAPI is connected to Claude, this endpoint is the linkedin_search_ads tool. Ask in plain English, for example:

Ask Claude
Use LurkAPI's linkedin_search_ads with keyword "hubspot" and summarize what you find.

Claude calls linkedin_search_ads with arguments like these, and each call costs 1 credit:

Tool arguments
{
  "keyword": "hubspot"
}

Tool results skip nulls and empty lists to save tokens.