05-03-2023 09:21 AM
Hi there
I'm using this search API: https://svcs.ebay.com/services/search/FindingService/v1?Operation-Name=findItemsByKeywords
First page is ok but when I get more pages(2, 3, .....), It returns something like this -> [{"@count":"0"}]
Can you help me, please?
05-14-2023 09:47 PM
There are several ways to make a call into the Finding API. I typically use the URL method with either an NV response or a JSON response.
When making your initial call for page 1, you will include the number of items per page you would like returned (100 max). The API response will report how many total items are listed and how many total pages are available. Each subsequent page number, along with the "items per page" count, must be submitted with each call for page 2, 3, and so forth.
Are your keywords returning more than one page? One way to test is to manually use eBay's keyword search function on the site. Variation listings will display a count far in excess of the number of actual listings, since eBay will count each variation as a separate item, yet will only display the master in a manual search. A page that displays 8 listings may show a count of perhaps 200 items on the site. Using HideDuplicateItems in the call will eliminate variations and return only the master records.
My notes indicate that in Feb 2018, eBay changed the way they counted items, and that I had modified my code to end the retrieval as soon as a partial page was returned and to throw out duplicate item numbers. I don't recall the specific issue, or whether it was ever fixed, as the workaround is still in my code. I suspect the problem was that eBay did not reduce the total count when I chose to HideDuplicateItems.
Additionally, because there is a time delay for the retrieval of each page, the list can slip one way or the other, and an item might be skipped or duplicated on the next page.