Meta Ads Read
User wants to find targeting options for their Meta (Facebook/Instagram) ad campaigns
POST https://api.adspirer.ai/api/v1/tools/search_meta_targeting/execute
Authorization: Bearer sk_live_... — your Adspirer API key (required)Content-Type: application/json (required)Idempotency-Key: <uuid> — recommended for write operations to make retries safeAll tool arguments are wrapped in an arguments object.
| Field | Type | Description |
|---|---|---|
search_type | string required | Type of targeting to search for: - 'interest': Find interests for targeting (e.g., 'fitness', 'cooking', 'travel') - 'behavior': Find behaviors for targeting (e.g., 'frequent travelers', 'online shoppers') - 'demographic': Find demographic targeting options (e.g., 'new parents', 'college educated') - 'life_event': Find life event targeting (e.g., 'recently moved', 'newly engaged') - 'location': Find locations for geo-targeting (e.g., 'New York', 'California', '90210') - 'locale': Find language targeting options (e.g., 'Spanish', 'French') - 'employer': Find employer targeting (e.g., 'Google', 'Microsoft') - 'job_title': Find job title targeting (e.g., 'Software Engineer', 'Marketing Manager') - 'school': Find education school targeting (e.g., 'Harvard', 'Stanford') - 'major': Find education major targeting (e.g., 'Computer Science', 'Business') |
query | string required | Search query string (e.g., 'fitness' for interests, 'New York' for locations) |
limit | integer optional | Maximum number of results to return (1-100). Default is 50. default: 50 |
locale | string optional | Locale for results (e.g., 'en_US', 'es_ES', 'fr_FR'). Default is 'en_US'. default: "en_US" |
location_types | array optional | For location search only: filter by location types. Options: 'country', 'region', 'city', 'zip', 'geo_market', 'place'. Example: ['city', 'region'] |
country_code | string optional | For location search only: filter results to a specific country (e.g., 'US', 'GB', 'CA') |
ad_account_id | string optional | Meta Ad Account ID. Required for multi-account users. Get from list_connected_accounts. |
{
"arguments": {
"search_type": "string",
"query": "string",
"limit": 50,
"locale": "en_US",
"location_types": [
"string"
],
"country_code": "string",
"ad_account_id": "string"
}
}
{
"success": true,
"data": {
"text": "(tool-specific textual output for search_meta_targeting)",
"quota": {
"used": 42,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01"
}
},
"tool": "search_meta_targeting"
}
{
"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": "search_meta_targeting"
}
{
"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": "search_meta_targeting",
"quota": {
"used": 150,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01",
"upgrade_url": "https://adspirer.ai"
}
}
Interactive: Swagger UI
Machine-readable: OpenAPI 3.1 spec · llms-full.txt
Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai