Hi,

Thank you for reaching out to the Google Ads API support team.

Based on the provided information, I understand that you want to retrieve the 
metrics including ad group and location through the Google Ads API.  I would 
recommend you to use the geographic_view report to retrieve the matched 
locations data of the ad group through the Google Ads API. Please be informed 
that the geographic_view report is used to retrieve the data displayed for an 
ad group under the ‘Insights and Reports’ -> ’When and where ads showed’ -> 
’Matched locations’ tab in the UI. Kindly use the below sample GAQL query by 
giving the ag group ID, this query retrieves only the IDs of the state and city.

SELECT segments.geo_target_state, segments.geo_target_city, campaign.name, 
ad_group.name, ad_group.id, segments.geo_target_region, 
segments.geo_target_county, geographic_view.resource_name, 
geographic_view.location_type, geographic_view.country_criterion_id FROM 
geographic_view WHERE ad_group.id = XXXXXX

After retrieving the IDs as "geoTargetCity": "geoTargetConstants/******", 
"geoTargetState": "geoTargetConstants/*****", you can use the following query 
to retrieve the corresponding state and city names using geo_target_constant 
report.

SELECT geo_target_constant.canonical_name, geo_target_constant.country_code, 
geo_target_constant.resource_name, geo_target_constant.name, 
geo_target_constant.id  FROM geo_target_constant WHERE geo_target_constant.id = 
*****

You can use the search or searchStream methods in making the API calls while 
retrieving the data. Additionally, you can utilize the Google Ads Query Builder 
and Query Validator to build and validate the queries for retrieving the data 
from the Google Ads API. Additionally, please specify the geoTargetState and 
geoTargetCity IDs individually in the geo_target_constant.id field to retrieve 
the corresponding state and city names.

If this is not what you are looking for, kindly provide the uncropped UI 
screenshot of the data that you are trying to retrieve along with the Google 
Ads customer ID so that we can investigate your issue further.

You can send the details via Reply privately to the author option, or direct 
private reply to this email.

Thanks,

Google Ads API Team


Feedback
How was our support today?


[2025-09-15 09:57:28Z GMT] This message is in relation to case 
"ref:!00D1U01174p.!500Ht01u6bxh:ref" (ADR-00332746)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/Nl0Ev000000000000000000000000000000000000000000000T2MJNT00Pxk2PdptTsWqymfyYyLm2w%40sfdc.net.
  • Se... support opl
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... support opl
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
            • ... support opl
              • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to