estimate_audience_size
Estimate audience size for ad targeting specifications to validate reach and plan effective campaigns.
Instructions
Estimate audience size for targeting specifications using Meta's delivery_estimate API.
This function provides comprehensive audience estimation for complex targeting combinations including demographics, geography, interests, and behaviors. It also maintains backwards compatibility for simple interest validation.
Args: access_token: Meta API access token (optional - will use cached token if not provided) account_id: Meta Ads account ID (format: act_XXXXXXXXX) - required for comprehensive estimation targeting: Complete targeting specification including demographics, geography, interests, etc. Example: { "age_min": 25, "age_max": 65, "geo_locations": {"countries": ["PL"]}, "flexible_spec": [ {"interests": [{"id": "6003371567474"}]}, {"interests": [{"id": "6003462346642"}]} ] } optimization_goal: Optimization goal for estimation (default: "REACH"). Options: "REACH", "LINK_CLICKS", "IMPRESSIONS", "CONVERSIONS", etc. interest_list: [DEPRECATED - for backwards compatibility] List of interest names to validate interest_fbid_list: [DEPRECATED - for backwards compatibility] List of interest IDs to validate
Returns: JSON string with audience estimation results including estimated_audience_size, reach_estimate, and targeting validation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targeting | No | ||
| account_id | No | ||
| access_token | No | ||
| interest_list | No | ||
| optimization_goal | No | REACH | |
| interest_fbid_list | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |