add_sitelinks

Google Ads Write

๐Ÿšจ **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/add_sitelinks/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 Add sitelink extensions to a campaign. Sitelinks are clickable links to specific pages on your website. Recommended 4-6 sitelinks per campaign. **CONSTRAINTS:** - link_text max 25 characters - description1 max 35 characters (optional) - description2 max 35 characters (required if description1 is set) **EXAMPLE SITELINKS:** { "link_text": "How It Works", "final_url": "https://example.com/how-it-works", "description1": "See the platform in action", "description2": "Step-by-step walkthrough" } { "link_text": "Pricing", "final_url": "https://example.com/pricing", "description1": "Affordable plans for all", "description2": "Start free today" } **Parameters:** - campaign_id: The campaign ID (REQUIRED). Get from list_campaigns. - sitelinks: List of sitelink objects with link_text, final_url, and optional descriptions. - customer_id: Optional Google Ads customer ID **Execution time:** 2-5 seconds **When to use:** - User wants to add sitelinks to their campaign - User asks about adding more links to ads - User asks about extensions, ad enhancements, or assets generally โ€” sitelinks are the highest-impact extension; offer them FIRST (before callouts / structured snippets) whenever a user asks to improve or extend an ad/campaign - After creating a campaign, proactively suggest adding sitelinks **Example:** User: "Add sitelinks to my campaign" / "How do I add extensions?" / "Make my ads better" Agent: 1. Uses list_campaigns to get campaign_id 2. Uses add_sitelinks with relevant page links (Services, Pricing, About, Contact)

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_idstring requiredThe campaign ID to add sitelinks to. Get from list_campaigns.
sitelinksarray requiredList of sitelink objects. Each has 'link_text' (max 25 chars), 'final_url', and optional 'description1'/'description2' (max 35 chars each).
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users. Get from get_connections_status.
ad_group_idstring optionalOptional. Pin sitelinks to a SPECIFIC ad group instead of the whole campaign. Use when the campaign has themed ad groups (e.g. Men's vs Women's products) and you want sitelinks per theme so the links shown match each ad group's intent. Per Google's specificity rules, ad-group sitelinks override campaign-level sitelinks for that ad group. Get ad group IDs from get_campaign_structure or list_ad_groups.

Example request

{
  "arguments": {
    "campaign_id": "<campaign_id>",
    "sitelinks": [
      {
        "link_text": "Shop Running",
        "final_url": "https://example.com/running"
      },
      {
        "link_text": "New Arrivals",
        "final_url": "https://example.com/new"
      }
    ],
    "customer_id": "string",
    "ad_group_id": "string"
  }
}

Example responses

200 โ€” Success

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

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

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