A SERVICE OF

logo

Chapter 1: Using the REST API 10
Find Items with GetSearchResults
Version 3.7
Using GetSearchResults, you can filter results using many criteria, including category and currency.
For example, an URL similar to the following might be used to search a category (617) for listings
with “star+trek”:
http://rest.api.ebay.com/
restapi?CallName=GetSearchResults&RequestToken=UserToken&RequestUserId=UserName&CategoryID
=617&Query=star+trek&Version=491&UnifiedInput=1
The keywords can include wildcards. The response is an array. You can filter the item listings
returned using such criteria as the listing category, the location, whether the item is listed in an eBay
Store, and the listing type.
You cannot use GetSearchResults to search or browse eBay Express. For information about finding
items on eBay Express, see “Find Items with GetSearchResultsExpress” on page 14.
The following sections describe specific aspects of the GetSearchResults call:
“GetSearchResults Samples” on page 10
“GetSearchResults Input Parameters” on page 10
“GetSearchResults Query Modifiers” on page 12
“GetSearchResults Output Fields” on page 12
GetSearchResults Samples
This section contains REST API samples that use the GetSearchResults call.
Please substitute your eBay user name and your REST token for
UserName and UserToken.
The following URL provides a search of the listing title and description using “fuzzy slippers”; a
maximum of 5 results will be returned:
http://rest.api.ebay.com/
restapi?CallName=GetSearchResults&RequestToken=UserToken&RequestUserId=UserName&Query=fuzz
y%20slippers&EntriesPerPage=5&PageNumber=1&SearchFlags=SearchInDescription&Version=491&Unifi
edInput=1
The following URL uses a Query parameter of “kitchen table” and sorts the items in the response in
ascending order based on whether PayPal is accepted (accepted followed by unaccepted):
http://rest.api.ebay.com/
restapi?CallName=GetSearchResults&RequestToken=UserToken&RequestUserId=UserName&Query=kitch
en%20table&Order=SortByPayPalAsc&Version=491&UnifiedInput=1
GetSearchResults Input Parameters
Formerly, REST input parameters for GetSearchResults were similar to the legacy XML API input
parameters for GetSearchResults.
Now, all applications must be migrated from legacy input parameters to unified schema input
parameters. The unified schema is standardized and uses objects for data exchange.