Hi,
Thank you for reaching out to the Google Ads API support team.
I understand that you are trying to fetch location-based reports. Please note that the query provided by you is invalid as the campaign resource does not have the mentioned segments. The required segments are present in the geographic_view resource. Please find the modified query below:-
SELECT geographic_view.country_criterion_id, segments.geo_target_city, segments.geo_target_county, segments.geo_target_district, segments.geo_target_postal_code, segments.geo_target_region, segments.geo_target_state, campaign.name FROM geographic_view
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.
Feel free to reach out for any further concerns/queries.
![]() |
Google Ads API Team |
Could you please provide the customer ID of your Google Ads account from which you are attempting to retrieve data? To find the equivalent report for geographic_view in the Google Ads UI, navigate to your account and go to Campaigns > Insights and Reports > When and Where Ads Showed > Matched Locations. Could you confirm if you see any data under this path in your account? If yes, I kindly request you to share an uncropped screenshot of the UI (with the customer ID visible) and highlight the fields, segments and metrics you are trying to access via the Google Ads API.
You can send the details via Reply privately to the author option, or direct private reply to this email.
Thank you for your email. I am able to retrieve data under the path Campaigns > Insights and Reports > When and Where Ads Showed > Matched Locations in the Google Ads UI.
However, my goal is to create a report in my dashboard similar to the path Campaigns > Audience, Keywords, and Content > Location. For this, I need to access segment-wise, location-based data via the Google Ads API.
These are the fields, and segments i am trying to access :
SELECT geographic_view.country_criterion_id, segments.geo_target_city, segments.geo_target_country, segments.geo_target_district, segments.geo_target_postal_code, segments.geo_target_region, segments.geo_target_state, campaign.name FROM geographic_view
Hi,
As per provided information, I understand that you are trying to fetch the segment wise location based data via the Google Ads API and you are getting the empty response. Please note that you are using both the geographic_view.country_criterion_id and segments.geo_target_county fields in the same query. These two fields refer to the same country so that you are getting an empty response. I would suggest you remove the segments.geo_target_county field from the query and run the query again.
Please find the below modified query:
SELECT geographic_view.country_criterion_id, segments.geo_target_city, segments.geo_target_district, segments.geo_target_postal_code, segments.geo_target_region, segments.geo_target_state, campaign.name FROM geographic_view
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.
Feel free to reach out for any further concerns/queries.