add_negative_keywords_to_ad_group

Google Ads Write

Add negative keywords to a single AD GROUP

Endpoint

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

Headers

Description

Add negative keywords to a single AD GROUP. Negative keywords prevent your ads from showing for certain searches. This adds them at AD GROUP level, affecting ONLY that ad group (use `add_negative_keywords` for campaign-level negatives that affect every ad group). **Parameters:** - ad_group_id: The ad group ID (REQUIRED - get from get_campaign_structure) - keywords: List of negative keywords to add - customer_id: Optional **Each keyword needs:** - text: The keyword phrase (e.g., "free", "cheap", "diy") - match_type: EXACT, PHRASE, or BROAD (default: BROAD) **When to use ad-group vs campaign level:** Ad-group negatives let you block a term in one ad group while still allowing it in another ad group of the same campaign — finer control than a campaign-wide block. **Execution time:** 2-4 seconds **Example:** User: "Block 'refurbished' just in my New Products ad group" Agent: Uses add_negative_keywords_to_ad_group with that ad_group_id and keywords list

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
ad_group_idstring requiredThe ad group ID to add negative keywords to. Use get_campaign_structure or list ad groups first. Ad-group negatives affect ONLY this ad group, not the whole campaign.
keywordsarray requiredList of negative keywords. Each: {text, match_type (EXACT/PHRASE/BROAD)}. These prevent this ad group's ads from showing for unwanted searches.
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users. Get from get_connections_status.

Example request

{
  "arguments": {
    "ad_group_id": "string",
    "keywords": [
      {}
    ],
    "customer_id": "string"
  }
}

Example responses

200 — Success

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

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

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