I want to know, can I extract users ids in facebook marketing api by my own targeting parameters? For example, I have:
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adset import AdSet
account = AdAccount('act_<AD_ACCOUNT_ID>')
targeting_spec = {
'geo_locations': {
'countries': ['US'],
},
'age_min': 20,
'age_max': 40,
}
I can get estimated users coverage:
params = {
'currency': 'USD',
'optimize_for': AdSet.OptimizationGoal.offsite_conversions,
'targeting_spec': targeting_spec,
}
reach_estimate = account.get_reach_estimate(params=params)
print(reach_estimate)
But can I also get the list of users ids by this targeting?
This is not possible (thankfully). If you want to target specific people, you need to already come to Facebook with these people identified, either by Facebook ID from your App, or email address/phone numbers etc from your CMS