1
0
-1

How can I find out the total number of animals that match a query with the HTTP API?  I am looking for the total number of animals found in my search query, not the number specified in the resultLimit field.  For example, if I set resultLimit to 25, I'm expecting the total number of animals from my search query to be much more than 25.  Is there a totalItems field somewhere that will show this?  Here's another example of what I'm looking for.  Let's say I run a search for all adoptable dogs Atlanta zip code.  Well, let's say the total number of dogs that meet this search criteria is 2000.  When I run my search and I set my resultLimit to 25 so I don't slow my system down, where can I see that the real (total) number of animals found in my search is 2000?   

I found another question on this forum that Richard answered where the question asked for the total number of "rows" returned.  I'm not sure if "row" is the same thing as total number of animals.  In my case, I'm looking for the total number of animals.  Richard's answer to that question was to set calcFoundRows to yes and then to use the foundRows property.  If "rows" is the total number of animals then how and where do I use the foundRows property to get the total number of animals.  

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      If you use Excel, you can export the report to it and find a unique field in your report that is only on one line per animal.  I use recue ID, but you can use date found, etc.-anything that is simple and unique.  I find that exporting the file is very helpful.

       

      Then at the bottom of the Excel report in the column that you choose to count, use the formula =counta(a1..a576) for example. 

      1. Angelina R

        Hi Heidi,

        I didn't think to do that!  Great idea!  I'm good with Excel so I'll try that as well.  Thank you:)

         

        Angelina

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Angelina,

      In the search array in your request you need to include:

      "calcFoundRows" => "Yes"

      Then the foundRows value will be included in the result.  That is the total number of rows that match your filters.

      You can find an example in this article: How to make a request to the HTTP API in the section "Example of a search (using an API key)"

      Richard

      1. Angelina R

        Hi Richard,

        I found where the "foundRows" is.  I can't believe I overlooked that.  It was there the entire time, but was camouflaged in with the other data.  Anyway, I did a search for all adoptable male dogs within a 100 mile radius Atlanta zip code 30332 and foundRows is 546.  I though there would be more dogs than 546.  I did another search for another city and there's 146 dogs.  Does that seem right?  Or should there be thousands?

        Thank you for your quick reply.

         

        Angelina

      CommentAdd your comment...