Skip to main content
Published: July 29 2009, 2:16:00 PMUpdated: September 05 2022, 8:50:24 AM

How can I search for items and filter results like the web search. Here is a sample search -­&_sacat=63889

findItemsAdvanced call from the Finding API is a powerful call that enables you to search for items on eBay by category (using categoryId), by keywords (using keywords), or a combination of the two. You can refine your search just like the site by including aspect filters. To replicate the search query in the question follow the steps below -

Make a call to getHistograms with outputSelector set to AspectHistogram and the categoryId set to the category within which you need to search for items. Below is a sample query that searches for women's shoes -

You will notice that the AspectHistogram container in the response contains counts of items that match the particular aspect value. Use this information to construct aspect filters for the findItemsAdvanced query.

You may use item filters and aspect filters to further narrow your search. The sample query below further narrows the results returned by using item filter for price and aspect filters for shoe size, style and condition. The aspect filter values are derived from the results of the previous query."US Size"&aspectFilter(0).aspectValueName(0)="7.5"&aspectFilter(0).aspectValueName(1)="8"&aspectFilter(1).aspectName="Style"&aspectFilter(1).aspectValueName(0)="Sandals"&aspectFilter(2).aspectName="Condition"&aspectFilter(2).aspectValueName(0)="New: In Box"&categoryId=63889

By issuing a series of find queries, you can continually refine the items returned in your responses. Do this by repeating a query using the aspect values returned in one response as the input values to your next query.


How well did this answer your question?
Answers others found helpful