Maybe there wasn't at the time, but there sure is now.

There is according to the examples here:  
https://developers.google.com/google-ads/api/docs/query/overview#querying_for_segments

I haven't found the list of acceptable values yet, so maybe that 
documentation is out of date, but it is for the current version of the API.

This validated, for example:
SELECT
  campaign.id,
  campaign.name,
  campaign.status,
  metrics.impressions,
  segments.date
FROM campaign
WHERE campaign.status = 'PAUSED'
  AND metrics.impressions > 1000
  AND segments.date during LAST_30_DAYS
ORDER BY campaign.id

On Tuesday, July 26, 2022 at 2:33:19 PM UTC-7 charlesb...@gmail.com wrote:

> Hi,
>
> There's no "DURING" with GAQL.
>
> Try the GAQL query validator.
>
> On Tuesday, 26 July 2022 at 14:51:03 UTC-5 hema21...@gmail.com wrote:
>
>> Hi Team
>>
>> I'm trying to get the data based on  the date range. The following query 
>> is working fine if I'm specifying the predefined date ranges like 
>> LAST_MONTH, LAST_7_DAYS. But, giving an error while trying to give the 
>> custom date ranges for "segments.date" . Could you pls let me know what is 
>> causing the issue and if you can provide the working query for the below 
>> example with custom date range will really help. TIA!
>>
>>
>> curl -f --request POST "
>> https://googleads.googleapis.com/v11/customers/3659251597/googleAds:searchStream";
>>  
>> --header "login-customer-id:4382929747 <(438)%20292-9747>" --header 
>> "Content-Type: application/json" --header 'developer-token: ${dev_token}' 
>> --header 'Authorization: Bearer '${access_token}'' --data '{ "query": 
>> "select metrics.clicks, segments.device, segments.day_of_week, 
>> segments.month_of_year FROM campaign WHERE metrics.clicks > 0 AND 
>> segments.date DURING LAST_MONTH LIMIT 10" }'
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/08ec4906-76ce-478f-90e2-a1a3185c55aan%40googlegroups.com.
  • Re... Roy Steves
    • ... Roy Steves
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to