Download a location report

71 views
Skip to first unread message

Ignacio Aguilar

unread,
Mar 2, 2023, 1:58:36 PM3/2/23
to Google Ads API and AdWords API Forum
Hello! How are you?

I want to make a script in python to download data with the following columns:
Date, Campaign Name, Region, Cost, Clicks. I have with geographic_view, location_view and user_location_view in the FROM clause of the query but it didn't work. 

Here´s an example:
query = """
     SELECT
        segments.date,
        campaign.name,
        user_location_view.resource_name,
        metrics.cost_micros,
        metrics.clicks
      FROM user_location_view
      WHERE segments.date BETWEEN '2023-02-28' AND '2023-03-01'
      AND metrics.impressions > 1
      ORDER BY segments.date DESC"""

Could you help me build the query? The account is inArgentina so Region should be like Buenos Aires, Buenos Aires Province, Catamarca Province, Chaco Province, etc
Message has been deleted

Google Ads API and AdWords API Forum

unread,
Mar 6, 2023, 6:36:54 AM3/6/23
to Google Ads API and AdWords API Forum

Re-posting the last inquiry (https://groups.google.com/g/adwords-api/c/W20uXsQXUas) from the forum as it wasn't routed to our support queue.


Regards,
Google Ads API Team

Google Ads API Forum Advisor

unread,
Mar 6, 2023, 10:50:53 AM3/6/23
to adwor...@googlegroups.com

Hi, 

Thanks for reaching out to the Google Ads API Forum. I hope you are doing well today.

Moving forward to your concern, upon checking the provided query it is a valid query request. However, since you mentioned that you want “Date, Campaign Name, Region, Cost, Clicks” but you already tried “FROM clause geographic_view/ location_view/ user_location_view”, for us to provide right information and recommendations, can you provide a UI screenshot (uncropped) of the field of the data that you are retrieving? 

I asked this because the Google Ads API mirrors the Google Ads UI. Meaning, the Google Ads API retrieves what the UI is showing.

You may also see Google Ads API Location Targeting documentation and guidelines for more information.

Have a great day.

Regards,

Google Logo Google Ads API Team


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