05-18-2023 03:57 PM
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
05-22-2023 04:23 AM
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.