Hello Phil,

To get the count of the rows without iterating you could use the below code
code snippet for Java. You could use the similar functionality in other
client libraries as well to get the count of the results. Also, the
PAGE_SIZE attribute can be mentioned for the search query to get not more
than that many results in the response. You could refer our sample code to
get campaigns in Java here
<https://github.com/googleads/google-ads-java/blob/master/google-ads-examples/src/main/java/com/google/ads/googleads/examples/basicoperations/GetCampaigns.java#L97> for
reference, code samples in other languages can be found here
<https://developers.google.com/google-ads/api/docs/client-libs>.

Code snippet in Java:
 searchPagedResponse.getPage().getPageElementCount();

Please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/00d12jt03g0000010bnumu000f1i8gz6cmjadpp6oo30c1g68qj2e9l%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • Can a r... Phil
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Phil
        • ... Philip Stefou
          • ... Philip Stefou
            • ... Philip Stefou

Reply via email to