Getting aggregate metrics for Active Keywords

32 views
Skip to first unread message

Dean Povey

unread,
Sep 7, 2021, 7:49:38 PM9/7/21
to AdWords API and Google Ads API Forum
Hi all,

I have a question, is it possible to retrieve aggregate metrics for only active keywords (taking into account Ad Group Criterion Status, negative keywords and negative keyword lists etc) from a single query using the Google Ads API?  Or is it necessary to determine keyword status individually for each keyword by checking these different sources individually?

Dean.

Dean Povey

unread,
Sep 7, 2021, 8:46:24 PM9/7/21
to AdWords API and Google Ads API Forum
I should clarify, I am interesting in only the keywords that are "currently" active, ie. I want to know the historical performance of those keywords without including any previously active keywords that are no longer active.

Google Ads API Forum Advisor

unread,
Sep 8, 2021, 2:57:09 AM9/8/21
to dean....@ppcsamurai.com, adwor...@googlegroups.com
Hi Dean,

Thank you for your question.

You can use the keyword_view to retrieve statistics of both positive and negative keywords by filtering using the ad_group_criterion.negative attribute. The said negative attribute can be included in a single query since the ad_group_criterion is an attributed resource of this view. For the currently active ones, you can include a filter using the ad_group_criterion.status field. Below is a sample query you can use :

SELECT keyword_view.resource_name, ad_group_criterion.criterion_id, ad_group_criterion.negative, ad_group_criterion.keyword.text
FROM keyword_view
WHERE ad_group_criterion.status = 'ENABLED'


As for negative keywords lists, you can retrieve their information via the shared_set view and by filtering using the shared_set.type = NEGATIVE_KEYWORDS. Unfortunately, retrieving their statistics is currently not possible. Individual statistics of keywords can be retrieved instead via the keyword_view.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2NSFLk:ref
Reply all
Reply to author
Forward
0 new messages