LinkedIn Ad Library · Guide

How to run a LinkedIn Ad Library search ads

TL;DR
To run a LinkedIn Ad Library search ads, sign up for a free Captapi key, then send one GET request to /v1/ad-library/linkedin/search-ads with your input. You get clean JSON back in seconds for 2 credits per call — no OAuth, scraping or platform SDKs. LinkedIn Ad Library search — targeting{}, ISO dates, impressions, CTA/destination, cursor pagination (2 credits).

How to run a LinkedIn Ad Library search ads (step by step)

  1. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 2

    Call the LinkedIn Ad Library Search API

    Send an authenticated GET request to /v1/ad-library/linkedin/search-ads with your input. No OAuth, no scraping setup.

  3. 3

    Read the JSON response

    Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.

Code example

curl "https://api.captapi.com/v1/ad-library/linkedin/search-ads?q=microsoft" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

What the response looks like

{
  "success": true,
  "data": {
    "query": "microsoft",
    "keyword": null,
    "companyId": null,
    "country": "US",
    "countries": [
      "US"
    ],
    "startDate": null,
    "endDate": null,
    "totalAds": 7523,
    "totalReturned": 3,
    "paginationToken": "1456462353-1785251292711",
    "nextCursor": "1456462353-1785251292711",
    "isLastPage": false,
    "hasMore": true,
    "ads": [
      {
        "platform": "linkedin_ad_library",
        "id": "1456323573",
        "url": "https://www.linkedin.com/ad-library/detail/1456323573",
        "text": "Drowning in one off scripts and manual steps? In a free 15 minute consult, our experts help streamline IT Infrastructure Operations with PowerShell.",
        "cta": "Learn more",
        "landingUrl": "https://calendly.com/d/cvqn-kt5-t72/free-consultation?utm_campaign=32735245-PowerHouse&utm_source=linkedin&utm_medium=paidsocial&utm_term=free%20consultation&utm_content=calendly%20link&trk=ad_library_ad_preview_content_image",
        "adFormat": null,
        "firstShown": "2026-07-28",
        "lastShown": "2026-08-02",
        "impressions": "1k-5k",
        "country": "US",
        "advertiser": {
          "id": "16217038",
          "name": "ScriptRunner Software GmbH",
          "url": "https://www.linkedin.com/company/16217038",
          "logo": "https://media.licdn.com/dms/image/v2/C4D0BAQFYeG3JIAlUQg/company-logo_100_100/company-logo_100_100/0/1630544718632/scriptrunner_logo?e=1787184000&v=beta&t=CeO2dmEiPsb-6gTcpJtkBMm0c4JSLZ6b6zfm44wc_7s"
        },
        "media": [],
        "description": "Drowning in one off scripts and manual steps? In a free 15 minute consult, our experts help streamline IT Infrastructure Operations with PowerShell.",
        "destinationUrl": "https://calendly.com/d/cvqn-kt5-t72/free-consultation?utm_campaign=32735245-PowerHouse&utm_source=linkedin&utm_medium=paidsocial&utm_term=free%20consultation&utm_content=calendly%20link&trk=ad_library_ad_preview_content_image",
        "adDuration": "Ran from Jul 28, 2026 to Aug 2, 2026",
        "startDate": "2026-07-28",
        "endDate": "2026-08-02",
        "totalImpressions": "1k-5k",
        "impressionsByCountry": [
          {
            "country": "United States",
            "impressions": "97%"
          },
          {
            "country": "Canada",
            "impressions": "3%"
          }
        ],
        "targeting": {
          "language": "Targeting includes English",
          "location": "Targeting includes Germany, Switzerland and Netherlands, Benelux, DACH, United States, Canada, Austria, Belgium, United Kingdom"
        },
        "carouselImages": [],
        "paidForBy": "ScriptRunner Software GmbH",
        "countries": [
          "US"
        ]
      },
      {
        "platform": "linkedin_ad_library",
        "id": "1526380116",
        "url": "https://www.linkedin.com/ad-library/detail/1526380116",
        "text": "Built to grow together: The FY27 Microsoft Marketplace opportunity",
        "headline": "Built to grow together: The FY27 Microsoft Marketplace opportunity",
        "adFormat": null,
        "country": "US",
        "advertiser": {
          "name": "Built to grow together: The FY27 Microsoft Marketplace opportunity"
        },
        "media": [],
        "description": null,
        "destinationUrl": null,
        "adDuration": null,
        "startDate": null,
        "endDate": null,
        "totalImpressions": null,
        "impressionsByCountry": [],
        "targeting": null,
        "carouselImages": [],
        "paidForBy": null,
        "countries": [
          "US"
        ]
      }
    ]
  }
}

Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
qstringNoAdvertiser / account owner name (min 2 when used). Provide q/company, keyword, or companyId.
companystringNoSC alias of q — advertiser / account owner name.
keywordstringNoOptional keyword filter on ad creative copy.
companyIdstringNoLinkedIn numeric company id for exact advertiser match.
countrystringNoSingle ISO country code. Default US. Ignored when countries is set.
countriesstringNoComma-separated ISO country codes (e.g. US,CA,MX).
startDatestringNoCustom range start YYYY-MM-DD (use with endDate).
endDatestringNoCustom range end YYYY-MM-DD (use with startDate).
cursorstringNoPagination token from paginationToken / nextCursor.
paginationTokenstringNoSC alias of cursor.
limitintegerNoMax items to return (default 20, max 200). Flat 2 credits per call on the native path; the extended fallback bills per returned ad.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits.

Frequently asked questions

What does the LinkedIn Ad Library Search API do?

The LinkedIn Ad Library Search API lets you search and return matching results from a public LinkedIn Ad Library query using one GET request to /v1/ad-library/linkedin/search-ads. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the LinkedIn Ad Library Search API cost?

Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.

Do I need a LinkedIn Ad Library API key or OAuth?

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

Is the LinkedIn Ad Library Search API suitable for production use?

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.

Ready to run a LinkedIn Ad Library search ads?

Start free with 100 credits — no credit card required.

Get your free API key