Count instead of listing elements

264 views
Skip to first unread message

Miguel Angel Garcia

unread,
May 24, 2022, 8:29:44 AM5/24/22
to Google Ads API and AdWords API Forum
Hi,

Instead of getting a list of elements, I want only the count of those elements. 

For example, instead of getting a list of 30 keywords, I just want to receive the number "30". 

Is there a way to do this using the API? 

I've tried with SELECT COUNT(), but it gives me "Error in query: unexpected input". Without COUNT the query it works OK.

I don't have experience with SQL or GAQL, so maybe I'm missing something very obvious.

Thanks!

Google Ads API Forum Advisor

unread,
May 25, 2022, 1:06:38 AM5/25/22
to delval...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thank you for reaching out to us.

I'm afraid that we do not have that kind of method in Google Ads Query Language. With this, I would suggest you check this documentation for an alternative to setting it in the method itself.

Moving forward, since you said that you don't have experience with SQL or GAQL, i would suggest you to familiarize yourself with this Google Ads Query Language documentation.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


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