Chapter 1: Using the REST API 9
Find Items with GetSearchResults
Version 3.7
4 Using your production keys, obtain a REST token for an eBay user at the following location:
http://developer.ebay.com/tokentool
If you already have obtained a REST token for an eBay user, you can retrieve it with the GetUser call.
For more information, see GetUser in the unified schema documentation, accessible from the
following location:
http://developer.ebay.com/support/docs/
5 To begin making REST calls in production, see the production URL for the REST API in “Basic
REST Input Parameters” on page 3.
Testing REST Calls Using a Browser
You can make calls to the REST API using a Web page or an application. You also can specify an URL
in a Web browser.
A Web browser displays the XML returned by the API. If you have uploaded and specified an XSL
file (see “Transforming Data Returned” on page 20), a browser may display search results in HTML.
You can do a test call in the Sandbox environment using a browser. Before you do so, follow the
instructions in “Obtaining a REST Token for the Sandbox” on page 8. You can make the test call
using the following URL. Substitute your Sandbox token and Sandbox user values for the
UserToken
and
UserName values. The token you use must correspond to the username you use.
http://rest.api.sandbox.ebay.com/
restapi?CallName=GetSearchResults&RequestToken=UserToken&RequestUserId=UserName&Query=toy
%20boat&Version=491&UnifiedInput=1
Data is returned as an XML document.
Find Items with GetSearchResults
With GetSearchResults, you can use keywords and many other criteria to retrieve items listed on
eBay. Rich functionality makes GetSearchResults a powerful call for retrieving items.
Also see the section “Basic REST Input Parameters” on page 3 for information about URLs used and
required parameters.
Formerly, REST input parameters for GetSearchResults were similar to the legacy XML API input
parameters for GetSearchResults. Now, you must begin specifying unified schema parameters for
GetSearchResults. The unified schema is standardized and uses objects for data exchange.
Additionally, parameters specific to GetSearchResults are not case sensitive.
All applications must be migrated from legacy input parameters to unified schema input parameters.
For more information, see “GetSearchResults Input Parameters” on page 10.