How to get Region and City Name using inner query in Google Ads API?

39 views
Skip to first unread message

anirudh maddy

unread,
Aug 28, 2019, 6:04:48 AM8/28/19
to AdWords API and Google Ads API Forum
I'm able to fetch Region and City IDs in the below format. However, I would want their names to be displayed instead of IDs. One way I figured out was making another request with the Region/City ID to fetch the name. 
   
Query to fetch Region and City IDs. 

SELECT  campaign.name ,segments.geo_target_region, segments.geo_target_city,  metrics.clicks, metrics.impressions, metrics.cost_micros FROM geographic_view

Query to fetch Names of a set of Regions

var regionsList = [];
// Form Array from Above query
SELECT  geo_target_constant
.name, geo_target_constant.country_code, geo_target_constant.target_type FROM geo_target_constant WHERE geo_target_constant.id IN ("+
regionsList +")"


Can I fetch Region and City Name and the other metrics in a single query? 

If yes, can someone please help me with the inner query. 

Google Ads API Forum Advisor Prod

unread,
Aug 28, 2019, 12:08:51 PM8/28/19
to anirud...@gmail.com, adwor...@googlegroups.com
Hello Anirudh,

It is not possible have both calls in a single query as those two resources cannot select with each other.

Regards,
Sai Teja, Google Ads API Team

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