Skip to main content
Glama

LinkedIn Ad Library Scraper: Ads & Targeting · $0.80/1K

LinkedIn Ad Library

search_linkedin_ads
Read-onlyIdempotent

Ads from the LinkedIn Ad Library by company, keyword, payer, ad ID or library URL, with country, date, impression and targeting filters: ad text, headline, button, landing link, images, video and document links, format, payer, run dates, impressions by country and targeting where LinkedIn publishes them, and a B2B intent score. Advertiser ranking for a topic, new-ads monitor, video transcript, text on the image and AI marketing analysis. No login or cookies needed from you. Use for ads on LinkedIn (LinkedIn Ad Library) by company, keyword or payer; for Facebook and Instagram ads use search_meta_ads; for Google use search_google_ads. Returns {items: [...]} with one object per result, for example: {"status":"ok","adId":"1615887163","adUrl":"https://www.linkedin.com/ad-library/detail/1615887163","advertiserName":"HubSpot","format":"SINGLE_IMAGE","headline":"Reserve your seat","body":"Meet the new marketing studio...","paidBy":"HubSpot, Inc.","startDate":"2026-12-01","endDate":"2026-12-04","daysRunning":4,"impressions":"100k-150k","b2bIntentScore":25} Large requests return nextCursor: call again with only cursor to get the next page. Cost: pay per result (prices on the store page where you subscribed), or US$ 0.05 per call with x402 (up to 50 ads). Read-only: it only reads public data.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_linkedin_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoKeywords to search in ads. Comma-separate several (max 5).
maxNoMaximum ads per search (1-5000, default 20). When one call cannot carry them all, send nextCursor for the rest.
urlNoAn Ad Library search or ad URL with your filters already set (one per call).
ad_idNoAd IDs. Comma-separate several (max 20).
payerNoWho paid for the ads (name). Comma-separate several (max 5).
cursorNoNext page: the nextCursor of the previous answer. Send it alone; the first call's parameters are kept. Cursors last 24 hours.
formatNoOnly these formats, comma-separated: single image, video, carousel, document, message, conversation, event, article, text, job, follow company, spotlight.
periodNoOnly ads shown in this period.
sampleNoWith result_type=advertisers: how many ads to sample (default 240, max 2400).
compactNoShorter rows: drops logos, duplicate fields and long texts of the targeting.
companyNoCompany names, LinkedIn company page URLs or company IDs. Comma-separate several (max 10). Give company, q, payer, ad_id or url.
countryNoCountry codes (ISO 2 letters), comma-separated. Default: all countries.
date_toNoOnly ads shown on or before this date (YYYY-MM-DD, up to yesterday).
detailsNoOpen each ad: dates, impressions, targeting, payer, landing link and media (default true). false returns the faster list view.
min_daysNoOnly ads running for at least this many days.
only_newNoOnly ads this API key has not received before under the same stateKey.
searchesNoSeveral different searches in one call: JSON list of up to 10 objects, each with its own company, keyword, payer, countries, startDate, endDate, e.g. [{"company":"HubSpot","countries":["DE"]},{"keyword":"crm"}]. Plain text is read as one company name per line.
stateKeyNoWith only_new: name of your monitor (letters, numbers, - and _).
date_fromNoOnly ads shown on or after this date (YYYY-MM-DD, within the last 12 months).
targetingNoOnly ads that target by these facets, comma-separated: language, location, audience, demographic, company, education, job, interests_and_traits.
image_textNoThe words written on the ad image (imageText).
skip_emptyNoLeave out empty fields.
transcribeNoSpeech of each video ad as text: transcript, language, first 3 seconds (hook3s), timed segments. Fewer ads per call; send nextCursor for the rest.
active_onlyNoOnly ads shown in the last two days.
ai_analysisNoMarketing reading of each ad (analysis): hook, offer, offer type, angle, emotional trigger, target persona, call to action, summary.
result_typeNoadvertisers: rank who advertises for the search, from a sample of its ads. Default ads.
impressions_maxNoOnly ads with at most this many impressions.
impressions_minNoOnly ads with at least this many impressions (published for ads shown in the EU).
exclude_keywordsNoDrop ads with any of these words (comma-separated).
include_keywordsNoKeep only ads whose text, advertiser or link has one of these words (comma-separated).
exclude_targetingNoOnly ads that exclude by these facets (same names as targeting).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only/open-world/idempotent, and the description still adds real behavior: no authentication required, nextCursor pagination where the follow-up call sends only the cursor, and a concrete cost model (pay per result or US$0.05 per call, capped at 50 ads). It does not mention rate limits or what happens when a cursor expires (schema does), so not a full 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose, sibling routing and pagination/cost notes are front-loaded and valuable, but the middle of the description is a long run-on inventory of every output field and optional enrichment that repeats schema parameter names. That laundry list could be trimmed without losing callable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 31 optional parameters and no output schema, the description carries the needed weight: it supplies a sample result object, states the {items: [...]} envelope, and explains cursor-based continuation. It is slightly thin on the result_type=advertisers response shape and on how 'searches' multi-query output is structured, but otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already defines all 31 parameters. The description's enumeration of filters (country, date, impression, targeting) and enrichment flags (transcribe, image_text, ai_analysis) largely restates schema text rather than adding syntax, defaults, or interactions between parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Ads from the LinkedIn Ad Library') and immediately names the retrieval axes (company, keyword, payer, ad ID, library URL). Explicitly separates itself from search_meta_ads and search_google_ads, so an agent can route without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit use-for plus explicit alternatives with the condition that selects each ('for Facebook and Instagram ads use search_meta_ads; for Google use search_google_ads'). Also states the 'no login or cookies needed' precondition, which removes a common hesitation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.