analyze_linkedin_wasted_spend

LinkedIn Ads Read

User asks about wasted ad spend, unprofitable campaigns, where their LinkedIn budget is being wasted, or wants to identify underperformers

Endpoint

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

Headers

Description

User asks about wasted ad spend, unprofitable campaigns, where their LinkedIn budget is being wasted, or wants to identify underperformers. Identifies LinkedIn campaigns and B2B segments wasting money: Campaign Analysis: - Campaigns losing money (ROAS < 1.0 = actual loss) - Campaigns underperforming (ROAS below target = opportunity cost) - Severity classification (CRITICAL, HIGH, MEDIUM) - Wasted spend calculation per campaign B2B Demographic Waste: - Seniority levels with poor ROAS - Industries not converting - Company sizes wasting budget - Job functions underperforming Creative Waste: - Fatigued creatives (14-day threshold) - Low engagement creatives - High spend but low lead creatives Returns: - Total wasted spend and percentage - Campaigns to pause/reduce - Segments to exclude - Quick actions with monthly savings estimates Parameters: - lookback_days: Number of days to analyze (7-120). 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. - target_roas: Override target ROAS threshold - include_demographic_breakdown: Include B2B segment waste. Default: true - include_creative_analysis: Include creative-level waste. Default: true - ad_account_id: Required for multi-account users. Get from list_connected_accounts Example Prompts: - "Where am I wasting money on LinkedIn?" - "Which LinkedIn campaigns are losing money?" - "Show me LinkedIn wasted spend" - "Which B2B segments should I stop targeting?" - "How can I reduce LinkedIn ad waste?" Execution time: 4-6 seconds **Quick Actions (IMPORTANT — read severity context first):** - ⏳ LEARNING campaigns → Do NOT pause. Monitor for 14+ days before judging. - ❓ INSUFFICIENT_DATA campaigns → Need more spend before analysis is meaningful. - 🚨 CRITICAL campaigns (established, 14+ days, ZERO conversions) → Consider pausing - 🚨 CRITICAL campaigns (established, 14+ days, HAS conversions) → Review performance, verify revenue in ad platform before reducing budget - 🔴 HIGH severity (established, 14+ days) → Consider reducing budget by 50-70% - 🟡 MEDIUM → Optimize targeting, ad copy, landing pages ⚠️ **NEVER say "pause" for a campaign that has conversions.** Say "review" or "reduce budget" instead. ⚠️ **NEVER recommend pausing a campaign in LEARNING phase.** ⚠️ **If ALL campaigns are LEARNING or INSUFFICIENT_DATA, tell the user their account is too new for waste analysis and recommend checking back in 2 weeks.** ⚠️ **Consider campaign objective: brand awareness campaigns will not have ROAS data. This is normal.** ⚠️ **When data confidence is MEDIUM or LOW, soften all recommendations and add verification prompts.**

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. default: 30
target_roasnumber optionalOverride target ROAS threshold. Campaigns below this ROAS are flagged as underperforming.
include_demographic_breakdownboolean optionalInclude B2B demographic waste analysis (seniority, industry, company size). Default: true default: true
include_creative_analysisboolean optionalInclude creative-level waste analysis (fatigue, low engagement). Default: true default: true
ad_account_idstring optionalLinkedIn Ad Account ID. Required for multi-account users. Get from list_connected_accounts.

Example request

{
  "arguments": {
    "start_date": "string",
    "end_date": "string",
    "date_range": "string",
    "raw_data": false,
    "lookback_days": 30,
    "target_roas": 0.1
  }
}

Example responses

200 — Success

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

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": "analyze_linkedin_wasted_spend"
}

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": "analyze_linkedin_wasted_spend",
  "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