get Labels in keyword report

312 views
Skip to first unread message

FMore

unread,
Feb 7, 2022, 7:57:19 AM2/7/22
to Google Ads API and AdWords API Forum
Hi 

i am trying to get a keyword report that includes labels
I am following this link with mappings:


LabelIds ==  Select label.resource_name from the resource ad_group_label
how can I combine these 2 resources in one query?

Here is my GAQL that returns an error:

SELECT
                ad_group_criterion.criterion_id,
                ad_group_criterion.keyword.text,
                ad_group_criterion.labels,
                (Select label.name from the resource ad_group_label),
                ad_group.name,
                ad_group.id,
                campaign.name,
                label.id,
                label.name,
                campaign.id,
                metrics.impressions,
                metrics.conversions,
                metrics.cost_per_conversion,
                ad_group_criterion.effective_cpc_bid_micros,
                metrics.clicks,
                metrics.ctr,
                metrics.average_cpc
                FROM keyword_view


Thanks

FMore

unread,
Feb 7, 2022, 8:23:19 AM2/7/22
to Google Ads API and AdWords API Forum
Update:

adding   ad_group_criterion.labels return the labelIds.
Thats a start. Instead of Id how can i get  label values?

 $query = 'SELECT
                ad_group_criterion.criterion_id,
                ad_group_criterion.keyword.text,
                ad_group_criterion.labels,
                ad_group.name,
                ad_group.id,
                campaign.name,

                campaign.id,
                metrics.impressions,
                metrics.conversions,
                metrics.cost_per_conversion,
                ad_group_criterion.effective_cpc_bid_micros,
                metrics.clicks,
                metrics.ctr,
                metrics.average_cpc
                FROM keyword_view

Thanks

Google Ads API Forum Advisor

unread,
Feb 7, 2022, 10:58:21 PM2/7/22
to filipem...@gmail.com, adwor...@googlegroups.com

Hi there,

Thanks for reaching out to the Google Ads API Forum.

You may use the keyword_view and include the ad_group_criterion.labels in your SELECT query and then perform a separate request for the label report.

Also, our team already has created a feature request to include label names and attributes in the keyword_view. You may also continue to follow our blog for updates and announcements related to this feature.

Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W4wyG:ref

Rajesh Mandalapu

unread,
Jun 12, 2022, 3:22:22 AM6/12/22
to Google Ads API and AdWords API Forum
HI there,

It would be nice if Google adds label names and attributes in other resources to like ad_group_ad, ad_group and campaign directly instead of calling separate API for them as on Google Ads v10.

Is there any update on this front? currently we have a use case of using Labels with the mentioned resources.

Google Ads API Forum Advisor

unread,
Jun 13, 2022, 4:46:38 AM6/13/22
to adwor...@googlegroups.com

Hi Rajesh,

Thanks for commenting on this post.

Thanks for expressing your interest to get label names and attributes in other resources to like ad_group_ad, ad_group and campaign directly to avoid separate Label report request. For us to raise a feature request on your behalf, could you please provide us with the detailed feature request description and justification (business use cases where this feature is critical)? Kindly note that feature requests are subject to review.

Regards,

Message has been deleted

Rajesh Mandalapu

unread,
Jul 8, 2022, 4:57:11 AM7/8/22
to Google Ads API and AdWords API Forum
Sorry for late reply.

We were using labels as part of reports like AD_PERFORMANCE_REPORTADGROUP_PERFORMANCE_REPORTCAMPAIGN_PERFORMANCE_REPORT and KEYWORDS_PERFORMANCE_REPORT directly with AdWord API. As we have migrated to GoogleADs v10 API, there is no direct way of using labels like earlier. 

Our business use case is like, we see the metrics information based on labels in some or all of the above reports. For an example, you can consider the below attachment of data when we query on some labels with other clauses. It is good to have feature in our product where it was present with Adwords API.

Could you please suggest or create this feature available in next releases of Google ADs API?
labels.png
Reply all
Reply to author
Forward
0 new messages