LinkedIn Ads

LinkedIn ads for B2B: performance, creatives, conversions, change history and the ads your competitors run.

Connect

Add this server to your assistant with the install guide for your client.

Server URL https://linkedin.mcp.hopkin.ai

From the command line
npm install -g @hopkin/cli
hopkin auth set-key hpk_live_...
hopkin linkedin ping

Reporting

Creative

Competitors

Tracking and conversions

Keywords and planning

Accounts and campaigns

Change history

Connections and account

Workflows

Questions B2B marketers ask about LinkedIn, and how Hopkin works through them. Hopkin never changes your account.

Where did the budget go

"Which campaigns drove our leads last month, and what did each lead cost?"

Hopkin starts with the Get account summary for the total picture, then breaks it down by campaign with Get performance report. Conversions are split by action, so a demo request and a content download stay separate.

Which people are converting

"Which job titles and seniority levels are turning into leads?"

Hopkin first checks which conversions are tracked with Get partner conversions, so a missing tag doesn't read as a weak audience. Then Get insights splits results by job title, seniority, industry or company. LinkedIn hides very small groups and lags up to a day, so splits won’t match the account total.

Which creative angle wins

"Which hook types get us the cheapest leads?"

Once Enable creative intelligence is on for the account, Get performance report can group results by hook or format. Hopkin then opens the best example with Get creative analysis. Turning it on is a Hopkin setting, not a LinkedIn change, and each analyzed creative uses credits.

What changed before the numbers moved

"Cost per lead jumped last week. What happened?"

Hopkin pulls a daily view from Get performance report to find the day it moved, then checks Get activities for budget, bid, targeting or status edits around it. LinkedIn keeps no change history of its own, so Hopkin's record starts when it first scanned your account.

How the account is built

"Walk me through our campaign groups, campaigns and ads."

Hopkin lists the groups with List campaign groups, the campaigns inside them with List campaigns, and the ads, with headline, copy and destination, with List creatives. Ask for targeting and you get job titles and industries by name.

How Conversation Ads are doing

"How are our Conversation Ads doing on sends and opens?"

These ads report sends instead of impressions, so Hopkin asks Get performance report for the messaging view: sends, opens, open rate and cost per send. Which step of a conversation loses people is a job for Get insights, though many accounts get nothing back for that.

What competitors are running

"What is our biggest competitor running on LinkedIn right now?"

For a one-off look, Search ad library finds an advertiser's ads by company name. To keep watching, Track competitor adds them to Hopkin's daily check, then List competitor ads shows what launched recently or has run the longest. Get competitor ad opens one ad in full. Tracking changes only Hopkin's list.

For agents

Choosing a reporting tool

  • Default to linkedin_ads_get_performance_report. Pivots: ACCOUNT, CAMPAIGN_GROUP, CAMPAIGN, CREATIVE, SHARE, COMPANY, CONVERSION, SERVING_LOCATION, PLACEMENT_NAME, IMPRESSION_DEVICE_TYPE, CARD_INDEX, OBJECTIVE_TYPE; up to 3, default [CAMPAIGN]. include_conversion_breakdown defaults to true there and adds one API call.
  • Use linkedin_ads_get_insights only for MEMBER_* pivots (MEMBER_JOB_TITLE, MEMBER_JOB_FUNCTION, MEMBER_SENIORITY, MEMBER_INDUSTRY, MEMBER_COMPANY_SIZE, MEMBER_COMPANY, MEMBER_COUNTRY_V2, MEMBER_REGION_V2, MEMBER_COUNTY), CONVERSATION_NODE, or custom metrics. It takes one pivot; include_conversion_breakdown defaults to false there.
  • metrics on Get insights needs exact camelCase LinkedIn field names (for example costInLocalCurrency, externalWebsiteConversions, oneClickLeads), max 18. Aliases such as conversions or spend are rejected as inputs; they only appear in output rows.
  • linkedin_ads_get_account_summary takes account_id and a date range only. Use it for the headline numbers, not for breakdowns.
  • Dates: date_preset is one of LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS (default), THIS_MONTH, LAST_MONTH, LAST_90_DAYS; or start_date and end_date as YYYY-MM-DD. Conversion data can lag 24 to 72 hours; MEMBER_* pivots lag 12 to 24 hours and have a 3-event minimum per row, so rows are dropped and totals will not match the account.
  • Paging differs by tool: Get performance report returns a top-level nextCursor; Get insights nests it as pagination.hasMore and pagination.nextCursor. Pass cursor back with identical other parameters. Both take limit up to 1000.

Check conversion tracking first

Call linkedin_ads_get_partner_conversions with account_id before reading conversion numbers. It is paged (limit up to 200).

Account, campaign, creative hierarchy

1. linkedin_ads_list_ad_accounts for account_id values.

2. linkedin_ads_list_campaign_groups; status defaults to [ACTIVE, PAUSED].

3. linkedin_ads_list_campaigns with campaign_group_id, or campaign_ids (max 50). type accepts TEXT_AD, SPONSORED_UPDATES, SPONSORED_INMAILS, DYNAMIC, EVENT_AD. include_targeting: true adds resolved targeting facets, audience expansion, frequency cap and conversion actions (several extra API calls); include_forecast: true needs include_targeting.

4. linkedin_ads_list_creatives with campaign_ids (max 20). Headline, body copy and destination URL are always resolved; there is no content flag. status defaults to [ACTIVE, PAUSED, DRAFT].

List tools are cached; pass refresh: true to fetch live from LinkedIn.

To find the ads in the highest-spend campaigns: Get performance report with pivots: ["CAMPAIGN"], sort the rows by spend yourself, then List creatives with those campaign_ids.

Creative intelligence

  • linkedin_ads_enable_creative_intelligence with ad_account_id and enabled: true enrolls an account (omit both to list enrolled accounts). It starts a daily sweep of creatives that spent in the last 90 days. Enabling is free; each newly analyzed creative costs 5 credits. Enrollment belongs to the connection, so teammates sharing it see and can change it.
  • With a CREATIVE pivot, Get performance report rows carry a profile block, null until analyzed. group_by (hook_type, format, archetype, promise_type, visual_style, has_voiceover, has_captions, has_person_on_screen, aspect_ratio) returns one row per value with creative_count and a representative creative_id. It needs pivots omitted or [CREATIVE], time_granularity ALL and no cursor, and returns all groups in one response.
  • Pass that creative_id to linkedin_ads_get_creative_analysis. A creative that is not analyzed is not an error: read status (not_enrolled, processing, no_source, failed) and message. Thought-leader and document ads have no profile.

Sponsored Messaging (Conversation Ads, Message Ads)

Set metric_set: "SPONSORED_MESSAGING" on Get performance report for sends, opens, open_rate, engagement_rate, cost_per_send and cost_per_open. The CONVERSATION_NODE pivot on Get insights is meant for per-step results but returns no rows on many accounts; fall back to the campaign or creative pivot with the messaging metric set.

Diagnosing a change

1. Get performance report with time_granularity: "DAILY" and a CAMPAIGN or CAMPAIGN_GROUP pivot to find the date.

2. linkedin_ads_get_activities with account_id, start_date, end_date (default: last 7 days) and optionally entity_type (CAMPAIGN_GROUP, CAMPAIGN, CREATIVE) and entity_ids.

3. Check coverage.complete_from in the response. History starts when Hopkin first scanned the account, so an empty result before that date means "not recorded", never "nothing changed".

Competitors and the ad library

None of these tools need a LinkedIn connection.

  • linkedin_ads_search_ad_library: countries is required (ISO codes such as GB, not UK, or ["ALL"]). For one company pass organization_ids (exact) or advertiser_name, not search_terms, which reads ad copy. ad_active_status defaults to ACTIVE. When the response carries a collection block and no cursor, the list is partial: tell the user and repeat the same call without a cursor after 3 to 5 minutes.
  • linkedin_ads_track_competitor: pass exactly one of organization_id (preferred), company_url or name. countries is optional. An advertiser not yet known is looked up live (about 20 to 40 seconds); if several advertisers match a name, nothing is tracked and candidates come back. Undo with linkedin_ads_untrack_competitor; ads already collected stay in the shared corpus.
  • linkedin_ads_list_tracked_competitors returns advertiser_id values and flags advertisers with no successful scrape in 48 hours as stale; treat their data as possibly out of date.
  • linkedin_ads_list_competitor_ads takes advertiser_id, active_only, display_format, search, first_seen_since and first_seen_until. For "new ads in the last 7 days", pass the date seven days ago as first_seen_since with limit: 1 and read count. since matches ads last seen on or after a date, so long-running ads match too. Each ad has attribution advertiser or payer (an employee post the company paid for).
  • linkedin_ads_get_competitor_ad takes ad_id and returns full copy, landing page, media URLs and, for analyzed creatives, a profile.
  • include_raw adds the scraped payload, including EU transparency data (payer, impressions by country, targeting) for EU-delivered ads; rows are large, so pair it with a small limit.

Bid and budget ranges

linkedin_ads_get_budget_pricing returns suggested bid ranges and daily budget limits. Required: account_id, campaign_type (TEXT_AD, SPONSORED_UPDATES, SPONSORED_INMAILS), bid_type (CPM, CPC, CPV), match_type (EXACT, AUDIENCE_EXPANDED), currency and at least one location_urns entry. Seniority, job function, industry and company size are optional URN lists.

Charts

linkedin_ads_render_chart charts a result inside the assistant after you have pulled the data.

For developers