Facebook营销API:Facebook活动的潜在影响范围
答
使用广告帐户获取定位规格的覆盖面估算值。
account = AdAccount('act_<AD_ACCOUNT_ID>')
targeting_spec = {
'geo_locations': {
'countries': ['US'],
},
'age_min': 20,
'age_max': 40,
}
params = {
'currency': 'USD',
'optimize_for': AdSet.OptimizationGoal.offsite_conversions,
'targeting_spec': targeting_spec,
}
reach_estimate = account.get_reach_estimate(params=params)
print(reach_estimate)
响应结果
{
"data": {
"users": 186000000,
"bid_estimations": [
{
"unsupported": false,
"location": 3,
"bid_amount_min": 39,
"bid_amount_median": 80,
"bid_amount_max": 121
}
],
"estimate_ready": true
}
}
1.86亿用户上提及的标准碱