How could I get with the Adwords API to get all the keywords from enabled adgroups in enabled campaigns only?

43 views
Skip to first unread message

Ершов Александр

unread,
Sep 12, 2019, 7:26:23 AM9/12/19
to AdWords API and Google Ads API Forum
Hello!

We're trying to get total number of keywords in the Adwords API in enabled/paused adgroups in enabled/paused campaigns.
We could do it with the Google Ads UI, but couldn't figure out it for API.

As far as I can tell, https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService doesn't allow to pass Status field for Campaign / Adgroup status linked to the keyword

Thank you!

Best wishes,
Alexander

Google Ads API Forum Advisor Prod

unread,
Sep 12, 2019, 11:19:09 AM9/12/19
to elektrik...@gmail.com, adwor...@googlegroups.com
Hi Alexander, 

That's right. The campaign and ad group status fields are not available in the AdGroupCriterionService. As an alternative, you may use the Keywords Performance Report which will return the data at the keywords level. You can filter this report based on the AdGroupStatus and CampaignStatus for the specific keyword. Please find the reporting code samples available in different languages for your reference. Hope this helps!!

Thanks,
Bharani, Google Ads API Team

 

ref:_00D1U1174p._5001UHGYUl:ref

Ершов Александр

unread,
Sep 12, 2019, 11:27:05 AM9/12/19
to AdWords API and Google Ads API Forum
Hello!
Thank you for your response.

We need to monitor whether we're getting close to hitting the ENTITY_LIMIT by keywords. That's our goal

So unfortunately, using report doesn't work for us

Do you know any other way to check whether we're close to hitting 5 mln keyword limit or not?

Google Ads API Forum Advisor Prod

unread,
Sep 12, 2019, 4:58:22 PM9/12/19
to elektrik...@gmail.com, adwor...@googlegroups.com
Hi, 

Through the API services, it is not possible to pull the data based on status. Since you're close to hitting the limits, pulling the reports would be the best option for large data sets. You will be able to pull the data about keywords available in the account. Is there any specific reason you don't want to use reports? This will help us point you in the right direction. 

Ершов Александр

unread,
Sep 12, 2019, 5:19:49 PM9/12/19
to AdWords API and Google Ads API Forum

Hello, Bharani!

The reason is that we need this number to be as relevant as possible.
As I understand, the report will only show performing keywords, and will have some lag in updating.

We actually found a temporarily way to do it - we query the adgroupIds,
and then in a loop we get keywords count for those adgroupIds. That's not the ideal solution, but it does work.
Reply all
Reply to author
Forward
0 new messages