LinkedIn Ad Library API Access: Programmatic B2B Ad Intelligence
LinkedIn has no official ad library API, which makes its ad data the least-watched of the major platforms. This guide covers company-ID-based programmatic access, the 25-results-per-page cap, B2B analysis angles like ABM and persona signals, and a weekly competitor digest workflow.

Sections
LinkedIn ad library API access is the piece most B2B competitive research stacks are missing. Meta's transparency surface has been queried to death since 2019. Google's Ads Transparency Center gets steady traffic. LinkedIn's ad library, launched in 2023, is the youngest of the three, and almost nobody pulls it programmatically. That under-use is exactly why it matters: the platform where your B2B competitors spend their most deliberate budget is the one nobody is watching at scale.
TL;DR: LinkedIn has no official ad library API. Its native library is browser-only: searchable, but with no export and no endpoint. Programmatic access runs through third-party APIs keyed on the numeric LinkedIn company ID, and responses cap at 25 ads per page. This guide covers resolving company IDs for free, querying LinkedIn ads with real code, the B2B analysis angles (ABM signals, persona targeting in copy) that make the data valuable, and a weekly digest workflow you can ship in an afternoon.
What LinkedIn's Native Ad Library Offers — and What It Holds Back
LinkedIn shipped its ad library in mid-2023, largely in response to the EU's Digital Services Act, which forced large platforms to publish ad repositories. You can search it by company name or keyword, filter by country and date range, and click into individual ads to see the creative and the advertiser behind it. Ads that targeted EU member states carry extra transparency detail, including targeting parameters and impression information, because the DSA demands it. Ads shown elsewhere display the creative and little more.
For a one-off look at a competitor, that is genuinely useful. We covered the full browsing experience in our LinkedIn Ad Library breakdown, so here is the short version of what the native tool will not do:
- No API. There is no documented endpoint, no token, no developer program for the ad library. It is a website.
- No export. No CSV, no JSON, no bulk download. Screenshots are the ceiling.
- No performance signals outside the EU detail. You cannot sort by traction. A dead test and a scaled winner look identical.
- No alerting. Nothing tells you a competitor launched a new campaign yesterday. You find out when you remember to check.
That last gap is the expensive one. B2B deal cycles run long, and the competitor ad that starts working on your prospects in March shapes the conversations your sales team has in June. A library you check manually once a month is a rear-view mirror.
Why There Is No Official LinkedIn Ad Library API
It is worth being precise here, because the confusion costs people days. LinkedIn does have APIs. The LinkedIn Marketing API on Microsoft Learn is extensive: campaign management, reporting, audiences, conversions. But it manages your own ad account. Access requires applying to a partner program, the review takes weeks, and at the end of it there is still no endpoint that returns a competitor's ads. The Marketing API and the ad library are separate systems with zero overlap.
Contrast that with Meta, whose Ad Library API at least exposes a real queryable archive, even if it is restricted to political and issue ads in most regions (we unpacked those limits in our Meta Ad Library free API guide). Google publishes its Ads Transparency Center with downloadable BigQuery datasets for political ads. LinkedIn offers neither equivalent. The transparency exists, but only at human reading speed.
So every "LinkedIn ad library API" in practice is a third-party API: a service that collects what the native library publishes and serves it back as structured JSON you can build on. That is the category this guide is about, and it changes what is possible for B2B competitive intelligence work.
Company IDs, Not Keywords: How Programmatic LinkedIn Access Actually Works
The native library thinks in company names. Programmatic access thinks in numeric company IDs, the same identifier that appears in a LinkedIn company page URL of the form linkedin.com/company/<id>. Every reliable LinkedIn ad query is keyed on that number. Get the ID right and you get the advertiser's ads. Get it wrong and you silently analyze the wrong company, which is worse than no data.
You can find the ID by hand, but resolution is built into the AdLibrary API as a free call. GET /api/advertisers/search fans a brand name out across Meta, Google, and LinkedIn in parallel and returns candidates from each platform:
curl -G "https://adlibrary.com/api/advertisers/search" \
-H "Authorization: Bearer adl_your_api_key" \
--data-urlencode "q=Gong" \
--data-urlencode "country=US"
The response includes a candidates.linkedin array where each entry carries the numeric id, the company name, an advertiser_url, and an ad_count so you can confirm the account actually runs ads before you spend anything. Two flags matter for B2B work: is_person (a personal profile, not a company) and is_restricted (no usable ID), both of which you should skip. When at least two platforms agree on the normalized brand name, the response also includes a best_match with a confidence score, which is your sanity check that the LinkedIn entity, the Meta page, and the Google advertiser all belong to the same brand.
This resolution step costs zero credits, which is deliberate. You should never pay to discover that "Acme" on LinkedIn is three different companies and a podcast. Resolve first, query second. The pattern matches how the native LinkedIn search feature works inside the AdLibrary app, where you paste a company URL and get every ad back.
The 25-Results Reality
Here is the constraint nobody mentions until you hit it: every LinkedIn ad library API response comes back 25 ads at a time, hard cap. It does not matter what page size you request. The upstream source serves 25 per response, so every tool built on it inherits that ceiling. There is no cursor in the Meta sense either. LinkedIn pagination is plain page numbers: page 1, page 2, page 3.
Practically, this shapes your architecture in three ways:
- Deep pulls are loops, not single calls. A competitor with 180 active ads is eight sequential requests. Write the loop once and stop thinking about it.
- Each search page bills separately. On the AdLibrary API, a search costs 1 credit per page. Eight pages of one advertiser is 8 credits via search. The curate endpoint (covered below) is the cheaper path for full-portfolio pulls because a session is 1 credit with free continuation.
- Sort order is your budget lever. If you only have budget for one page, sort it so the first 25 are the 25 that matter. Sorting by
-dayssurfaces the longest-running ads, and runtime is the strongest single signal that a B2B creative is working, because advertisers kill what does not convert.
The 25-cap sounds like a limitation, and it is. It is also a forcing function. B2B advertisers on LinkedIn run far fewer concurrent creatives than DTC brands run on Meta, where a single page can carry 600 active ads. For most LinkedIn competitors, two or three pages is the entire live portfolio. The constraint that looks painful on paper rarely costs more than a few credits in practice.
Setting Up LinkedIn Ad Library API Access in Three Calls
The full setup, from zero to competitor ads in your terminal, is three steps. No app review, no partner application, no OAuth. You need an AdLibrary Business subscription, which includes API access: create a key in the dashboard (it starts with adl_ and is shown once), then authenticate every request with a Bearer header.
Call 1 — resolve the brand (free). As above: GET /api/advertisers/search?q=<brand>&country=US, take the numeric LinkedIn id from the candidate you verify.
Call 2 — pull their LinkedIn ads (1 credit). The linkedinCompanyId parameter short-circuits the search to LinkedIn only, so no keyword is needed:
curl -X POST "https://adlibrary.com/api/search" \
-H "Authorization: Bearer adl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"linkedinCompanyId": "123456",
"appType": "3",
"page": 1
}'
Each ad in results comes back with the copy fields (title, message), creative URLs, engagement counts, impression data, first_seen and last_seen timestamps, and runtime. The response also carries a total count and your remaining credit balance in _credits, so the loop knows when to stop and what it spent.
Call 3 — or go keyword-first instead. If you are mapping a category rather than a single competitor, search LinkedIn by keyword:
curl -X POST "https://adlibrary.com/api/search" \
-H "Authorization: Bearer adl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"keyword": "sales intelligence",
"platform": ["linkedin"],
"appType": "3",
"sortField": "-days"
}'
That returns the longest-running LinkedIn ads mentioning your category term, which is a ranked list of the messages your market has already validated. Full parameter documentation lives in our API documentation and implementation guide, and the public API docs cover every endpoint with live response examples.
A positioning note, because it comes up in every evaluation: Meta's free Ad Library API is genuinely fine if political ads on Meta are all you need. The moment you add LinkedIn, TikTok, or YouTube data into the same query, you need something else. The AdLibrary API is a paid power-user layer on top of what the platforms publish: more data per ad (engagement, impressions, spend estimate, heat score), eleven platforms behind one key, and no review queue.
B2B Analysis Angles: ABM Signals Hiding in Competitor Ads
Raw ads are inventory. The value for a B2B team is in what the portfolio reveals about strategy, and LinkedIn portfolios leak strategy more than any other platform because LinkedIn spend is expensive and deliberate. Nobody runs a LinkedIn campaign by accident at $9 CPCs. Run your competitor's CPM assumptions through our CPM calculator and you will see why every live ad represents a real decision.
Signals worth extracting programmatically:
- Segment pushes. When a competitor's new ads start naming an industry ("built for healthcare compliance teams"), they have pointed their account-based motion at that vertical. Diff this week's copy against last week's and the pivot shows up before their sales team reaches your prospects.
- Persona shifts. B2B copy names its target. Count mentions of "RevOps," "CFO," "engineering leaders" across the live portfolio and you have a quantified read on whose budget they are chasing, and how it changes quarter over quarter. Map it against your own ideal customer profile to see where you overlap and where they are conceding ground.
- Market entry. The
geodata on each ad shows where it runs. A competitor that has been US-only suddenly running DACH-targeted ads is opening Europe. That is pipeline-relevant intelligence months before a press release. - Message longevity. Runtime separates conviction from experiment. An ad that has run 120 days is a message that books meetings. Twelve ads that each died in under three weeks are a team still searching. Sorting by
-daysgives you their greatest hits without guessing.
None of this requires exotic analysis. It requires the ads as structured data instead of screenshots, refreshed on a schedule. That is the entire case for ad intelligence via API rather than a browser tab, and it is why sales teams increasingly want this feed too (see our ad intelligence for sales teams use case).

Reading Persona Targeting in Copy, Programmatically
LinkedIn is the one major platform where ad copy reliably encodes the targeting. A Meta ad for project management software says "stop drowning in spreadsheets." The LinkedIn version says "for engineering managers running distributed teams of 20+." The audience is in the words because LinkedIn advertisers write to a job title.
That makes LinkedIn copy unusually machine-readable. A practical pipeline: pull a competitor's live ads, feed each title and message through a classifier (an LLM prompt works fine: "extract the job title, seniority, industry, and pain point this ad addresses"), and aggregate. The output is a persona-targeting matrix built from real spend rather than conference-talk guesses.
The AdLibrary API has a native version of this step. POST /api/enrichment runs a full AI teardown of any single ad and returns the strategic read as structured data: the product, the funnel stage, who the ad targets, the core message, the persuasion mechanics, and a replication brief. One credit per analysis for text ads and videos up to 180 seconds. For the ten longest-running ads in a competitor's portfolio, ten credits buys you what a strategist would spend two days assembling. The AI ad enrichment feature page shows full example output.
Two honesty notes on the data, because precision claims kill credibility in front of a CFO. Impressions on LinkedIn ads are bucketed ranges, not exact counts, so treat them as bands when you compare ads. Spend figures are estimates, modeled rather than reported. The signals are directionally strong and consistently computed, which is what trend analysis needs. Just never paste them into a board deck as audited numbers, and sanity-check the implied lead costs against a CPA calculator before anyone builds a forecast on them.
A Working Workflow: The Weekly LinkedIn Competitor Digest
Theory ends here. This is the workflow our own users run most, and it ships in an afternoon. The shape: save your competitors once, curate weekly, diff against last week, post the delta to Slack.
Step 0 is resolution, free, as covered. Then save each competitor so the IDs persist:
import requests
BASE = "https://adlibrary.com/api"
H = {"Authorization": "Bearer adl_your_api_key"}
# one-time: save the advertiser with its LinkedIn company id
r = requests.post(f"{BASE}/advertisers", headers=H, json={
"name": "Acme CRM",
"linkedin_company_ids": ["123456"],
})
adv_id = r.json()["advertiser"]["id"]
Saving is free, and a saved advertiser can hold several IDs per platform, which matters because one brand is rarely one account. Then the weekly pull uses curate, which costs 1 credit per 30-minute session and paginates free within it:
ads, cursors = [], None
while True:
body = {"cursors": cursors} if cursors else {}
page = requests.post(
f"{BASE}/advertisers/{adv_id}/curate",
headers=H, json=body,
).json()
ads += page["linkedin"]["ads"]
nxt = page["linkedin"].get("cursors") or {}
if not any(nxt.values()):
break
cursors = {"linkedin": nxt}
LinkedIn pages arrive 25 at a time, and the continuation calls inside the session window cost nothing, so a competitor's full LinkedIn portfolio is 1 credit per week regardless of depth. Curate also returns Meta and Google ads for the same saved advertiser in the same call, so the marginal cost of going multi-platform is zero.
The diff is twenty lines of Python: key each ad by ad_key, compare against last week's stored set, and classify into new, retired, and still-running. New ads with industry or persona language trigger the interesting alerts. Retired ads that ran under 21 days tell you which messages failed. We published the general monitoring architecture in how to monitor competitor ads and a no-code variant using n8n recipes, and the same pattern is documented end-to-end in the automated competitor ad monitoring use case.
If you work agent-first instead, the API speaks fluent agent. Our Claude Code workflow guide walks the same pipeline driven by prompts, and you can wrap the endpoints into a 60-line MCP server so any AI assistant can query LinkedIn ads as a tool. Keep rate limits in mind when you schedule: 10 requests per minute and 10,000 per day per key, with a Retry-After header on 429 responses.
Where LinkedIn Fits in a Multi-Platform Stack
A LinkedIn-only view flatters LinkedIn. Serious B2B advertisers run layered motions: LinkedIn for the named-account air cover, Meta for cheap retargeting reach, Google and YouTube for demand capture. Watching one layer means misreading the strategy. A competitor who goes quiet on LinkedIn may have shifted the same budget to Meta lead forms, a move you only catch with both feeds in one place (our Meta vs LinkedIn comparison covers when each platform earns B2B budget, and the LinkedIn Ads guide goes deep on the native side).
This is the structural argument for one API over per-platform scraping. A LinkedIn ad library API that only does LinkedIn solves half the problem. The same /api/search call that takes linkedinCompanyId takes platform: ["facebook","instagram"] or a keyword fanned across all eleven supported networks. The same saved advertiser curates Meta, Google, and LinkedIn together, deduplicated, behind one request. Multi-platform coverage is the difference between knowing what a competitor runs on LinkedIn and knowing what they run, full stop. We compared the per-platform alternatives in our LinkedIn ad library alternatives guide if you want the tool-by-tool view.
What LinkedIn Ad Library API Access Costs
Pricing, plainly. API keys require the Business plan at €329/month, which includes 1,000+ credits monthly and everything below it. The credit math for a realistic LinkedIn program:
| Operation | Cost |
|---|---|
| Resolve a brand to its LinkedIn company ID | Free |
| Save / update a tracked advertiser | Free |
| Search, per page of results | 1 credit |
| Curate session (full portfolio, all platforms) | 1 credit per 30 min |
| AI teardown of one ad | 1 credit |
A weekly digest over 15 competitors is 15 credits a week via curate, roughly 60 a month. Add deep AI analysis of the five most interesting new ads each week and you are near 80 credits monthly, against the 1,000+ included. Credits reset monthly, and search, curate, and enrichment draw from the same pool, so one subscription covers research, monitoring, and analysis. The pricing page has the full tier breakdown. If you are evaluating, the honest comparison is against the analyst hours the pipeline replaces, and we walked through that build-vs-buy math in the API access alternative guide.
Frequently Asked Questions
Does LinkedIn have an official ad library API?
No. LinkedIn's ad library is a browser-only website with no documented API, no export, and no developer program. The LinkedIn Marketing API on Microsoft Learn is real but unrelated: it manages your own campaigns after a partner-program review and exposes no competitor ad data. Programmatic access to LinkedIn ads runs through third-party APIs that serve the library's contents as structured JSON.
How do I find a company's LinkedIn company ID?
The numeric ID appears in company page URLs of the form linkedin.com/company/12345. Programmatically, the AdLibrary API resolves it for free: GET /api/advertisers/search with the brand name returns LinkedIn candidates with their numeric IDs and ad counts, plus matching Meta and Google identifiers, so you can verify all three point at the same brand before spending credits.
Why do I only get 25 LinkedIn ads per response?
That is a hard upstream cap on LinkedIn data, inherited by every tool built on it. Pagination uses plain page numbers rather than cursors. Via search, each page costs 1 credit. Via a curate session on a saved advertiser, continuation pages within the 30-minute window are free, which makes curate the economical path for full-portfolio pulls.
Can I get exact impressions and spend for LinkedIn ads?
No, and any tool claiming otherwise is overselling. Impressions come as bucketed ranges and spend figures are estimates. Both are computed consistently, which makes them reliable for comparing ads against each other and tracking trends over time. Treat them as bands for analysis rather than audited figures for financial reporting.
What does LinkedIn ad library API access cost through AdLibrary?
API keys are included in the Business plan at €329/month with 1,000+ monthly credits. Brand resolution and saving advertisers are free. A search costs 1 credit per page, a curate session 1 credit per 30 minutes with free pagination inside the window, and an AI ad teardown 1 credit. A weekly 15-competitor LinkedIn monitoring program uses roughly 60-80 credits per month.
Start With One Competitor
The under-queried platform is the opportunity. Your competitors' Meta ads have been in everyone's swipe file for years. Their LinkedIn ads, the ones carrying their most expensive and most deliberate B2B messaging, mostly go unwatched because watching them by hand is tedious and the native library offers no other way.
The programmatic version is small. One free resolution call, one saved advertiser, one weekly curate, one diff. Run it for a single competitor this week and you will know more about their segment strategy by Friday than a quarter of manual checking would surface. Then scale the list.
API access ships with the Business plan (€329/mo, 1,000+ credits). Create a key in the dashboard, and the first call works in under five minutes — the API access feature page has the quickstart. The LinkedIn ad library API gap is real, but it is your gap to use.
Related Articles

LinkedIn Ad Library 2026: The Full Picture on Transparency, Costs, and What Third-Party Tools Actually Show
LinkedIn's ad transparency is thin: company-page Ads tab, no archive, no API. Here's what it shows, what it hides, and how B2B researchers fill the gap.

Ad Library Alternative for LinkedIn Ads 2026
LinkedIn's Ad Library shows active ads but no spend data or targeting depth. See the best ad library alternative for LinkedIn with full competitive intelligence.

Meta Ad Library Free API in 2026: What You Get, What Breaks, and When to Upgrade
Everything growth engineers need about Meta's free Ad Library API: app review steps, quota limits, available data fields, code samples, and when to graduate to a paid alternative.

Full adlibrary API Documentation and Implementation Guide
Complete API documentation for AdLibrary. Extract Meta Ads, Google Ads, TikTok Ads and more via REST API. Code examples, endpoints, authentication, and rate limits.

Claude Code + adlibrary API: End-to-End Competitor Intelligence Workflows
Run five Claude Code workflows against the adlibrary API for automated competitor monitoring: Slack alerts, bulk teardowns, hook extraction across 500 ads, monthly landscape reports, and new entrant detection.

How to Monitor Competitor Ads: The Ongoing Playbook for Diff-Detection and Alerts
Stop refreshing ad libraries manually. Build a competitor ad monitoring system with scheduled API pulls, diff-detection, and Slack alerts that tells you what changed since last week.

LinkedIn Ad Library Search, Now Native: Paste a Company URL, Get Every Ad
LinkedIn ad library search, native in adlibrary: paste a Company URL or ID to pull every ad, with geo/date filters, spend estimates, and downloads.