Hi Aleksy,
Thank you for reaching out to the Google Ads Scripts support team.
@Rahul - Thanks for suggesting a solution to the user.
I would like to inform you that the “segments.hour” field will retrieve segments based on the input hour and it is the correct format (you have used Segments.Hour in this case). Kindly replace “Segments.Hour” with “segments.hour”. Also, it seems that you are using invalid resource “SEARCH_QUERY_PERFORMANCE_REPORT”. I would recommend that you use the “ad_group” resource and build the query again by using the available metrics in the resource.
Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries before retrieving the data from the Google Ads API.
I hope this helps! Feel free to get back to us with the below details if the issue still persists.
![]() |
Google Ads Scripts Team |
[2025-06-10 23:37:26Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01reuNi:ref" (ADR-00313672)