How to fetch cost details at audience level using Ads API

85 views
Skip to first unread message

Vaibhav Sharma

unread,
Jul 6, 2021, 12:32:02 PM7/6/21
to AdWords API and Google Ads API Forum
Hi,
How can we fetch following columns for each audience that is uploaded or created using affinity rule with help of Google Ads API :-
1. Cost
2. Impressions
3. Clicks
4. Audience type- uploaded as 1P or created by affinity rule
5. Network- Video, Display, Search etc.
6. Geo level
7. Video25p,Video50p,Video75p,Video100p

Can you please paste the exact query from Query builder?

Also, how to find which column_name in query builder represents which column in  Google Ads report in UI?

Thanks.

Google Ads API Forum Advisor

unread,
Jul 9, 2021, 1:12:03 PM7/9/21
to adwor...@googlegroups.com
Hello,

Thanks for reaching out. To obtain audience metrics, you should use either the campaign audience view or ad group audience view. Please see the query below using the campaign audience view:
 
SELECT metrics.cost_micros, metrics.clicks, metrics.impressions, metrics.video_quartile_p100_rate, metrics.video_quartile_p75_rate, metrics.video_quartile_p50_rate, metrics.video_quartile_p25_rate, campaign_criterion.custom_affinity.custom_affinity, campaign_criterion.location.geo_target_constant, segments.ad_network_type

FROM campaign_audience_view 

WHERE segments.ad_network_type IN ('CONTENT', 'SEARCH', 'YOUTUBE_SEARCH') AND segments.date = 'your date range'

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JZ19U:ref
Reply all
Reply to author
Forward
0 new messages