get_linkedin_campaign_performance

LinkedIn Ads Read

User asks about LinkedIn Ads performance, campaign metrics, B2B engagement, ROAS, or wants to understand how their LinkedIn campaigns are performing

Endpoint

POST https://api.adspirer.ai/api/v1/tools/get_linkedin_campaign_performance/execute

Headers

Description

User asks about LinkedIn Ads performance, campaign metrics, B2B engagement, ROAS, or wants to understand how their LinkedIn campaigns are performing. Returns comprehensive LinkedIn Ads performance metrics including: - Account summary (total spend, impressions, clicks, CTR, conversions, ROAS) - LinkedIn-specific metrics (engagements, leads, cost per lead) - Campaign breakdown with performance categorization - Trend data (daily metrics, week-over-week, month-over-month changes) - Actionable recommendations Parameters: - lookback_days: Number of days to analyze (7, 14, 30, 60, 90). Default: 30 - start_date: Optional start date (YYYY-MM-DD). Overrides lookback_days when used with end_date. - end_date: Optional end date (YYYY-MM-DD). Overrides lookback_days when used with start_date. ⚠️ DATE CLARIFICATION: If the user's date request is vague or ambiguous (e.g., "March to June" without a year, "last quarter", "recently", "a few months ago"), ask the user to specify exact dates before calling this tool. Do not assume or guess dates. - include_campaigns: Include per-campaign breakdown. Default: true - include_trends: Include trend analysis. Default: true - include_comprehensive: Include creative/engagement analysis. Default: true - ad_account_id: Required for multi-account users. Get from list_connected_accounts Example Prompts: - "How are my LinkedIn ads performing?" - "Show me LinkedIn campaign performance for the last 30 days" - "What's my LinkedIn ROAS this month?" - "Which LinkedIn campaigns are performing best?" Execution time: 3-5 seconds

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
start_datestring optionalStart date (YYYY-MM-DD). If provided with end_date, overrides lookback_days for custom date range queries.
end_datestring optionalEnd date (YYYY-MM-DD). If provided with start_date, overrides lookback_days for custom date range queries.
date_rangestring optionalDate range preset: 'last_7_days', 'last_14_days', 'last_30_days', 'last_60_days', 'last_90_days'. Overrides lookback_days. Ignored if start_date/end_date are provided.
raw_databoolean optionalIf true, return ONLY raw metrics as a JSON code block (spend, clicks, impressions, conversions, CPA, CPC, CTR, CVR, ROAS by campaign/ad/date). Strips severity labels, suggested bids/budgets, industry benchmarks, and optimization recommendations. Use when you run your own attribution model or want to minimize token usage. default: false
lookback_daysinteger optionalNumber of days to analyze (7-120). Default: 30. LinkedIn data is available for up to 10 years but 30 days provides the best balance of recency and data volume. default: 30
include_campaignsboolean optionalInclude per-campaign breakdown. Default: true default: true
include_trendsboolean optionalInclude trend data (daily metrics, WoW/MoM changes). Default: true default: true
include_comprehensiveboolean optionalInclude creative and engagement analysis. Default: true default: true
ad_account_idstring optionalLinkedIn Ads account ID (optional - uses default connected account)
campaign_idstring optionalFilter performance to a specific campaign ID. If not provided, returns account-wide performance.
campaign_namestring optionalFilter performance by campaign name (partial match). If not provided, returns all campaigns.

Example request

{
  "arguments": {
    "start_date": "string",
    "end_date": "string",
    "date_range": "string",
    "raw_data": false,
    "lookback_days": 30,
    "include_campaigns": true
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for get_linkedin_campaign_performance)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "get_linkedin_campaign_performance"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "get_linkedin_campaign_performance"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "get_linkedin_campaign_performance",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai