cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

search api

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?

Message 1 of 2
latest reply
1 REPLY 1

search api

@hoss_4807 

 

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.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 2 of 2
latest reply