get_campaign_targeting

Google Ads Read

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work ar

Endpoint

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

Headers

Description

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work around the error or use alternative data - DO NOT create campaigns or perform actions without valid tool data - STOP and direct the user to upgrade via the provided link Get location/geo targeting for a Google Ads campaign. This tool retrieves READ-ONLY data. Safe to call multiple times. **Returns location targeting details:** - Targeted locations (cities, states, countries, metros the campaign targets) - Excluded locations (negative geo targets) - Bid modifiers per location (if set) - Location type (Country, State, City, Metro, etc.) - Summary counts (targeted, excluded, total) **Parameters:** - campaign_id: The campaign ID (REQUIRED - get from list_campaigns) - customer_id: Optional (uses connected account if omitted) **Execution time:** 1-3 seconds (single API query) **Use this tool when:** - User asks "where is this campaign targeting?" or "what locations?" - User wants to see geo targeting for a campaign - User asks "what countries/cities/states does my campaign target?" - Before recommending location targeting changes - To verify location setup after campaign creation **Returns for each location:** - name: Short location name (e.g., "New York") - canonical_name: Full hierarchical name (e.g., "New York,New York,United States") - country_code: ISO country code (e.g., "US") - target_type: Location type (Country, State, City, County, Metro, etc.) - is_negative: true if this location is EXCLUDED - bid_modifier: Bid adjustment for this location (null if no modifier) **Example flow:** 1. User: "What locations does my Diamond Ring campaign target?" 2. Agent: Uses get_campaign_targeting with campaign_id 3. Returns: Targeted: United States, New York, Los Angeles; Excluded: none

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_idstring requiredThe campaign ID to get location targeting for. Use list_campaigns first.
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users. Get from list_connected_accounts.

Example request

{
  "arguments": {
    "campaign_id": "<campaign_id>",
    "customer_id": "string"
  }
}

Example responses

200 โ€” Success

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

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_campaign_targeting"
}

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_campaign_targeting",
  "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