Adding hour to a Google Ads API query

168 views
Skip to first unread message

Sarah Dorich

unread,
Apr 14, 2023, 5:38:18 PM4/14/23
to Google Ads API and AdWords API Forum
I need to get hour from the Google Ads API. Below is the query that I want to add hour to. However, when I add segments.hour to the select statement, I get an error and no rows are returned. How can I add hour to this query?

SELECT
ad_group_ad.ad.expanded_text_ad.headline_part1,
ad_group_ad.ad.expanded_text_ad.headline_part2,
ad_group_ad.ad.expanded_text_ad.description,
ad_group_ad.ad.final_urls,
segments.device,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value,
metrics.ctr,
segments.date,
customer.descriptive_name
FROM ad_group_ad
WHERE segments.date = '2023-04-01'
AND campaign.advertising_channel_type != PERFORMANCE_MAX

Google Ads API and AdWords API Forum

unread,
Apr 17, 2023, 7:41:06 AM4/17/23
to Google Ads API and AdWords API Forum

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


Regards,
Google Ads API Team

Google Ads API and AdWords API Forum

unread,
Apr 17, 2023, 8:27:18 AM4/17/23
to Google Ads API and AdWords API Forum
Hi,

Thank you for raising this concern to the Google Ads API support team.

Regarding your concern, can you please provide the complete request and response logs with request ID and request header generated on your end in order to investigate this on our end?

You may then send the requested logs via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Links included in this email:

Regards,
Google Ads API Team
On Saturday, April 15, 2023 at 5:38:18 AM UTC+8 sdo...@travelpassgroup.com wrote:
Reply all
Reply to author
Forward
0 new messages