A SERVICE OF

logo

Chapter 1: Using the REST API 13
Find Items in a Category with GetCategoryListings
Version 3.7
Paginating Search Results
GetSearchResults returns items in “pages” to reduce the amount of data sent to clients in response to
any one call.
For pagination, you use the
EntriesPerPage and PageNumber input parameters, as in the example
with these parameters at “GetSearchResults Samples” on page 10.
EntriesPerPage is the maximum
number of
ItemType objects that should be returned in the SearchResultItemArray for any given
call.
PageNumber is the number of the page of data to return in the current call (default is 1).
In the response,
ItemsPerPage indicates the number of items returned by the current call.
PaginationResult.TotalNumberOfEntries indicates the total number of items matching the search
criteria.
PaginationResult.TotalNumberOfPages indicates the total number of pages that could be
returned by repeated requests, based on what you specified for
EntriesPerPage. The value in
Pagination.PageNumber indicates the page number of the data returned in a call.
Find Items in a Category with GetCategoryListings
With GetCategoryListings, you can find items on eBay based on a category. You can filter results
using many criteria, such as location, whether the item is listed in an ebay Store, and the listing type.
The response is an array.
For example, you could use an URL similar to the following to retrieve items in category 20081:
http://rest.api.ebay.com/
restapi?CallName=GetCategoryListings&RequestToken=UserToken&RequestUserId=UserName&CategoryI
D=20081&DetailLevel=ReturnAll&Version=491
You can use GetCategories to retrieve category information before you use GetCategoryListings (see
“Obtain a Category Hierarchy with GetCategories” on page 18).
Parameters for GetCategoryListings are the same in the REST API as in the unified schema, except
for the basic REST input parameters. For the REST-specific input parameters, see “Basic REST Input
Parameters” on page 3. For more information about using GetCategoryListings, including
descriptions of the call-specific input and output parameters, see the following document:
GetCategoryListings
General information about the unified schema format is available at the following location:
http://developer.ebay.com/support/docs/
After you have tested your program’s ability to handle output, you can use your program in
production to transform output or you can enable server-side processing. Server-side processing
uses your XSL files to format the output for you. For more information on server-side processing that
uses your XSL files, see “Transforming Data Returned” on page 20.