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

It's lack of search result that Finding API/findItemsAdvanced returns

I'm trying to retrieve search results by using  Finding API/findItemsAdvanced,

It seems to inconsistent a count of searchResult and paginationOutput.

 

For example, following is containing 'adidas' as keywords.

const url = `https://svcs.ebay.com/services/search/FindingService/v1\
?OPERATION-NAME=findItemsAdvanced\
&SERVICE-VERSION=1.0.0\
&SECURITY-APPNAME=${clientId}\
&RESPONSE-DATA-FORMAT=JSON\
&REST-PAYLOAD\
&keywords=adidas`

 

In my case, searchResult.count was 10,

but expected count is 100 due to pagenationOutput as following.

            "paginationOutput": [
                {
                    "pageNumber": [
                        "1"
                    ],
                    "entriesPerPage": [
                        "100"
                    ],
                    "totalPages": [
                        "21201"
                    ],
                    "totalEntries": [
                        "2120034"
                    ]
                }
            ],

 

Other cases also return few count of search result. 

Is the count of search results limited implicitly with some reason?

Message 1 of 4
latest reply
1 BEST ANSWER

Accepted Solutions

It's lack of search result that Finding API/findItemsAdvanced returns

The Finding API will return no more than 10,000 items, and since that count can include variations, the number of actual  listings can be considerably fewer than the item count. To eliminate variations from affecting the number of returnable items, include an indexed itemFilter:

 

&itemFilter(index).name=HideDuplicateItems

&itemFilter(index).value=true

 

The Finding API can return up to 100 items per page, and will only return one page per call.  If the call returned only 10 items on page 1, and 100 items were expected, the variations have influenced the number.

 

Beginning in Feb 2018, even with variations/duplicates turned off, eBay began returning the totalPages and totalEntries based on the larger number that included variations. In modifying my code, I had to look at the returned number of items on each page to determine if the last page had been reached. In some cases, the last page ended with an even count, so, rather than struggling with that (and with some items moving to the next or prior page, due to the timing of each page call), I settled on an array-sort to remove duplicate entries.

 

 

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

View Best Answer in original post

Message 2 of 4
latest reply
3 REPLIES 3

It's lack of search result that Finding API/findItemsAdvanced returns

The Finding API will return no more than 10,000 items, and since that count can include variations, the number of actual  listings can be considerably fewer than the item count. To eliminate variations from affecting the number of returnable items, include an indexed itemFilter:

 

&itemFilter(index).name=HideDuplicateItems

&itemFilter(index).value=true

 

The Finding API can return up to 100 items per page, and will only return one page per call.  If the call returned only 10 items on page 1, and 100 items were expected, the variations have influenced the number.

 

Beginning in Feb 2018, even with variations/duplicates turned off, eBay began returning the totalPages and totalEntries based on the larger number that included variations. In modifying my code, I had to look at the returned number of items on each page to determine if the last page had been reached. In some cases, the last page ended with an even count, so, rather than struggling with that (and with some items moving to the next or prior page, due to the timing of each page call), I settled on an array-sort to remove duplicate entries.

 

 

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 4
latest reply

It's lack of search result that Finding API/findItemsAdvanced returns

Thanks for detailed explanation!

As you said, it went well with enabling HideDuplicateItems.

Message 3 of 4
latest reply

It's lack of search result that Finding API/findItemsAdvanced returns

Thank you so much!!!  I was losing my mind with this problem.

Message 4 of 4
latest reply