Segments ad_group and location

18 views
Skip to first unread message

support opl

unread,
Sep 15, 2025, 3:12:55 AM (2 days ago) Sep 15
to Google Ads API and AdWords API Forum
May I ask how to get  metrics from “resources with metrics”  simultaneously including  segments   ad_group and  location?
We have already tried  “location_view”、 “user_location_view”、“ad_group_audience_view” and did not achieve the desired results

Google Ads API Forum Advisor

unread,
Sep 15, 2025, 5:58:23 AM (2 days ago) Sep 15
to opl....@gmail.com, adwor...@googlegroups.com

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 Logo Google Ads API Team

Feedback
How was our support today?

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



Reply all
Reply to author
Forward
0 new messages