Skip to main content
Glama
Captapi MCP Server

Captapi MCP Server

Official

LinkedIn Ad Library Search

linkedin_ad_library_search_ads

Search LinkedIn's public ad library by advertiser, keyword, company ID, country, or date range to retrieve ad run dates, impressions, and targeting details.

Instructions

LinkedIn publishes run dates, impressions and targeting only on a subset of creatives. Search is the SERP card; source is native. Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

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": "linkedin_ad_library_search_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoAdvertiser / account owner name (min 2 when used). Provide q/company, keyword, or companyId.
cacheNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
limitNoMax items to return (default 20, max 200). One LinkedIn SERP page is ~25 cards — when limit is higher, further pages are pulled automatically within the request's time budget, so limit=50 fills to 50 when LinkedIn has the ads (hasMore + nextCursor cover the rest). Flat 2 credits per call on the native path; the extended fallback bills ~3.5 credits per returned ad. Response `source` is native or extended so you can see which price applied.
cursorNoPagination token from paginationToken / nextCursor.
companyNoAlias of q — advertiser / account owner name.
countryNoSingle ISO country code. Default US. Ignored when countries is set. Non-ISO codes are a definitive 400 INVALID_COUNTRY — LinkedIn would otherwise answer an empty result set as if the filter worked.
endDateNoCustom range end YYYY-MM-DD (use with startDate).
keywordNoOptional keyword filter on ad creative copy. Whole-word hits are ordered first; already-fetched SERP cards without a literal hit fill behind them up to limit (matchedFrom [] = ranked fill).
companyIdNoLinkedIn numeric company id for exact advertiser match.
countriesNoComma-separated ISO country codes (e.g. US,CA,MX). Each code is validated — non-ISO codes are a 400 INVALID_COUNTRY.
startDateNoCustom range start YYYY-MM-DD (use with endDate).
paginationTokenNoAlias of cursor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

C2.9/5.0
Behavior4/5

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

With no annotations, the description carries real behavioral load: 2 credits per call, no charge on empty results or failures, free cache hits, and the caveat that run dates, impressions and targeting exist on only a subset of creatives. It does not repeat the native-versus-extended pricing or pagination behavior, but that detail lives in the schema, so this is a solid disclosure.

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?

It is short and front-loaded, but the lead sentence is a coverage caveat rather than the tool's action, and phrases like 'Search is the SERP card; source is native' cost space without conveying information an agent can act on.

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

Completeness2/5

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

For a 12-parameter search tool with no annotations and no output schema, the description should say at minimum what a result is and that q/company/companyId/keyword supply the search target. Neither is stated, so an agent cannot tell from the description alone how to form a meaningful query or what comes back.

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 coverage is 100%, so the schema already documents all 12 parameters in depth. The description only reinforces the cache parameter's free-hit behavior, adding nothing else about q, keyword, country or cursor semantics. Baseline 3 applies when the schema does the heavy lifting.

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

Purpose3/5

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

The description never plainly says it searches LinkedIn's ad library for advertiser ads; the closest is the cryptic line 'Search is the SERP card; source is native.' The name and title carry most of the meaning, and an agent would have to open the schema to confirm what resource is being searched.

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

Usage Guidelines2/5

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

The only usage guidance is cache=true versus default fresh fetching. There is no statement of when to use this tool instead of linkedin_ad_library_ad_details or the equivalent Facebook/Google/TikTok ad-library searches, and no prerequisites or exclusions.

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

Deploy Server

Other Tools