Pull LinkedIn Ads campaign performance with the versioned adAnalytics Finder API

domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register a LinkedIn Marketing Developer app and request Advertising API access plus Ad Analytics access (a separate approval on top of basic API access) with permission r_ads_reporting.
  2. Get an OAuth2 access token via the 3-legged flow, then call GET https://api.linkedin.com/rest/adAnalytics?q=analytics with a pivot (e.g. CAMPAIGN), timeGranularity, and dateRange.
  3. Scope the request to specific entities with a facet like campaigns=List(urn:li:sponsoredCampaign:...) and pass explicit fields, or you'll only get impressions and clicks back by default.
  4. Set the required LinkedIn-Version (e.g. 202606) and X-Restli-Protocol-Version: 2.0.0 headers on every call.
  5. For multi-dimension breakdowns, use the statistics finder (up to 3 pivots) instead of the single-pivot analytics finder.
  6. If long facet lists trigger a 414 URI-too-long error, switch to LinkedIn's documented query-tunneling workaround (POST with X-HTTP-Method-Override) instead of a raw GET query string.

Known gotchas

Related routes

Pull X Ads API campaign performance with synchronous Stats and asynchronous Stats Jobs endpoints
docs.x.com · 5 steps · unrated
Create a campaign via LinkedIn Marketing API with versioned header
learn.microsoft.com/en-us/linkedin/marketing · 6 steps · unrated
Create a LinkedIn Sponsored Content campaign via the Marketing API
advertising · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans