Better Fetch

LinkedIn Ad Library Scraper

Search LinkedIn's public Ad Library and inspect advertiser, creative, payer, date, impression, and targeting details without sign-in.

Socialv0.1.0~1 credit/runSource on GitHub

Workspace

Configure

Inputs stay here while results become exportable artifacts.

Start from an example

LinkedIn Ad Library ad ID.

Public LinkedIn Ad Library detail URL.

Search ads or inspect one ad.

Company or advertiser name.

End date in YYYY-MM-DD format.

Keyword or phrase.

LinkedIn company ID.

Comma-separated country codes.

Start date in YYYY-MM-DD format.

Maximum ads to return.

LinkedIn results pagination token.

Sign in and run
~1 credit/run10 runs/minute

Results

Preview, inspect, copy, or export the complete output.

Your result will become an artifact

Run the tool to inspect structured rows, raw JSON, execution details, and downloadable JSON, CSV, and Markdown files.

adadsmodecountsource_urltotal_matchespagination_token

Overview

LinkedIn Ad Library Scraper uses LinkedIn's official public Ad Library pages. Search results include stable ad IDs, advertiser names, formats, copy, headlines, logos, and creative images. Detail mode adds payer, run dates, impression ranges, targeting labels, and variant state when publicly available.

Last validated: Jul 15, 2026

Input

idstring

LinkedIn Ad Library ad ID.

urlstring

Public LinkedIn Ad Library detail URL.

mode"search" | "ad"required

Search ads or inspect one ad.

companystring

Company or advertiser name.

endDatestring

End date in YYYY-MM-DD format.

keywordstring

Keyword or phrase.

companyIdstring

LinkedIn company ID.

countriesstring

Comma-separated country codes.

startDatestring

Start date in YYYY-MM-DD format.

max_resultsintegerdefault: 10

Maximum ads to return.

paginationTokenstring

LinkedIn results pagination token.

Output

adobject

Resolved individual ad.

ad.idstring

LinkedIn Ad Library ID.

ad.urlstring

Public detail URL.

ad.formatstring

Ad format.

ad.ran_tostring

Visible run end date.

ad.headlinestring

Visible creative headline.

ad.logo_urlstring

Public advertiser logo.

ad.ran_fromstring

Visible run start date.

ad.image_urlstring

Public creative image.

ad.targetingstring

Visible targeting statements separated by semicolons.

ad.advertiserstring

Advertiser name.

ad.descriptionstring

Visible ad copy.

ad.paid_for_bystring

Disclosed payer.

ad.total_impressionsstring

Visible impression range.

ad.has_multiple_variantsboolean

Whether LinkedIn reports multiple variants.

adsobject[]required

Public LinkedIn ads.

modestringrequired

Resolved operation.

countintegerrequired

Number of ads returned.

source_urlstringrequired

Fetched LinkedIn Ad Library URL.

total_matchesinteger

Visible total matching-ad count.

pagination_tokenstring

Next LinkedIn pagination token when present.

Examples

search-ads

{
  "mode": "search",
  "company": "Microsoft",
  "max_results": 5
}

ad-details

{
  "id": "1465155164",
  "mode": "ad"
}

Use cases

B2B competitor research

Track current public ad copy and formats by company or advertiser name.

Creative intelligence

Collect source-linked headlines, descriptions, images, formats, and advertiser identity.

Transparency analysis

Inspect disclosed payer, run dates, impression ranges, and targeting parameters.

FAQ

Does this require LinkedIn sign-in?

No. It reads LinkedIn's official public Ad Library.

How long are ads available?

LinkedIn says ads remain in its Ad Library for one year after their last impression.

Why are some fields absent?

LinkedIn withholds some fields for restricted ads and exposes extra impression or targeting data only where applicable.

Use it anywhere

MCP (Claude, ChatGPT, Codex)

# After connecting https://betterfetch.co/api/mcp, ask your AI to:
1. Call search_tools for "LinkedIn Ad Library Scraper"
2. Call run_tool with:
   name: "linkedin_ad_library_scraper"
   input: {"mode":"search","company":"Microsoft","max_results":5}

REST

curl -sS -X POST "https://betterfetch.co/api/tools/linkedin_ad_library_scraper/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"mode":"search","company":"Microsoft","max_results":5}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/linkedin-ad-library-scraper && cd linkedin-ad-library-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"mode":"search","company":"Microsoft","max_results":5}'