Blog

LinkedIn Ad Library API: 7 ways to get competitor ad data

Kevin Wang
Kevin Wang
Founder, AnyAPI · November 12, 2026
linkedin adsad librarycompetitor researchapicomparison
LinkedIn Ad Library API: 7 ways to get competitor ad data
Key findings
  • LinkedIn's official APIs don't cover competitor research. Its advertising APIs only access ad accounts you manage. Its Ad Library API allows approved research, but no commercial use.
  • Search by company ID, not by name. Searching for "ramp" returned 16 ads from Rampiq and only 6 from Ramp. Searching by Ramp's LinkedIn company ID returned 24 of 24 from Ramp.
  • Run dates, impressions, and targeting are published only for ads aimed at the EU. Ramp's first 48 ads had no run dates or impressions. Filtering Rippling's ads to three EU countries returned them on 21 of 24.
  • Search is the cheap option for regular use. One call returns 24 ads with headline, text, format, call to action, and a cursor for the next page.

Built on AnyAPI

496 scraping and data APIs behind one key.

Every endpoint in this post is one call away. Pay per request in USD from a prepaid wallet, with automatic failover when a provider breaks. No subscription, no card to start.

Get ~160 free requests$0.10 of credit on signup.

If you run a B2B SaaS company, your competitors probably advertise webinars, gift cards, or customer stories to your buyers on LinkedIn every week. If you're an agency, a new client's first question will be what their competitors advertise there.

You can search any company's ads on the public LinkedIn Ad Library. It's built for looking up one company at a time, and there's no export. Checking five competitors every Monday takes a lot of clicking unless you use code.

I read LinkedIn's docs and terms to check its APIs' limits, then pulled ads for four B2B SaaS brands (Gong, HubSpot, Ramp, and Rippling) through AnyAPI's LinkedIn ads endpoints. Other prices come from each company's pages.

The best LinkedIn Ad Library APIs

What makes a good LinkedIn Ad Library API?

This comparison assumes you want your competitors' ads or your clients' competitors' ads. You'll need:

  • The right advertiser. LinkedIn's name search matches loosely, so short brand names return other companies. Searching by LinkedIn company ID or domain saves you sorting through them.
  • The text, format, and offer. Headlines, ad text, calls to action, and formats show you what competitors promote and how. Most ads give you little else.
  • Run dates and impressions, where LinkedIn shows them. For ads aimed at the EU, LinkedIn publishes run dates and a range of views. These are the best indication of how much a competitor promotes an ad.
  • Targeting, where LinkedIn shows it. For the same EU ads, LinkedIn lists the advertiser's chosen audience, such as job titles, industries, or company sizes. This tells you most directly who a competitor wants to reach.
  • A page price you can afford weekly. Tracking five competitors takes a few calls each week per company, rather than a one-off export.
How this was tested, and its limits
  • AnyAPI: 16 calls, $0.02 total. Nine searches (four by company name, two by company ID, one limited to EU countries, one second page, and one keyword), six single-ad lookups, and one call to the per-result endpoint.
  • Four brands on one day is a small sample. LinkedIn's run dates show when an ad first and last appeared, not how many days it ran.
  • LinkedIn's own APIs weren't tested. Their sections use LinkedIn's help pages, developer pages, and research program terms.
  • SearchApi, ScrapeCreators, Apify, and Adyntel weren't tested. Their sections use their docs and pricing pages, with monthly billing. SerpApi lists its LinkedIn Ad Library engine as in progress. Bright Data offers a tool to build a LinkedIn ads scraper, not a ready API. Neither is included.

The best LinkedIn Ad Library APIs at a glance

ToolBest forWhy pick itPricing
LinkedIn's advertising APIsYour own campaignsFull data on ad accounts you manage; no competitor adsNo charge; LinkedIn reviews API access
LinkedIn's Ad Library APIApproved researchOfficial search of the Ad Library, under research-only termsNo charge; gated, no commercial use
AnyAPITracking competitors by company24 ads per search by company ID, with text and format, plus run dates and impressions for EU ads$1.20 per 1,000 searches
SearchApiA fixed monthly billA search engine and an ad details engine with EU targeting and impressions by country100 free requests; $40 a month for 10,000
ScrapeCreatorsCredits that don't expireSearch and ad details at one credit a call, with fields for targeting and impressions by country100 free credits; $47 for 25,000 credits
Apify LinkedIn ad scrapersBulk exports with EU detailsFull ads with run dates, impressions, targeting, and payer, on Apify's schedulerFrom $0.55 per 1,000 ads without details
AdyntelLooking up ads by domain25 ads per call from a company's website domain50 free credits; $44 a month for 5,000 calls

Best LinkedIn Ads API for your own campaigns

LinkedIn's advertising APIs

LinkedIn's advertising APIs pros:

  • LinkedIn's own data for every campaign and ad you run
  • Spend, clicks, leads, and conversions, which the Ad Library never shows
  • Free

LinkedIn's advertising APIs cons:

  • Only ad accounts you have a role on
  • No way to look at another company's ads

LinkedIn's Marketing API lets agencies and tools create campaigns, change budgets, and get performance reports through code. You sign in with OAuth as a LinkedIn member and can only access ad accounts that member has a role on. LinkedIn reviews your application for API access.

If you run clients' LinkedIn ads, use it for their accounts. It includes everything the Ad Library omits, such as cost per lead.

It can't show you a competitor's ads or search other advertisers.

LinkedIn's advertising APIs pricing: no charge; access needs LinkedIn's approval. Source: LinkedIn Marketing API docs.

Best LinkedIn Ad Library API for approved research

LinkedIn's Ad Library API

LinkedIn's Ad Library API pros:

  • LinkedIn's own search of the Ad Library, by keyword, advertiser, payer, country, and date
  • Free

LinkedIn's Ad Library API cons:

  • Access requires approval
  • Its terms rule out business or commercial use
  • Responses shared by developers include the advertiser, payer, and ad link, but no ad text or image

LinkedIn built the Ad Library to meet the EU's Digital Services Act, which requires large platforms to keep public ad records. It covers ads run after mid-2023 and keeps each for a year after its last showing, according to LinkedIn's help page. You can also apply to use the Ad Library API in your app.

LinkedIn's Research Tools Program grants access for approved research, "such as research regarding ad transparency and platform safety". It forbids use "for business or commercial purposes". You also can't build a tool or service on it.

Apply if you're an academic or journalist studying LinkedIn ads. It isn't for tracking your company's or your clients' competitors.

It may not return the ads themselves. A developer's sample response included the advertiser, payer, ad link, format, and an empty targeting field, but no ad content. I couldn't confirm what an approved account gets today.

LinkedIn's Ad Library API pricing: no charge; access is reviewed and limited to research. Source: LinkedIn Research Tools Program terms.

Best LinkedIn Ad Library API for tracking competitors by company

AnyAPI

Ramp: 0.00×0.00×RampGong: 0.00×0.00×GongHubSpot: 6.00×6.00×HubSpotRippling: 7.00×7.00×RipplingRippling, EU countries: 21.00×21.00×Rippling,EU countries
How many of the first 24 ads in each search came back with run dates and an impression range. Rippling twice: once unfiltered, once limited to Germany, France and the Netherlands. Pulled on one day.

AnyAPI pros:

  • Searches the Ad Library by company ID, company name, or keyword, 24 ads per call, with a cursor for the next page
  • Ad text and format on almost every ad, headline and call to action where the ad has them, and run dates and impressions where LinkedIn publishes them
  • One flat price per page, from a prepaid wallet

AnyAPI cons:

  • No targeting fields, even where LinkedIn shows targeting on the ad's page
  • Some ad text is cut short: 9 of the 216 ads I pulled ended in "..."
  • The per-result call has one source, so if it's down, the call fails; search and single-ad lookups fall back to a second source
  • The single-ad lookup returned no text for a Message Ad that the search had returned in full

Choose AnyAPI to track a few B2B competitors for clients or in a tool you sell. Send a company to linkedin.ads_search to get a page of its ads.

curl -sS -X POST 'https://api.getanyapi.com/v1/run/linkedin.ads_search' \
  -H "Authorization: Bearer $ANYAPI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"companyId":"1406226"}'

One ad from Ramp's first page, with the surrounding response fields:

{
  "output": {
    "found": true,
    "data": {
      "totalAds": 12137,
      "nextCursor": "1594754833-179313891...",
      "ads": [
        {
          "id": "1603506713",
          "advertiser": "Ramp",
          "advertiserLinkedinPage": "https://www.linkedin.com/company/1406226",
          "adType": "Single Image Ad",
          "headline": "Own your AI spend",
          "description": "AI is your fastest-growing line item. Who owns it?

Ramp flags spikes and lets you set limits by user, API key, or department.",
          "cta": "Learn more",
          "destinationUrl": "",
          "startDate": "",
          "endDate": "",
          "totalImpressions": "",
          "url": "https://www.linkedin.com/ad-library/detail/1603506713"
        }
      ]
    }
  },
  "costUsd": 0.0012,
  "items": 24
}

Search by company ID, because names match loosely. Searching for "ramp" returned 24 ads, only 6 from Ramp. Sixteen were from Rampiq, and the rest from two other businesses with "ramp" in their names. Searching for "rippling" included five ads from the crypto company Ripple. ID searches returned 24 of 24 from the right advertiser for both.

Most results include the advertiser's LinkedIn link in advertiserLinkedinPage. The link ends in the company ID, so you can usually find it by searching the name and checking the advertisers. Ramp's is 1406226.

Check the returned advertisers too. Searching for "hubspot" mixed HubSpot's ads with HubSpot for Startups, a separate page. That helps if you want both, but can confuse you otherwise.

Keywords are a poor way to find competitors. Searching for "expense management" returned 24 ads from 24 advertisers; two thirds ran from personal profiles, and none were from the expected expense software brands. Use keywords to explore a topic on LinkedIn and company IDs to track competitors.

Run dates and impressions are returned for ads shown in Europe. Ramp's first two pages had neither on any of 48 ads. Gong's first page had none either. Rippling's unfiltered page had them on 7 of 24 ads; filtering to Germany, France and the Netherlands returned them on 21 of 24. Half of HubSpot's dated ads were French-language videos. If your competitors don't advertise in Europe, expect ad content without these figures.

The dates help when available. Rippling's German ads had started within the past three weeks. One English ad offering a €100 gift card to "See Rippling" had 20,000 to 30,000 impressions between its first and last showing, four days apart:

{
  "id": "1594746133",
  "advertiser": "Rippling",
  "adType": "Single Image Ad",
  "headline": "See Rippling and Get a €100 Gift Card",
  "cta": "Learn more",
  "destinationUrl": "https://www.rippling.com?trk=ad_library_ad_preview_headline_content",
  "startDate": "2026-10-28T00:00:00.000Z",
  "endDate": "2026-11-01T00:00:00.000Z",
  "totalImpressions": "20k-30k"
}

The ads show what a competitor focuses on. Nine of Ramp's first 24 ads asked finance teams who owns their AI spend. Its second page offered "Your $300 is waiting", a $300 virtual card for approved companies. Gong's first page had 18 videos out of 24, nearly all customer stories ("Cisco wins more with Gong"). Fifteen of Rippling's 24 were Message Ads, LinkedIn's sponsored inbox messages, with placeholders like %FIRSTNAME% and %JOBTITLE%. Ten of HubSpot's 24 had no headline. Two were Message Ads. Most others were promoted first-person posts from founders and speakers advertising a HubSpot for Startups event.

Search results include each ad's link. Use it with linkedin.ad to get the image or video and sometimes the landing page. Lookups took about a second per ad but mostly returned the same data as search. Four of the six ads I checked had no run dates or impressions in either response.

linkedin.ads takes an Ad Library search link and returns up to 20 ads with text and format, billed per ad returned. It returned a Rippling Message Ad's text that the single-ad lookup missed. But it has no headlines, run dates, or calls to action. A page of 20 costs about 10 times as much as a search page of 24. Use search for regular calls.

AnyAPI pricing: $1.20 per 1,000 searches of 24 ads. Single ads cost $1.20 per 1,000; if that source fails, a backup costs up to $2.53. linkedin.ads costs $0.615 per 1,000 ads returned, up to $0.0123 for a call of 20. You prepay without a plan. New accounts get free credit, no card required.

Best LinkedIn Ad Library API for a fixed monthly bill

SearchApi

SearchApi pros:

  • A LinkedIn Ad Library search by keyword, advertiser, or up to 1,000 advertiser IDs, with country and time filters
  • An ad details engine with first and last shown dates, impressions by country, targeting, and who paid, for EU ads
  • Billed only for successful searches

SearchApi cons:

  • Search returns shortened ad text; full text requires a second call per ad
  • A monthly plan, starting at $40

SearchApi has two endpoints, like most options here. Search lists ads with headlines, calls to action, and images. The ad details engine adds transparency fields. Its docs say those fields are only available for ads delivered in the EU, matching what I saw.

Choose it if you make thousands of calls a month and want a fixed bill. Searching by advertiser ID avoids name mix-ups.

SearchApi pricing: 100 free requests; Developer is $40 a month for 10,000 searches. Source: searchapi.io/pricing.

Best LinkedIn Ad Library API for credits that don't expire

ScrapeCreators

ScrapeCreators pros:

  • Ad search by company, keyword, or company ID, and ad details by link, each one credit
  • Targeting and impressions by country, plus text and run dates
  • Pay as you go, and credits never expire

ScrapeCreators cons:

  • The smallest pack is $47
  • Targeting and impressions only where LinkedIn publishes them: EU ads

ScrapeCreators sells social and ad library API calls for credits. Its ad search uses LinkedIn's filters. Its ad details include targeting and impressions by country, but those fields are empty in the docs' sample responses. Test a competitor that advertises in Europe before relying on them.

Choose it if you want to buy credits once and use them slowly, without a monthly plan.

ScrapeCreators pricing: 100 free credits; Freelance is $47 for 25,000 credits, one credit per call. Source: scrapecreators.com pricing.

Best LinkedIn Ad Library API for bulk exports with EU details

Apify LinkedIn ad scrapers

Apify LinkedIn ad scrapers pros:

  • Full ads in one run, with headline, text, calls to action, and landing page
  • Run dates, impressions, impressions by country, targeting, and payer when it opens each ad's page
  • Runs on Apify's scheduler and writes to a dataset you can export

Apify LinkedIn ad scrapers cons:

  • Each actor has a different author, fields, and price
  • Opening each ad's page takes longer; skipping it can shorten the text

An Apify actor is a scraper published in the Apify Store. One of the most used LinkedIn actors, silva95gustavo's LinkedIn Ad Library Scraper, is rated 5 out of 5 on its page. It takes Ad Library search links and returns full ads. Turn on details to open each ad's page for its run dates, impression range, and targeting.

Choose it if your team already uses Apify and wants a weekly spreadsheet of every competitor's LinkedIn ads. The listed price excludes details; check the actor's pricing tab for the full cost.

Apify LinkedIn ad scrapers pricing: silva95gustavo's from $0.55 per 1,000 ads without details. Apify's free plan includes $5 of usage a month. Source: the actor's Apify Store page.

Best LinkedIn Ad Library API for looking up ads by domain

Adyntel

Adyntel pros:

  • Takes a company's website domain, or its LinkedIn page ID, and returns its ads
  • 25 ads per call, with text, headline, format, and images
  • Calls that fail or come back empty are free

Adyntel cons:

  • No run dates, impressions, or targeting in its listed fields
  • A monthly plan, starting at $44

Adyntel looks up ads across several platforms using a company's domain. For LinkedIn, it returns a page of the company's ads, each linked to its Ad Library page for EU details.

If you have competitor domains in a CRM or spreadsheet, you won't need to find each company's LinkedIn ID first.

Adyntel pricing: 50 free credits; the smallest plan is $44 a month for 5,000 credits, one credit per call. Source: adyntel.com.

Which LinkedIn Ad Library API should you use?

  • You manage the ad accounts and want performance data: LinkedIn's advertising APIs.
  • You're doing approved academic or journalism research: LinkedIn's Ad Library API.
  • You track competitors by company and want text and formats, plus EU impressions where LinkedIn has them, paid by the call: AnyAPI.
  • You want a fixed monthly bill and EU targeting from a details call: SearchApi.
  • You want credits that don't expire: ScrapeCreators.
  • You want a scheduled export of full ads with EU details: an Apify actor.
  • You start from a list of competitor domains: Adyntel.

Whichever you choose, find each competitor's LinkedIn company ID first. Save the ads each week to see which offers and formats keep running. For other platforms, use the Google Ads Transparency Center API guide for Google and the Facebook Ad Library API guide or Facebook Ad Library tool for Meta.

Frequently asked questions

Does LinkedIn have an Ad Library API?
Yes, but it's not for businesses. LinkedIn's Ad Library API is a gated developer product, and its terms limit it to approved research projects and rule out business or commercial use. For competitor research, you read the Ad Library website yourself or use a third-party API.
Can the LinkedIn Marketing API show a competitor's ads?
No. LinkedIn's advertising APIs work on ad accounts you have a role on. They're for running and reporting on your own campaigns, and they can't read another company's ads.
Does the LinkedIn Ad Library show targeting and impressions?
Only for ads targeted to the European Union. For those, LinkedIn shows the dates the ad ran, an impression range, impressions by country, and the targeting the advertiser chose. For other ads it shows the creative, the format, and the advertiser.
How much does a LinkedIn Ad Library API cost?
Third-party APIs charge from about $2 to $9 per 1,000 calls on their smallest plans, and each call returns a page of ads. AnyAPI charges $1.20 per 1,000 searches of 24 ads each, from a prepaid wallet.

A competitor's LinkedIn ads by company ID, 24 per call, $0.0012 a call, no plan and nothing that expires. New accounts get free credit, no card required.

Try the LinkedIn Ad Search API

Use data responsibly and follow AnyAPI's Acceptable Use Policy.