resource name is null

29 views
Skip to first unread message

Moshiko Bitton

unread,
Jun 20, 2024, 12:28:29 PM6/20/24
to Google Ads API and AdWords API Forum
Hi, 
GAQL : SELECT ad_group.id, ad_group_ad.ad.id , ad_group.labels 
              FROM ad_group_ad 
              WHERE ad_group.labels IS NULL 
This query isn't good. The error according the query builder is that the column ad_group.labels support only the next operators : CONTAINS ANY/ALL/NONE. So how can I search the ad_groups with no labels? 
Thanks!   

Google Ads API Forum Advisor

unread,
Jun 20, 2024, 11:31:13 PM6/20/24
to moshiko....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

Upon reviewing your query, I understand that you would like to search for ad_groups with no labels in your account. To search for ad_groups with no labels in Google Ads Query Language (GAQL), you need to use the CONTAINS NONE operator. This operator allows you to find items where a specified field does not contain any of the provided values.

Please specify (' ') for the CONTAINS NONE operator, which indicates that the ad_group.labels field should not contain any values. Additionally, I have observed that you are using ad_group_ad.ad.id, which is not a supported resource field in the ad_group. I would suggest you refer to this document to know more about the supported resource fields in the ad_group.

If you need further assistance, please provide the uncropped UI screenshot of the report of which you're trying to retrieve via the API.

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJPlU:ref" (ADR-00242908)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Reply all
Reply to author
Forward
0 new messages