Select keywords labels query in Ads API

70 views
Skip to first unread message

serghei....@gmail.com

unread,
Apr 22, 2019, 11:02:43 AM4/22/19
to AdWords API and Google Ads API Forum
Hello

I'm trying to get a similar to Adwords API report for keywords containing all labels attached to them for a specific period.
In Adwords API I was selecting 'Id', 'Criteria', 'Status''LabelIds''Labels' with a date range.
With Google Ads API I can only "select fields from parent resources all the way up to customer from a criteria view".
So I can select fields from ad_group_criterion, ad_group, campaign and customer, but not from ad_group_criterion_label.

I could select FROM ad_group_criterion_label directly and go up the tree to ad_group_criterion, but then I can't specify the segments.date and other metrics for the keywords.

Is there a way to achieve this task without doing 2 requests and querying each time ALL the labels for every keyword?

Thank you

googleadsapi...@google.com

unread,
Apr 22, 2019, 3:06:14 PM4/22/19
to serghei....@gmail.com, AdWords API and Google Ads API Forum
Hello Serghei, 

You will need to use two queries to pull the keyword criteria along with the associated labels. The Labels and the Label Ids should be available in the ad_group_criterion in the upcoming releases. Please check this migration guide for more information. You can also keep an eye on our blog for more updates.

Thanks,
Bharani, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages