cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

item_summary call returns value for next even when total is less than offset

I'm working on paginating results and thought I could use the NEXT value to help.  However, when I make a call I keep getting a NEXT value even when the offset exceeds the value of TOTAL.

 

The first call I'm making is https://api.ebay.com/buy/browse/v1/item_summary/search?q=corvette+ls3&limit=10&category_ids=33615&of...  This call has a TOTAL value of 34 and a NEXT value of  

 

which seems fine.  Then I run the call https://api.ebay.com/buy/browse/v1/item_summary/search?q=corvette+ls3&limit=10&category_ids=33615&of...

 

This returns a value for TOTAL of 26 and a NEXT value of 

 

I run this NEXT value and get a TOTAL of 22 and a NEXT value of 

 
This is when I would expect that there wouldn't be a NEXT value.  
 
So I run 
https://api.ebay.com/buy/browse/v1/item_summary/search?q=corvette+ls3&limit=10&category_ids=33615&of... and get a TOTAL value of 26 and a NEXT value of 
 
Then I just keep getting repeats of listings and a NEXT value no matter what I set the LIMIT value to. It just keeps going on and on with the same results and no end to the number of pages.  
 
I don't think I'm doing anything wrong in my calls so this has to be a bug.
Message 1 of 2
latest reply
1 REPLY 1

item_summary call returns value for next even when total is less than offset

I'm interested in the outcome of this question/enquiry.

I've learnt to typically ignore the result of "total" as it seems to be very inaccurate. My only explanation is that "total" might pertain to exact/very similar results to your search. For example:

Try searching "GTX 1060 Gaming PC" on ebay (I used .com). At the time I searched it, it said below the search bar "14 results for RTX 1060 PC", however you can scroll through many more results than 14.

14 appears to pertain to the more similar results that appear at the top.

Like I said before, I generally ignore the "total" value - it takes no more eBay requests to set the limit to 100 as it does to set the limit to 10, so I instead count the amount of results it returns, and always set my limit to at least double my pagination value or 100, and count the amount of results that returns instead. Then I generally know if there will be more results.

You can assumedly use "total" to format results along the lines of "total match" or "related results".

Hope this helps.

Message 2 of 2
latest reply