LinkedIn API

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"
The response

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
200 OK · application/json
{
  "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
  }
}
Reference

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

NameTypeDescription
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.

Open the reference

Use cases

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.

Pricing

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.

5,000credits a month
5005,00050,000250,000
5,000requests at 1 credit
2,500requests at 2 credits

Each endpoint says what a request costs. Requests that return nothing are free.

Best fit
Builder pack
12,000 credits, one-time payment
$29once
  • $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
Start with 10 free credits

See all packs and what a credit buys

FAQ

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

More LinkedIn APIs

Also on the same key

Other sources

Make your first request in a minute

Sign in, copy your key and call an endpoint. Your account starts with 10 free credits.