question

john-gavin avatar image
0 Likes"
john-gavin asked

Different results in findItemsAdvanced when performing same request after a while

Once a hour I perform e.g. [this request][1] Yesterday evening it gave me 246 results and an hour later it gave me again 246 results. But when I have a look on the results and compare them I can see a strange behavior. In the [second XML][2] these aricles are missing 131662664002 161413773565 181785844048 231617976299 261683038419 But they weren't sold meanwhile. On the other hand in the second XML feed there are articles 170576153146 231541912838 261722347748 261722351865 331626001538 360855195795 361438158652 which started days ago and were expected in the [first feed][3] as well. I cannot understand why the API gives me such different unreliable answers. Has someone an explanation for this? Thank you! John [1]: http://svcs.ebay.com/services/search/FindingService/v1?SECURITY-APPNAME=XXXXXXXXXXXXXXXXXX&OPERATION-NAME=findItemsAdvanced&SERVICE-VERSION=1.0.0&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&outputSelector%280%29=SellerInfo&outputSelector%281%29=PictureURLLarge&paginationInput.entriesPerPage=100&keywords=alfa6&categoryId%280%29=131090&GLOBAL-ID=EBAY-DE&paginationInput.pageNumber=1 [2]: /storage/temp/860-19-27.zip [3]: /storage/temp/859-18-26.zip
finding-apifinditemsadvancedxml response
18-26.zip (47.3 KiB)
19-27.zip (47.4 KiB)
10 |600

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

clickimusprime avatar image
1 Like"
clickimusprime answered
I think what you're seeing here is snapshots of the same data that don't match because the data set is not being returned in a fixed order. The item set can be returned in different order on each call, so paginated results can vary. Pagination results are not drawn from a fixed set or order between page requests. In particular look at item 131662664002. It appears in your 2601_p1 and 2601_p2 results. This indicates that it changed position between calls. This can explain the other item changes as well. Default sortOrder is BestMatch. BestMatch is not your friend when you are trying to get a complete picture for >100 items. Since it is an undefined sort, the result order can't really be determined. Since you can only get slices, you can never be 100% that you got all items. Use a fixed sort. Be aware that StartTimeNewest has issues though: https://forums.developer.ebay.com/questions/11402/starttimenewest-sort-hides-items-in-finding-reques.html
· 1
10 |600

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

Thank you for your answer. I'll give it a try with sortOrder=EndTimeSoonest and let you know! John
0 Likes 0 ·
john-gavin avatar image
0 Likes"
john-gavin answered
Hello Clickprime, thank you very much for your help. Your hint was correct! John
10 |600

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

clickimusprime avatar image
0 Likes"
clickimusprime answered
"Since you can only get slices, you can never be 100% that you got all items." There is another way to approach this, but it is inefficient and the sort solution is better. You could repeat requests and store item data until the number of unique items stored matches the total count listed in the result set. This won't work when the item count is >100000, but it is potentially a way to retrieve more than 100,000 matches to query.
10 |600

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.