Back to Blog
LinkedIn

LinkedIn Ad Library: How to Spy on B2B Competitors' Ad Strategy

July 28, 2026
7 min read
S
By SociaVault Team
LinkedIn AdsAd LibraryCompetitor ResearchB2B MarketingAd Spy

LinkedIn Ad Library: How to Spy on B2B Competitors' Ad Strategy

If you run B2B marketing, you already know the frustrating asymmetry: your competitors can see your LinkedIn ads, and you can see theirs, but only one at a time, one click at a time, in a UI built for browsing rather than analysis. The LinkedIn Ad Library is genuinely useful, every ad a company runs is public, but try comparing three competitors' full ad rosters and you'll be tab-hopping for an hour and still won't have anything you can sort.

This walks through how to pull that same public data programmatically so you can actually analyze it: what messaging your competitors are testing, how long an ad has been running (a decent proxy for whether it's working), and which creative angles they keep coming back to.

What the LinkedIn Ad Library actually shows

Every ad served on LinkedIn shows up in the library whether the advertiser likes it or not. For each ad you can see the advertiser, the ad creative and copy, and the date range it's been active. That last part matters more than people realize: B2B ad budgets are disciplined, so an ad that's been running for months is one that's earning its keep. Nobody keeps paying to serve a dud.

What you don't get is spend or performance numbers (LinkedIn doesn't expose those for regular commercial ads the way it does for some political advertising). So this is qualitative competitive intel, messaging, positioning, creative, and longevity, not a spend dashboard. Be honest with yourself about that distinction; I'll come back to it in the limits section.

Pulling it with the API

SociaVault's LinkedIn Ad Library endpoint takes either a company or a keyword, so you can pull one competitor's entire roster or scan a whole category by topic. Base URL is https://api.sociavault.com/v1, auth is an x-api-key header, and each call costs 1 credit. The payload comes back under data.

Here's a search by company in JavaScript:

const API_KEY = process.env.SOCIAVAULT_API_KEY;
const BASE = "https://api.sociavault.com/v1";

async function searchLinkedInAds(params) {
  const qs = new URLSearchParams(params).toString();
  const res = await fetch(`${BASE}/scrape/linkedin-ad-library/search?${qs}`, {
    headers: { "x-api-key": API_KEY },
  });
  if (!res.ok) throw new Error(`Request failed: ${res.status}`);
  const json = await res.json();
  return json.data;
}

// Pull a competitor's ads
const data = await searchLinkedInAds({ company: "Salesforce" });
console.log(data);

The same in Python:

import os, requests

API_KEY = os.environ["SOCIAVAULT_API_KEY"]
BASE = "https://api.sociavault.com/v1"

def search_linkedin_ads(**params):
    r = requests.get(
        f"{BASE}/scrape/linkedin-ad-library/search",
        headers={"x-api-key": API_KEY},
        params=params,
        timeout=60,
    )
    r.raise_for_status()
    return r.json().get("data")

data = search_linkedin_ads(company="Salesforce")
print(data)

The endpoint also accepts countries, startDate, and endDate to narrow by geography or time window, plus a paginationToken to page through a large advertiser. Read the response fields defensively, log one raw response first to confirm the exact shape before you write parsing code against it, since ad-platform payloads shift over time.

Turning a raw pull into competitive intel

Pulling the ads is the easy part. Here's what actually produces insight:

Rank by longevity. Sort a competitor's ads by how long they've been live. The oldest survivors are your competitor's proven winners, they've A/B-tested their way to those and kept paying. That's the single most useful signal in the whole library.

Cluster by message. Read the ad copy across a category and you'll see the themes everyone is leaning on, "cut costs," "AI-powered," "trusted by X," a specific pain point. Gaps in that cluster are your opening: the angle nobody in your space is running is often the one worth testing.

Watch the creative format mix. Single image vs. document ads vs. video tells you where a competitor is putting production effort. If three rivals all shifted to short video this quarter, that's a trend worth noticing before you're the last one on static images.

Track new entrants over time. Re-run the same category keyword monthly and diff the results. New advertisers showing up in your space is early competitive warning, often earlier than you'd hear it any other way.

A workflow that doesn't burn a day

Pick your 5–8 real competitors. Pull each by company once a month, store the results, and diff against last month's pull. For category-level scanning, run a keyword search on the terms your buyers use. That's maybe a dozen credits a month for a standing competitive-intelligence feed you used to pay an analyst to assemble by hand. If you're already tracking competitors elsewhere, this slots into the same routine we described in building a competitor-driven content calendar.

The honest limits

  • No spend or performance data. You can't see budgets, impressions, CTR, or conversions for standard ads. Longevity is a proxy for "working," not proof. Anyone who tells you they can pull competitor LinkedIn ad spend from the public library is guessing.
  • Only active-ish ads are visible. The library reflects what LinkedIn surfaces publicly; it isn't a guaranteed complete historical archive of everything ever run.
  • Creative, not strategy. You see the ad, not the targeting behind it. Two identical ads can be aimed at completely different audiences, and the library won't tell you which.
  • Response shapes change. Ad platforms restructure their data regularly. Parse defensively and expect to adjust field mappings occasionally.
  • It's public data, but use it responsibly. This is competitive research on publicly posted ads, not a license to scrape personal profiles. Keep the line clean.

Frequently Asked Questions

The ad library is public data that LinkedIn publishes deliberately for transparency. Accessing public pages generally sits on solid legal ground, though LinkedIn's terms of service are a separate consideration from legality. As always, this is competitive research on public ads, not a reason to touch private profile data, and it isn't legal advice.

Can I see how much a competitor spent on LinkedIn ads?

No. LinkedIn doesn't expose spend or performance figures for standard commercial ads. You can see the creative, copy, and how long an ad has run, but not budget, impressions, or results. Treat ad longevity as a rough proxy for what's working.

How do I find all the ads one company is running?

Use the LinkedIn Ad Library search endpoint with the company parameter set to the advertiser's name, then page through results with the returned paginationToken. That returns that advertiser's visible ads so you can analyze their full roster at once.

What's the difference between searching by company and by keyword?

company pulls one advertiser's ads, ideal for tracking specific competitors. keyword scans across advertisers for a term, ideal for mapping an entire category and spotting new entrants or messaging trends.

How much does it cost to pull LinkedIn ads?

Each API call is 1 credit on SociaVault, and you start with 50 free credits and no card. Monitoring a handful of competitors monthly is a few credits per cycle.

How often should I check competitor ads?

Monthly is plenty for most B2B categories, ad rotations there are slower than in DTC. Re-run the same company and keyword searches, then diff against your last pull to catch new ads and new advertisers.


Want to build a standing competitor ad feed instead of clicking through the library by hand? Start free with 50 credits, no card required and pull your first competitor's LinkedIn ads in a few minutes. If you're weighing tools first, here's our honest roundup of social scraping APIs.

Found this helpful?

Share it with others who might benefit

Ready to Try SociaVault?

Start extracting social media data with our powerful API. No credit card required.