您正在寻找的 API 称为Reachestimate。您可以使用您拥有的目标来调用它,并将返回预期的数据。
例如,使用作为目标规范:
{
"publisher_platforms": ["facebook"],
"facebook_positions": ["feed", "right_hand_column"],
"device_platforms": ["mobile", "desktop"],
"geo_locations": {
"countries": [],
"custom_locations": [],
"zips": [],
"cities": [{
"key": "2421905"
}],
"regions": [],
"country_groups": [],
"geo_markets": []
},
"excluded_geo_locations": {
"countries": [],
"custom_locations": [],
"zips": [],
"cities": [],
"regions": [],
"country_groups": [],
"geo_markets": []
},
"genders": [1, 2],
"age_min": 18,
"age_max": 65,
"relationship_statuses": [],
"connections": [],
"excluded_connections": [],
"friends_of_connections": [],
"interests": [{
"id": "6003087413192",
"name": "Baseball"
}]
}
以下 API 调用:
curl -i -X GET \
"https://graph.facebook.com/v3.2/act_XXX/reachestimate?targeting_spec=%7B%22publisher_platforms%22%3A%5B%22facebook%22%5D%2C%22facebook_positions%22%3A%5B%22feed%22%2C%22right_hand_column%22%5D%2C%22device_platforms%22%3A%5B%22mobile%22%2C%22desktop%22%5D%2C%22geo_locations%22%3A%7B%22countries%22%3A%5B%5D%2C%22custom_locations%22%3A%5B%5D%2C%22zips%22%3A%5B%5D%2C%22cities%22%3A%5B%7B%22key%22%3A%222421905%22%7D%5D%2C%22regions%22%3A%5B%5D%2C%22country_groups%22%3A%5B%5D%2C%22geo_markets%22%3A%5B%5D%7D%2C%22excluded_geo_locations%22%3A%7B%22countries%22%3A%5B%5D%2C%22custom_locations%22%3A%5B%5D%2C%22zips%22%3A%5B%5D%2C%22cities%22%3A%5B%5D%2C%22regions%22%3A%5B%5D%2C%22country_groups%22%3A%5B%5D%2C%22geo_markets%22%3A%5B%5D%7D%2C%22genders%22%3A%5B1%2C2%5D%2C%22age_min%22%3A18%2C%22age_max%22%3A65%2C%22relationship_statuses%22%3A%5B%5D%2C%22connections%22%3A%5B%5D%2C%22excluded_connections%22%3A%5B%5D%2C%22friends_of_connections%22%3A%5B%5D%2C%22interests%22%3A%5B%7B%22id%22%3A%226003087413192%22%2C%22name%22%3A%22Baseball%22%7D%5D%7D&access_token=<user_token>"
将返回:
{
"data": {
"users": 12000,
"estimate_ready": true
}
}
希望这有帮助