linkedin_ads_search_ad_library

Search LinkedIn Ad Library

Linkedin

Description

Search the LinkedIn Ad Library for ads from any advertiser. Returns real creative content — ad copy (primary text, headline, description, CTA), landing URLs, run dates, and media source/mirrored URLs. Served from Hopkin's scraped ad-library corpus (LinkedIn exposes no ad-library API), results under \

Read-onlyIdempotentOpen-world

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkedin_ads_search_ad_library",
    "arguments": {
      "search_terms": "sales automation",
      "countries": [
        "US"
      ],
      "reason": "Competitive research on B2B sales tooling ads"
    }
  }
}

Parameters

NameTypeRequiredDescription
countries array Required REQUIRED. ISO-3166-1 alpha-2 country codes (e.g. ["US", "GB"] — use "GB" not "UK") or ["ALL"]. Scopes on-demand scrapes; corpus rows carry no per-ad reach countries.
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (11)
NameTypeRequiredDescription
search_terms string Optional Keywords to search for in ad content. Spaces act as AND. Use the language the ad is written in.minLength: 1, maxLength: 100
search_type string Optional Search mode: KEYWORD_UNORDERED (default, any order) or KEYWORD_EXACT_PHRASE
KEYWORD_UNORDERED KEYWORD_EXACT_PHRASE
advertiser_name string Optional One company's ads, by name — exactly as shown on its LinkedIn page, e.g. "Refine Labs". Searches the Ad Library's advertiser-name field, so use this, NOT search_terms, to see what a company is running (if you know its numeric organization ID, organization_ids is exact); not yet in the corpus, it is looked up live and the rest of its ads are collected in the background. Includes posts from employees' profiles it paid for, marked attribution: "payer". Not together with organization_ids.minLength: 1, maxLength: 100
organization_ids array Optional Up to 10 numeric LinkedIn organization IDs — the number in linkedin.com/company/<id>, in an Ad Library companyIds= URL, or from linkedin_ads_list_tracked_competitors. The search is exact, and an organization nobody has scraped yet is looked up live (the first ID only, per call) with the rest of its ads collected in the background. Prefer this over advertiser_name when you know the ID.
ad_active_status string Optional Filter by delivery status. Default: ACTIVE
ACTIVE INACTIVE ALL
ad_delivery_date_min string Optional Minimum delivery date (YYYY-MM-DD)pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$
ad_delivery_date_max string Optional Maximum delivery date (YYYY-MM-DD). Ads whose start date is unknown (not yet detail-enriched) are excluded by this bound.pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$
display_format string Optional Filter by creative type as recorded from the LinkedIn Ad Library (case-insensitive). Observed values: sponsored_status_update, sponsored_video, sponsored_update_linkedin_article, sponsored_message, sponsored_update_native_document, sponsored_update_event. sponsored_status_update is a single-image post; the vocabulary is LinkedIn’s own and open-ended.minLength: 1
languages array Optional Filter by language name as shown in LinkedIn ad transparency data, e.g. ["English"]
limit integer Optional Results per page (default: 25, max: 50)min: 1, max: 50
cursor string Optional Pagination cursor from previous responseminLength: 1

Examples

Search by keyword

{
  "search_terms": "sales automation",
  "countries": [
    "US"
  ],
  "reason": "Competitive research on B2B sales tooling ads"
}

hopkin linkedin search-ad-library --search-terms sales automation --countries US

One company's ads, by name

{
  "advertiser_name": "Refine Labs",
  "countries": [
    "US"
  ],
  "reason": "See what a competitor agency is running"
}

hopkin linkedin search-ad-library --advertiser-name Refine Labs --countries US

One company's ads, by organization ID (exact)

{
  "organization_ids": [
    "3185"
  ],
  "countries": [
    "US"
  ],
  "reason": "View a tracked competitor's ads"
}

hopkin linkedin search-ad-library --organization-ids 3185 --countries US

Video ads only

{
  "search_terms": "crm",
  "countries": [
    "ALL"
  ],
  "display_format": "sponsored_video",
  "reason": "Creative research"
}

hopkin linkedin search-ad-library --search-terms crm --countries ALL --display-format sponsored_video