Hi,

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

Regarding your concern, you mentioned that you are getting empty results 
using the above query but when you remove the *segments.date* from the 
Select clause, you are able to get data. Having said that, I would suggest 
referring to our *Segmentation* and *Rules for segments in the WHERE clause* 
guides as this contains more details about this.

Links included in this email:

   - *Segmentation - *
   https://developers.google.com/google-ads/api/docs/reporting/segmentation
   - *Rules for segments in the WHERE clause - *
   
https://developers.google.com/google-ads/api/docs/reporting/segmentation#rules_for_segments_in_the_where_clause
   

Regards,
Google Ads API Team
On Monday, April 17, 2023 at 7:49:36 PM UTC+8 yaa...@rivery.io wrote:

> This query fails to retrieve data, even though it gets a 200 status_code 
> when executing in Python:
>
> url= '
> https://googleads.googleapis.com/v12/customers/XXXXXX/googleAds:search'
> params_search= {"query": "SELECT customer.descriptive_name, customer.id, 
> campaign.name, campaign.id, ad_group.name,"
> " ad_group.id, metrics.impressions, metrics.clicks, metrics.conversions, "
> "metrics.cost_micros, ad_group_ad.ad.id, ad_group_ad.ad.name, 
> segments.date FROM ad_group_ad "
> "WHERE segments.date >= '2022-12-25' AND segments.date <= '2023-04-14'",
> "page_size": 10000}
>
> Here's the text response to this API request:
> '
> {
>   "fieldMask": "customer.descriptiveName,customer.id,campaign.name,
> campaign.id
> ,adGroup.name,adGroup.id,metrics.impressions,metrics.clicks,metrics.conversions,metrics.costMicros,
> adGroupAd.ad.id,adGroupAd.ad.name,segments.date"
> }
> '
>
> When I removed the *segments.date* from the Select clause, the API 
> request retrieves data back successfully.
>
> This shows that it is a valid API request in the Query Validator:
> [image: Untitled.png]
>
>
> Is there a problem using *segments.date* in the select clause, or is it 
> possible that there's just no data for the *segments.date* for these time 
> frames, or something else?
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/abe01928-a531-4567-8186-472cbdb40fban%40googlegroups.com.
  • Re... Google Ads API and AdWords API Forum
    • ... Google Ads API and AdWords API Forum
      • ... 'Yaar Or' via Google Ads API and AdWords API Forum
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
          • ... 'Yaar Or' via Google Ads API and AdWords API Forum

Reply via email to