Linkedin Ad Library

v0.1.0
io.github.pipeworx-io/linkedin-ad-library Checked 2 days ago Published 2 days ago

LinkedIn Ad Library MCP -- search and read the ads LinkedIn publishes in its public advertising…

Search and read the ads LinkedIn publishes in its public advertising transparency library: who is advertising, the ad text, headline, creative images, who paid, when it ran, impressions range and targeting. Part of Pipeworx — an MCP gateway connecting AI agents to 2082+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider. A field the library does not carry for an ad is null, and each response has a coverage note.

Summary extracted from the README.

@pipeworx/linkedin-ad-library

Search and read the ads LinkedIn publishes in its public advertising transparency library: who is advertising, the ad text, headline, creative images, who paid, when it ran, impressions range and targeting.

Part of Pipeworx — an MCP gateway connecting AI agents to 2082+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

Tools

  • linkedin_ad_library_search(advertiser?, advertiser_id?, keyword?, within?, countries?, own_ads_only?, cursor?) -- ads for an advertiser name and/or keyword, newest first, about 24 per page. Returns ad ID, library URL, creative type, ad type, advertiser name and logo, ad text, headline, images, next_cursor and has_more. within is one of last-30-days (alias 30d), current-year (alias ytd), last-year. Advertiser matching is a substring match, so each row carries advertiser_exact_match; own_ads_only=true keeps exact matches only. total_results is always null: the library does not publish a total.
  • linkedin_ad_library_ad(ad_id) -- one ad: full (untruncated) text, advertiser page URL, who paid, first and last shown dates, total impressions range, targeting the advertiser selected, call to action and destination URL.

A field the library does not carry for an ad is null, and each response has a coverage note. A refusal, rate-limit, login or challenge page from LinkedIn is an error, never an empty result. A page layout the parser does not recognise is an error that says so.

Auth

Keyless.

Data sources

  • LinkedIn, Ad Library (the advertising transparency library LinkedIn publishes without a login).

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "linkedin-ad-library": {
      "url": "https://gateway.pipeworx.io/linkedin-ad-library/mcp"
    }
  }
}

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/linkedin-ad-library/mcp returns the tools in the table above plus five Pipeworx tools: ask_pipeworx, discover_tools, ask_pipeworx_grounded, company_register_search and company_facts. ask_pipeworx answers a question this pack does not cover by routing across the whole catalog, without adding a second MCP server.

Add an option to the same URL:

  • https://gateway.pipeworx.io/linkedin-ad-library/mcp?meta=1 lists this pack's tools plus up to 48 shared Pipeworx tools (48 when this README was generated; a connection without an account lists fewer, and its own tools/list is the exact answer on any given day).
  • https://gateway.pipeworx.io/linkedin-ad-library/mcp?meta=0 lists this pack's tools alone.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

Both URLs reach the same gateway and the same 2082+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one (it is not listed on a ?meta=0 connection).

No MCP client? Call it over HTTP

curl -X POST https://gateway.pipeworx.io/v1/tools/linkedin_ad_library_search \
  -H 'Content-Type: application/json' \
  -d '{"advertiser":"Microsoft","within":"last-30-days"}'

No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/linkedin_ad_library_search. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.

Run it from npm

@pipeworx/mcp-linkedin-ad-library is a local stdio bridge to the Pipeworx gateway: your MCP client starts it with npx, and it forwards every call to the same https://gateway.pipeworx.io/linkedin-ad-library/mcp endpoint shown above. It needs network access; there is no offline mode.

{
  "mcpServers": {
    "linkedin-ad-library": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-linkedin-ad-library"]
    }
  }
}

Without a key it calls anonymously, capped at 50 calls a day. A free account raises that to 200 a day: get a key at https://pipeworx.io/signup and add "env": { "PIPEWORX_API_KEY": "<your key>" } to the server entry. The key is sent as a Bearer token, the same way a hosted connection sends it, so calls are metered and billed exactly as they are there.

It lists only this pack's tools by default. Set PIPEWORX_META_TOOLS=1 to also list ask_pipeworx and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in fetch does not read HTTPS_PROXY by default. Newer Node releases honour it when NODE_USE_ENV_PROXY=1 is set; check your Node version's documentation.

Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:

ask_pipeworx({ question: "your question about Linkedin Ad Library data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT