Thanks for the follow-up, unfortunately this will still involve pulling the result set over the network. We'll have to think of something else. Thanks.
________________________________ From: adwordsapi-supp...@google.com <adwordsapi-supp...@google.com> Sent: Tuesday, February 12, 2019 2:09:33 AM To: Philip Stefou Cc: AdWords API and Google Ads API Forum Subject: RE: Can a row count be obtained without iterating through all rows Hello Philip, It is the total number of elements in the response page. As a workaround you could remove the PAGE_SIZE in your request(don't set PAGE_SIZE), so that the entire result set will be in a single page and then the number of rows in the response will be equal to the number of elements in the page. Code snippet in Java: searchPagedResponse.getPage().getPageElementCount(); Please let me know if you have any further questions. Regards, Sai Teja, AdWords 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/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ On 02/08/19 16:07:18 pste...@wordstream.com wrote: Thanks for the reply, does this give the row count of the total number of rows that would be returned by the query or just the rows on the page? The problem I'm trying to solve is obtaining a total count of all rows that would be returned by a given query, without the need to pull all the data over the network. Let me know what you think, thanks again. On Saturday, February 9, 2019 at 5:59:35 AM UTC+9, googleadsapi-forumadvisor wrote: 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/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Was your question answered? Please rate your experience with us by taking a short survey. If not -- reply to this email and tell us what else we can do to help. Take Survey<https://support.google.com/google-ads/contact/survey_transactional?caseid=3-5796000025195&hl=en&ctx=1> 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/f195128e-b692-4922-aa51-3a8168ade889%40googlegroups.com<https://groups.google.com/d/msgid/adwords-api/f195128e-b692-4922-aa51-3a8168ade889%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/MN2PR06MB58212F64C0913D7768B0DCD9C9640%40MN2PR06MB5821.namprd06.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.