LinkedIn Ad Library API
Send a company's LinkedIn page or name and get the ads it runs, from LinkedIn's Ad Library, as JSON: advertiser, ad format, headline, text, image and the address of each ad's page in the library.
- 10 free credits
- No card needed
- No scraper to build or maintain
curl "https://pipefetch.com/v1/linkedin/ads?company=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmicrosoft&limit=10" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/linkedin/ads?company=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmicrosoft&limit=10', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/linkedin/ads",
params={"company": "https://www.linkedin.com/company/microsoft", "limit": 10},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]What you get
- Up to 25 ads per request, newest first
- Advertiser name and logo, and who paid
- Ad format (single image, video, carousel, document...)
- Headline, text and image of the creative
- The ad's page in LinkedIn's Ad Library
{
"data": {
"company": "https://www.linkedin.com/company/microsoft",
"ads": [
{
"id": "1702343736",
"url": "https://www.linkedin.com/ad-library/detail/1702343736",
"advertiser": "Microsoft Project Support by Milestone",
"advertiserLogoUrl": "https://media.licdn.com/dms/image/v2/D560BAQGm7yy5ucge-A/company-logo_100_100/B56Zf6yI0AHQAU-/0/1752259137092?e=1797465600&v=beta&t=punRC_MkyFkw-smExi…",
"payer": null,
"format": "Single Image Ad",
"creativeType": "SPONSORED_STATUS_UPDATE",
"headline": "Save hours and hours—with fast troubleshooting support.",
"text": "What do you do when you hit a roadblock with Project Online? Stop googling and start getting answers fast—from our frien…",
"textTruncated": true,
"callToAction": null,
"destinationUrl": null,
"imageUrl": "https://media.licdn.com/dms/image/v2/D5610AQFWME1VPbgVLw/image_627_1200/B56aILrlgqKoAg-/0/1795492305128/nochatbot1200jpgjpg?e=2147483647&v=beta&t=c_VX…",
"firstShownAt": null,
"lastShownAt": null
},
{
"id": "1702623866",
"url": "https://www.linkedin.com/ad-library/detail/1702623866",
"advertiser": "Microsoft in Business",
"advertiserLogoUrl": "https://media.licdn.com/dms/image/v2/D560BAQGfxIUgUdeVww/company-logo_100_100/B56ZgZynj1HQAQ-/0/1752779356692?e=1797465600&v=beta&t=qTEJ_W-RP50SuA-ODW…",
"payer": null,
"format": "Single Image Ad",
"creativeType": "SPONSORED_STATUS_UPDATE",
"headline": "Vylor builds a governed agentic AI knowledge framework on Microsoft Foundry in 6 months | Microsoft Customer Stories",
"text": "What if scaling AI didn’t mean building a new solution for every team? With Microsoft Foundry and Azure, Vylor built a …",
"textTruncated": true,
"callToAction": null,
"destinationUrl": null,
"imageUrl": "https://media.licdn.com/dms/image/v2/D4E10AQG4YB7fPn2I3w/image-shrink_1280/B4EaIN2zzCHUAY-/0/1795528801945?e=2147483647&v=beta&t=-8WYmuHisSv_W1306UA4C…",
"firstShownAt": null,
"lastShownAt": null
}
]
},
"credits": {
"used": 2,
"remaining": 98
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
GET/v1/linkedin/ads
Costs 2 credits per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
companyrequired |
string | The advertiser: its LinkedIn company page address (https://www.linkedin.com/company/microsoft) or its name. |
limitoptional |
integer | How many ads to return, newest first. Default: 10. From 1 to 25. |
Good to know
- A request costs 2 credits: LinkedIn's Ad Library is read over residential addresses, which cost us more.
- The ad text is the text LinkedIn shows in the library card; bodyTruncated says when LinkedIn cut it.
- A company without ads in the library answers 404 no_ads and costs nothing.
What people build with it
B2B competitor research
See the messages and offers competitors put in front of your buyers.
Creative benchmarks
Collect LinkedIn ad formats and copy in your category.
Campaign monitoring
Check a company regularly and spot new campaigns.
Ad data for AI agents
An agent researching a company sees its LinkedIn ads in one call.
Buy credits once. Use them whenever.
This endpoint costs 2 credits per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.
Each endpoint says what a request costs. Requests that return nothing are free.
- $2.42 per 1,000 credits
- About $12.08 a month at this pace
- Lasts about 2.4 months at this pace
- Credits never expire
Questions and answers
Is this the official LinkedIn API?
No. Pipefetch is an independent service and is not affiliated with LinkedIn. It returns what LinkedIn shows publicly to a visitor who is not signed in; you need no LinkedIn account, only one Pipefetch API key.
Why does a request cost 2 credits?
LinkedIn's Ad Library is read over residential addresses, which cost us more than ordinary ones.
What does a request cost?
One request costs 2 credits. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 10 free credits without a card.
More LinkedIn APIs
-
1 credit
LinkedIn Company API
The public LinkedIn page of a company: industry, size, exact followers, headquarters, website, specialties and its latest posts.
GET /v1/linkedin/company -
1 credit
LinkedIn Posts API
The latest posts of a LinkedIn profile or company page: text, author, publish time, reactions, comments, media and reposts.
GET /v1/linkedin/posts -
1 credit
LinkedIn Jobs API
LinkedIn job search results for a title or keywords and a place: job title, company, location, posting date and link.
GET /v1/linkedin/jobs -
2 credits
LinkedIn People Search API
People who work at a company, optionally with a job title: name, headline, job title, company, country and LinkedIn profile address.
GET /v1/linkedin/people
Other sources
YouTubeInstagramWebsitesTikTokFacebookGoogleThreadsApp storesSteamXPinterestAmazonAirbnbReal estateKeywordsJob boardsEventbriteShopify storesPublic tendersTrustpilotProduct HuntAudio & video
Make your first request in a minute
Sign in, copy your key and call an endpoint. Your account starts with 10 free credits.