get_interest_suggestions
Generate targeted interest suggestions for Meta Ads campaigns by analyzing existing interests, providing relevant options with audience size and descriptions for optimization.
Instructions
Get interest suggestions based on existing interests.
Args:
access_token: Meta API access token (optional - will use cached token if not provided)
interest_list: List of interest names to get suggestions for (e.g., ["Basketball", "Soccer"])
limit: Maximum number of suggestions to return (default: 25)
Returns:
JSON string containing suggested interests with id, name, audience_size, and description fields
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| access_token | No | ||
| interest_list | No | ||
| limit | No |
Implementation Reference
- meta_ads_mcp/core/targeting.py:39-65 (handler)The primary handler function for the 'get_interest_suggestions' MCP tool. Decorated with @mcp_server.tool() for registration and @meta_api_tool for API handling. Implements logic to fetch interest suggestions via Meta Ads API 'search' endpoint with type 'adinterestsuggestion'.@mcp_server.tool() @meta_api_tool async def get_interest_suggestions(interest_list: List[str], access_token: Optional[str] = None, limit: int = 25) -> str: """ Get interest suggestions based on existing interests. Args: interest_list: List of interest names to get suggestions for (e.g., ["Basketball", "Soccer"]) access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of suggestions to return (default: 25) Returns: JSON string containing suggested interests with id, name, audience_size, and description fields """ if not interest_list: return json.dumps({"error": "No interest list provided"}, indent=2) endpoint = "search" params = { "type": "adinterestsuggestion", "interest_list": json.dumps(interest_list), "limit": limit } data = await make_api_request(endpoint, access_token, params) return json.dumps(data, indent=2)