Hello
I'm facing a persistent and strange issue with Google Ads Scripts and hope someone here can shed some light on it. I am unable to run any GAQL query that contains a DURING clause. Every attempt fails with the same error:
I have gone through extensive troubleshooting and have ruled out any syntax errors in my script. I am now convinced the issue is specific to my account's execution environment.
Here are the steps I've taken to debug this:
Troubleshooting StepsInitial Script: The problem first appeared in a script designed to pull video asset performance data. The query was complex and included several WHERE conditions.
Simplified Query: To isolate the cause, I removed all user-defined filters from the query (like campaign.name). The error persisted.
Removed Variables: I suspected an issue with how the date range variable was being passed. I removed the variable and hardcoded the date range directly into the query string (e.g., DURING LAST_30_DAYS). This also failed with the exact same error.
Minimal Diagnostic Test: Finally, to prove the issue was not with my script, I created a brand new, empty script and ran the simplest possible GAQL query that uses a DURING clause.
Diagnostic Script Code:
Result of Diagnostic Test:
This minimal script also failed, producing the exact same error. Here is the log output:
Since even the most basic, syntactically correct GAQL query fails, I am certain that this is not a scripting error on my part. The issue seems to be a fundamental problem within my account's script execution environment that prevents it from correctly parsing the DURING clause.
Has anyone in the community ever experienced something like this? Is there any other debugging step I might have missed, or does this require direct intervention from the Google Ads technical support team?
Any help or insight would be greatly appreciated.
Thanks for your time.
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adwords-scripts/0804cf4b-0336-47c8-a7ca-fab99339c73bn%40googlegroups.com.
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
I could see that the GAQL query you have provided is invalid. Please be noted that while using the date filter you should use the “WHERE” clause in the query. You may refer to the below sample query to retrieve the first campaign and to remove all campaigns, you can remove the “LIMIT”.
SELECT campaign.name FROM campaign WHERE segments.date DURING YESTERDAY LIMIT 1
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.
I hope this helps! Feel free to get back to with the following details if you still face any issues.
![]() |
Google Ads Scripts Team |
[2025-08-26 10:30:25Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u5AKy:ref" (ADR-00331004)
Hi,
Thank you for your prompt and helpful reply. The sample query you provided resolved the issue immediately. The script is now working as expected.
Also, the links to the Query Builder and Validator are very helpful. I'll be sure to use them in the future.
Thanks again for your great support.
Sincerely,
Yuto
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/JJsoeM4Nbx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/adwords-scripts/KzJed000000000000000000000000000000000000000000000T1LJUP000sO5zeMHR_6YwvcZ87cPrg%40sfdc.net.