question

sunrunner4kr avatar image
0 Likes"
sunrunner4kr asked ·

findItemsAdvanced doesn't return the correct number of results

So...I'm using the api tool to test my API requests. And I have the below query: -


<findItemsAdvancedRequest xmlns="http://www.ebay.com/marketplace/search/v1/services">
  <itemFilter>
    <name>Seller</name>
    <value>renewalnorthwest</value>
  </itemFilter>
  <itemFilter>
    <name>LocatedIn</name>
    <value>WorldWide</value>
  </itemFilter>
  <paginationInput>
    <entriesPerPage>100</entriesPerPage>
    <pageNumber>3</pageNumber>
  </paginationInput>
</findItemsAdvancedRequest>

In the response, there are 326 entries, which means 3 pages of 100, and 1 of 26

<paginationOutput>
    <pageNumber>3</pageNumber>
    <entriesPerPage>100</entriesPerPage>
    <totalPages>4</totalPages>
    <totalEntries>326</totalEntries>
  </paginationOutput>

Page 1 and page 2 both return 100 entries

However, Page 3 returns only 84 entries! And Page 4 is empty...

<?xml version='1.0' encoding='UTF-8'?>
<findItemsAdvancedResponse 
  xmlns="http://www.ebay.com/marketplace/search/v1/services">
  <ack>Success</ack>
  <version>1.13.0</version>
  <timestamp>2021-05-05T13:03:46.934Z</timestamp>
  <searchResult count="84">
    <item>

So...1) any clue why there's only 84? I'm not filtering my results much, and 2) why say there is 326 but only return 284!!!

finditemsadvancedfinding api
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

foulfoot avatar image
0 Likes"
foulfoot answered ·

I noticed long ago that the count of results returned by the API is often inaccurate. I download multiple pages at once (multi- cURL) and combine them into an array locally, then count what I've got.

·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sunrunner4kr avatar image
0 Likes"
sunrunner4kr answered ·

Hoping someone can help with this.

If I can't rely on the Entries count returned, then it's impossible to request number of pages. And you end up requested a page with no entry causing API failure

·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.