API Reference โบ Google Ads โบ infer_business_profile
infer_business_profile
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/infer_business_profile/execute
Headers
Authorization: Bearer sk_live_... โ your Adspirer API key (required)
Content-Type: application/json (required)
Idempotency-Key: <uuid> โ recommended for write operations to make retries safe
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
Automatically infer business profile from campaign data using AI analysis.
โ ๏ธ IMPORTANT: This tool ANALYZES data but may SAVE a profile if confidence is high.
๐ฏ **What This Tool Does (Performance Agent - Phase 1 Feature 5):**
- Analyzes campaign names, keywords, and ad copy
- Uses Claude AI to classify business type
- Infers business vertical, size, goals, and audience
- Returns confidence level (high, medium, low)
- Auto-saves if confidence is HIGH, asks confirmation for LOW
**Inference Process:**
1. Collects campaign names and keywords from Google Ads
2. Analyzes patterns (B2B vs B2C, product vs service)
3. Uses AI to classify business vertical
4. Estimates business size from ad spend
5. Identifies primary goals from campaign types
**Confidence Levels:**
- **HIGH** (โฅ0.8): Auto-saves profile, high certainty
- **MEDIUM** (0.5-0.8): Saves profile, reasonable certainty
- **LOW** (<0.5): Returns suggestion, asks user to confirm
**Parameters:**
- **force_save**: Set to true to save even low-confidence profiles
- **customer_id**: Optional (uses connected account if omitted)
**Returns:**
- Inferred business profile (vertical, size, goal, audience)
- Confidence level and reasoning
- Whether profile was saved or needs confirmation
- Suggested confirmation prompt for low-confidence results
**Use this tool when:**
- User doesn't have a business profile set
- User asks "analyze my business"
- You need business context but none exists
- After user connects a new Google Ads account
**Example Flow:**
1. Call `get_business_profile` - returns no profile
2. Call `infer_business_profile` - analyzes campaigns
3. If HIGH confidence: Profile saved automatically
4. If LOW confidence: Ask user to confirm with suggested prompt
**Execution time:** 3-8 seconds (AI analysis + optional save)
Request body
All tool arguments are wrapped in an arguments object.
| Field | Type | Description |
force_save | boolean optional | If true, save the profile even if confidence is low. Default is false (requires user confirmation for low-confidence profiles). default: false |
customer_id | string optional | Google Ads customer ID. Required for multi-account users. Get from list_connected_accounts. |
Example request
{
"arguments": {
"force_save": false,
"customer_id": "string"
}
}
Example responses
200 โ Success
{
"success": true,
"data": {
"text": "(tool-specific textual output for infer_business_profile)",
"quota": {
"used": 42,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01"
}
},
"tool": "infer_business_profile"
}
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": "infer_business_profile"
}
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": "infer_business_profile",
"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