search_meta_targeting

Meta Ads Read

User wants to find targeting options for their Meta (Facebook/Instagram) ad campaigns

Endpoint

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

Headers

Description

User wants to find targeting options for their Meta (Facebook/Instagram) ad campaigns. This tool searches the Meta Marketing API to find targeting options including interests, behaviors, demographics, locations, and more. Returns: - List of targeting options with IDs, names, and audience sizes - Category/path information for interests and behaviors - Location details including country, region for geo-targeting When to use this tool: - "Find interests related to fitness" - "What targeting options are available for travel?" - "Search for locations in California" - "Find behaviors for online shoppers" - "What demographics can I target?" - "Find job titles for marketing professionals" - "Search for schools like Harvard" Search Types Available: - interest: Topics and activities (e.g., 'fitness', 'cooking', 'travel') - behavior: User behaviors (e.g., 'frequent travelers', 'online shoppers') - demographic: Demographics (e.g., 'new parents', 'college educated') - life_event: Life events (e.g., 'recently moved', 'newly engaged') - location: Geo-targeting (e.g., 'New York', 'California', '90210') - locale: Language targeting (e.g., 'Spanish', 'French') - employer: Employer targeting (e.g., 'Google', 'Microsoft') - job_title: Job title targeting (e.g., 'Software Engineer') - school: Education school targeting (e.g., 'Harvard', 'Stanford') - major: Education major targeting (e.g., 'Computer Science') Parameters: - search_type: Type of targeting to search (required) - query: Search query string (required) - limit: Maximum results (1-100, default: 50) - locale: Locale for results (default: en_US) - location_types: For location search - filter by types (country, region, city, zip) - country_code: For location search - filter by country (e.g., 'US') - ad_account_id: Required for multi-account users. Get from list_connected_accounts Execution time: 1-3 seconds Data source: Meta Marketing API Targeting Search

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
search_typestring requiredType 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')
querystring requiredSearch query string (e.g., 'fitness' for interests, 'New York' for locations)
limitinteger optionalMaximum number of results to return (1-100). Default is 50. default: 50
localestring optionalLocale for results (e.g., 'en_US', 'es_ES', 'fr_FR'). Default is 'en_US'. default: "en_US"
location_typesarray optionalFor location search only: filter by location types. Options: 'country', 'region', 'city', 'zip', 'geo_market', 'place'. Example: ['city', 'region']
country_codestring optionalFor location search only: filter results to a specific country (e.g., 'US', 'GB', 'CA')
ad_account_idstring optionalMeta Ad Account ID. Required for multi-account users. Get from list_connected_accounts.

Example request

{
  "arguments": {
    "search_type": "string",
    "query": "string",
    "limit": 50,
    "locale": "en_US",
    "location_types": [
      "string"
    ],
    "country_code": "string",
    "ad_account_id": "string"
  }
}

Example responses

200 — Success

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

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": "search_meta_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": "search_meta_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