Skip to main content
Published: February 15 2007, 6:26:00 PMUpdated: November 28 2020, 3:19:54 PM

As shows below, the ApproximatePages value returned in GetProductSearchResults does not match the Pagination.PageNumber that is passed in. ( There are about 410 Products returned in the Response. I iterate thought pages by setting EntriesPerPage to 3)

PageNumber 0, ApproximatePages returned as 11
...
PageNumber 10, ApproximatePages returned as 11
PageNumber 11, ApproximatePages returned as 12
PageNumber 12, ApproximatePages returned as 13
...
PageNumber 20, ApproximatePages returned as 21

What is happening?

Detailed Description

   ApproximatePages property is an indication of an approximate pages that eBay API Server has been queried to find the results that matches the request. There is no mapping between  ApproximatePages property and Pagination.PageNumber property thus you should not use ApproximatePages to determine the total number of pages.


NOTE. The definition for ApproximatePages is not clear and  the document will be updated in the next release.

 You can follow the below suggestion to determine the maximum number that could be used for the PageNumber :

  1. Set Pagination.EntriesPerPage to a large value and start with Page 0.

  2. Check the response and submit the same request again by  incrementing the Pagination.PageNumber value if the following returns true:

  GetProductSearchResultsResponse.NumProducts * ( PageNumber+1 ) >= Pagination.EntriesPerPage &&  HasMore



Additional Resources
 
   Documentation : GetProductSearchResults

How well did this answer your question?
Answers others found helpful