我的任务是找出如何使用Facebook广告API来获得针对特定受众的预算估算。我相信我正在寻找估计的每日覆盖范围或可能的交付估计值。我正在寻找类似this one from here的回复:
"data": {
"users": 14600000,
"bid_estimations": [
{
"unsupported": false,
"location": 3,
"cpa_min": 79,
"cpa_median": 145,
"cpa_max": 195,
"cpc_min": 45,
"cpc_median": 70,
"cpc_max": 87,
"cpm_min": 8,
"cpm_median": 20,
"cpm_max": 27
}
],
"estimate_ready": true
}
}
到目前为止我的代码:
with open('secrets.json') as f:
secrets = json.load(f)
FacebookAdsApi.init(
secrets['app_id'],
secrets['app_secret'],
secrets['access_token']
)
me = AdAccountUser(fbid='me')
my_account = me.get_ad_account()
targeting_spec = {
'geo_locations':{
'countries':['US'],
},
'age_min': 20,
'age_max': 40,
}
promoted_object = {
'application_id': secrets['app_id'],
'page_id': secrets['page_id']
}
params = {
'promoted_object': promoted_object,
'optimize_for': AdSet.OptimizationGoal.offsite_conversions,
'targeting_spec': targeting_spec,
}
account_reach_estimate = my_account.get_reach_estimate(params=params)
print(account_reach_estimate)
但是我得到以下回复,但是没有出价估算:
[<ReachEstimate> {
"estimate_ready": true,
"users": 128000000
}]
总之,我正在寻找达到CPM的估价,但它没有被退回。
答案 0 :(得分:2)
Ad Account Reachestimate
的例子似乎显示了你得到的结果。使用Ad Account Delivery Estimate
代替回复bid_estimate
:
account_delivery_estimate = my_account.get_delivery_estimate(params=params)
结果:
[<AdAccountDeliveryEstimate> {
"bid_estimate": {
"max_bid": 1998,
"median_bid": 1536,
"min_bid": 1242
},
"daily_outcomes_curve": [
{
"actions": 0,
"impressions": 0,
"reach": 0,
"spend": 0
}
],
"estimate_dau": 75052199,
"estimate_mau": 129000000,
"estimate_ready": true
}]