catalog APIv1_beta.3.0

search

GET
/product_summary/search
This call searches for and retrieves summaries of one or more products in the eBay catalog that match the search criteria provided by a seller. The seller can use the summaries to select the product in the eBay catalog that corresponds to the item that the seller wants to offer for sale. When a corresponding product is found and adopted by the seller, eBay will use the product information to populate the item listing. The criteria supported by search include keywords, product categories, and category aspects. To see the full details of a selected product, use the getProduct call.

In addition to product summaries, this call can also be used to identify refinements, which help you to better pinpoint the product you're looking for. A refinement consists of one or more aspect values and a count of the number of times that each value has been used in previous eBay listings. An aspect is a property (e.g. color or size) of an eBay category, used by sellers to provide details about the items they're listing. The refinement container is returned when you include the fieldGroups query parameter in the request with a value of ASPECT_REFINEMENTS or FULL.

Example
A seller wants to find a product that is "gray" in color, but doesn't know what term the manufacturer uses for that color. It might be Silver, Brushed Nickel, Pewter, or even Grey. The returned refinement container identifies all aspects that have been used in past listings for products that match your search criteria, along with all of the values those aspects have taken, and the number of times each value was used. You can use this data to present the seller with a histogram of the values of each aspect. The seller can see which color values have been used in the past, and how frequently they have been used, and selects the most likely value or values for their product. You issue the search call again with those values in the aspect_filter parameter to narrow down the collection of products returned by the call.

Although all query parameters are optional, this call must include at least the q parameter, or the category_ids, gtin, or mpn parameter with a valid value. If you provide more than one of these parameters, they will be combined with a logical AND to further refine the returned collection of matching products.

Note: This call requires that certain special characters in the query parameters be percent-encoded:

    (space) = %20       , = %2C       : = %3A       [ = %5B       ] = %5D       { = %7B       | = %7C       } = %7D

This requirement applies to all query parameter values. However, for readability, call examples and samples in this documentation will not use the encoding.


This call returns product summaries rather than the full details of the products. To retrieve the full details of a product, use the getProduct call with an ePID.

Input

Resource URI (production)

GET https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?

URI parameters

ParameterTypeDescription
offsetstringThis parameter is reserved for internal or future use.

Occurrence: Optional

limitstringThe number of product summaries to return. This is the result set, a subset of the full collection of products that match the search or filter criteria of this call.

Maximum: 200
Default: 50

Occurrence: Optional

fieldgroupsarray of stringThe type of information to return in the response.

Important: This parameter may not produce valid results if you also provide more than one value for the category_ids parameter. It is recommended that you avoid using this combination.

Valid Values:
  • ASPECT_REFINEMENTS — This returns the refinement container, which includes the category aspect and aspect value distributions that apply to the returned products. For example, if you searched for Ford Mustang, some of the category aspects might be Model Year, Exterior Color, Vehicle Mileage, and so on.

    Note: Aspects are category specific.
  • FULL — This returns all the refinement containers and all the matching products. This value overrides the other values, which will be ignored.
  • MATCHING_PRODUCTS — This returns summaries for all products that match the values you provide for the q and category_ids parameters. This does not affect your use of the ASPECT_REFINEMENTS value, which you can use in the same call.
Code so that your app gracefully handles any future changes to this list.

Default: MATCHING_PRODUCTS

Occurrence: Optional

aspect_filterAspectFilterAn eBay category and one or more aspects of that category, with the values that can be used to narrow down the collection of products returned by this call.

Aspects are product attributes that can represent different types of information for different products. Every product has aspects, but different products have different sets of aspects.

You can determine appropriate values for the aspects by first submitting this call without this parameter. It will return either the productSummaries.aspects container, the refinement.aspectDistributions container, or both, depending on the value of the fieldgroups parameter in the request. The productSummaries.aspects container provides the category aspects and their values that are associated with each returned product. The refinement.aspectDistributions container provides information about the distribution of values of the set of category aspects associated with the specified categories. In both cases sellers can select from among the returned aspects to use with this parameter.

Note: You can also use the Taxonomy API's getItemAspectsForCategory call to retrieve detailed information about aspects and their values that are appropriate for your selected category.

The syntax for the aspect_filter parameter is as follows (on several lines for readability; categoryId is required):

aspect_filter=categoryId:category_id,
aspect1:{valueA|valueB|...},
aspect2:{valueC|valueD|...},...


A matching product must be within the specified category, and it must have least one of the values identified for every specified aspect.

Note: Aspect names and values are case sensitive.

Here is an example of an aspect_filter parameter in which 9355 is the category ID, Color is an aspect of that category, and Black and White are possible values of that aspect (on several lines for readability):

GET https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?
aspect_filter=categoryId:9355,Color:{White|Black}


Here is the aspect_filter with required URL encoding and a second aspect (on several lines for readability):

GET https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?
aspect_filter=categoryId:9355,Color:%7BWhite%7CBlack%7D,
Storage%20Capacity:%128GB%7C256GB%7D


Note: You cannot use the aspect_filter parameter in the same call with either the gtin parameter or the mpn parameter.

Occurrence: Optional

category_idsarray of string Important: Currently, only the first category_id value is accepted.

One or more comma-separated category identifiers for narrowing down the collection of products returned by this call.

Note: This parameter requires a valid category ID value. You can use the Taxonomy API's getCategorySuggestions call to retrieve appropriate category IDs for your product based on keywords.

The syntax for this parameter is as follows:

category_ids=category_id1,category_id2,...

Here is an example of a call with the category_ids parameter:

GET https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?
category_ids=178893


Note: Although all query parameters are optional, this call must include at least the q parameter, or the category_ids, gtin, or mpn parameter with a valid value.

If you provide only the category_ids parameter, you cannot specify a top-level (L1) category.

Occurrence: Optional

mpnarray of stringA string consisting of one or more comma-separated Manufacturer Part Numbers (MPNs) that identify products to search for. This call will return all products that have one of the specified MPNs.

MPNs are defined by manufacturers for their own products, and are therefore certain to be unique only within a given brand. However, many MPNs do turn out to be globally unique.

Note: Although all query parameters are optional, this call must include at least the q parameter, or the category_ids, gtin, or mpn parameter with a valid value.

You cannot use the mpn parameter in the same call with either the q parameter or the aspect_filter parameter.

Occurrence: Optional

gtinarray of stringA string consisting of one or more comma-separated Global Trade Item Numbers (GTINs) that identify products to search for. Currently the GTIN values can include EAN, ISBN, and UPC identifier types.

Note: Although all query parameters are optional, this call must include at least the q parameter, or the category_ids, gtin, or mpn parameter with a valid value.

You cannot use the gtin parameter in the same call with either the q parameter or the aspect_filter parameter.

Occurrence: Optional

qstringA string consisting of one or more keywords to use to search for products in the eBay catalog.

Note: This call searches the following product record fields: title, description, brand, and aspects.localizedName, which do not include product IDs. Wildcard characters (e.g. *) are not allowed.

The keywords are handled as follows:
  • If the keywords are separated by a comma (e.g. iPhone,256GB), the query returns products that have iPhone AND 256GB.
  • If the keywords are separated by a space (e.g. "iPhone ipad" or "iPhone, ipad"), the query ignores any commas and returns products that have iPhone OR iPad.
Note: Although all query parameters are optional, this call must include at least the q parameter, or the category_ids, gtin, or mpn parameter with a valid value.

You cannot use the q parameter in the same call with either the gtin parameter or the mpn parameter.

Occurrence: Optional

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

This call also uses the X-EBAY-C-MARKETPLACE-ID header to identify the user's business context. This header is currently limited to EBAY-US, EBAY-AU, EBAY-CA, and EBAY-GB values. If not included with your request, the marketplace value defaults to EBAY-US. Note that it does not indicate a language preference or end-user location.

Examples:
X-EBAY-C-MARKETPLACE-ID: EBAY-US
X-EBAY-C-MARKETPLACE-ID: EBAY-AU

OAuth scope

This request requires an access token created with the authorization code grant flow, using one scope from the following list:

https://api.ebay.com/oauth/api_scope/sell.inventory

https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly

See OAuth access tokens for more information.

Note: Only the sell.inventory scope is required for selling applications, and only the commerce.catalog.readonly scope is required for buying applications.

Output

HTTP response headers

Output container/fieldTypeDescription
hrefstringThis field is reserved for internal or future use.

Occurrence: NA

limitintegerThe number of product summaries returned in the response. This is the result set, a subset of the full collection of products that match the search or filter criteria of this call. If the limit query parameter was included in the request, this field will have the same value.

Default: 50

Occurrence: Always

nextstringThis field is reserved for internal or future use.

Occurrence: NA

offsetintegerThis field is reserved for internal or future use.

Occurrence: NA

prevstringThis field is reserved for internal or future use.

Occurrence: NA

productSummariesarray of ProductSummaryReturned if the fieldGroups query parameter was omitted from the request, or if it was included with a value of MATCHING_PRODUCTS or FULL. This container provides an array of product summaries in the current result set for products that match the combination of the q, category_ids, and aspect_filter parameters that were provided in the request. Each product summary includes information about the product's identifiers, product images, aspects, the product page URL, and the getProduct URL for retrieving the product details.

Occurrence: Conditional

productSummaries.additionalImagesarray of ImageContains information about additional images associated with this product. For the primary image, see the image container.

Occurrence: Conditional

productSummaries.additionalImages.heightintegerThe height of the image in pixels.

Occurrence: Conditional

productSummaries.additionalImages.imageUrlstringThe eBay Picture Services (EPS) URL of the image.

Occurrence: Always

productSummaries.additionalImages.widthintegerThe width of the image in pixels.

Occurrence: Conditional

productSummaries.aspectsarray of AspectContains an array of the category aspects and their values that are associated with this product.

Occurrence: Conditional

productSummaries.aspects.localizedNamestringThe localized name of this category aspect.

Occurrence: Conditional

productSummaries.aspects.localizedValuesarray of stringA list of the localized values of this category aspect.

Occurrence: Conditional

productSummaries.brandstringThe manufacturer's brand name for this product.

Occurrence: Conditional

productSummaries.eanarray of stringA list of all European Article Numbers (EANs) that identify this product.

Occurrence: Conditional

productSummaries.epidstringThe eBay product ID of this product.

Occurrence: Always

productSummaries.gtinarray of stringA list of all GTINs that identify this product. This includes all of the values returned in the ean, isbn, and upc fields.

Occurrence: Conditional

productSummaries.imageImageContains information about the primary image of this product. For more images of this product, see the additionalImages container.

Occurrence: Always

productSummaries.image.heightintegerThe height of the image in pixels.

Occurrence: Conditional

productSummaries.image.imageUrlstringThe eBay Picture Services (EPS) URL of the image.

Occurrence: Always

productSummaries.image.widthintegerThe width of the image in pixels.

Occurrence: Conditional

productSummaries.isbnarray of stringA list of all International Standard Book Numbers (ISBNs) that identify this product.

Occurrence: Conditional

productSummaries.mpnarray of stringA list of all Manufacturer Product Number (MPN) values that the manufacturer uses to identify this product.

Occurrence: Conditional

productSummaries.productHrefstringThe URI of the getProduct call request that retrieves this product's details.

Occurrence: Always

productSummaries.productWebUrlstringThe URL for this product's eBay product page.

Occurrence: Conditional

productSummaries.titlestringThe title of this product on eBay.

Occurrence: Always

productSummaries.upcarray of stringA list of Universal Product Codes (UPCs) that identify this product.

Occurrence: Conditional

refinementRefinementReturned only if the fieldGroups query parameter was included in the request with a value of ASPECT_REFINEMENTS or FULL.

An aspect is a property of a category, used by sellers to provide details about the items they're listing. For example, the Cell Phones & Smartphones category (#9355) includes a Storage Capacity aspect.

This container provides information about the distribution of values of a set of category aspects. The category aspects are those associated with the category that eBay determines is most likely to cover the products that match the search criteria.

Occurrence: Conditional

refinement.aspectDistributionsarray of AspectDistributionContains information about one or more aspects that are associated with the category identified by dominantCategoryId.

Occurrence: Conditional

refinement.aspectDistributions.aspectValueDistributionsarray of AspectValueDistributionContains information about one or more values of the category aspect identified by localizedAspectName.

Occurrence: Conditional

refinement.aspectDistributions.aspectValueDistributions.localizedAspectValuestringThe localized value of the category aspect identified by refinement.aspectDistributions.localizedAspectName.

Occurrence: Conditional

refinement.aspectDistributions.aspectValueDistributions.matchCountintegerThe number of times the value of localizedAspectValue has been used for eBay product listings. By comparing this quantity to the matchCount for other values of the same aspect, you can present a histogram of the values to sellers, who can use that information to select which aspect value is most appropriate for their product. You can then include the user-selected value in the the search call's aspect_filter parameter to refine your search.

Occurrence: Conditional

refinement.aspectDistributions.aspectValueDistributions.refinementHrefstringA HATEOAS reference that further refines the search with this particular localizedAspectValue.

Occurrence: Conditional

refinement.aspectDistributions.localizedAspectNamestringThe localized name of an aspect that is associated with the category identified by dominantCategoryId.

Occurrence: Conditional

refinement.dominantCategoryIdstringThe ID of the category that eBay determines is most likely to cover the products matching the search criteria.

Occurrence: Conditional

totalintegerThis field is reserved for internal or future use.

Occurrence: NA

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200Success
204No Content
400Bad Request
403Forbidden
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
75000API_CATALOGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
75001API_CATALOGREQUESTThe call must have a valid 'q', or 'category_ids' or 'gtin' or 'mpn' query parameter.
75004API_CATALOGREQUESTThe 'limit' value should be between 1 and 200 (inclusive).
75006API_CATALOGREQUESTTop level category browsing is not allowed. Please provide keywords or more filters for the applied top level category.
75007API_CATALOGREQUESTCurrently, the {marketplaceId} marketplace is not supported. The supported Marketplaces are: {allowedMarketplaces} .
75008API_CATALOGREQUESTThe 'fieldgroups' value {fieldgroups} is invalid. The supported fieldgroups are: {supportedFieldgroups}
75012API_CATALOGREQUESTThe aspect_filter format is invalid. For more information, see the API call reference documentation.
75013API_CATALOGREQUESTThe 'aspect_filter' query parameter must include a categoryId. For more information, see the API call reference documentation.
75014API_CATALOGREQUESTThe categoryId in 'aspect_filter' query parameter is invalid. For more information, see the API call reference documentation.
75015API_CATALOGREQUESTInsufficient permissions to fulfill the request.
75017API_CATALOGREQUESTThe specified GTIN value is invalid.
75018API_CATALOGREQUESTThe call must be made with either 'q' or 'gtin/mpn'.
75019API_CATALOGREQUESTThe call with 'gtin/mpn' cannot be made with aspect_filter.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Search for Products by Keyword

This sample returns a set of eBay products that match the keyword.

Input

The inputs are the query parameters q, which is the keyword, and limit. There is no payload with this request.
GET
https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?q=drone&limit=3

Output

If the call is successful, 3 product summaries will be returned in the result set.

Sample 2: Search for Products by Category

This sample returns a set of eBay products in the Cell Phones & Smartphones category.

Input

The input is the category_ids query parameter. There is no payload with this request.
GET
https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?category_ids=9355&limit=3

Output

If the call is successful, 3 product summaries will be returned in the result set.

Sample 3: Search for Aspect Refinements Based on a Keyword

This call searches the catalog for the iphone keyword. Based on the results of that search, it returns the aspect refinements for the dominant category (Cell Phones & Smartphones) of products that contain the keyword.

Input

The input is the category_ids query parameter. There is no payload with this request.
GET
https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?q=iphone&fieldgroups=ASPECT_REFINEMENTS

Output

If the call is successful, all aspects that apply to the dominant category of the products identified by the keyword will be returned in the result set, with counts of all values of those aspects that have been used.

Sample 4: Search for Products Based on a Keyword and Filtered by Aspect

This call searches the catalog for the iphone keyword, and filters the results for the Color aspect value of Black.

Input

The inputs are the query parameters q, which is the keyword, aspect_filter, fieldgroups, and limit. There is no payload with this request.
GET
https://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?q=iphone&aspect_filter=categoryId%3A9355%2CColor%3A%7BBlack%7D&fieldgroups=MATCHING_PRODUCTS&limit=3

Output

If the call is successful, 3 iPhone product summaries in the color Black will be returned in the result set.

Sample 5: Search for Products Based on a GTIN

This call searches the catalog for the gtin value of 0813917020203. Based on the results of that search, it returns all product summaries of the product identified by the provided GTIN.

Input

The input is the gtin query parameter. There is no payload with this request.
GET
http://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?gtin=0813917020203

Output

If the call is successful, the product summaries for the item identified by the specified GTIN (NEST thermostat model T3017US) will be returned in the result set.

Sample 6: Search for Products Based on an MPN

This call searches the catalog for the mpn value of 3710RW. Based on the results of that search, it returns all product summaries of the product identified by the provided MPN.

Input

The input is the mpn query parameter. There is no payload with this request.
GET
http://api.ebay.com/commerce/catalog/v1_beta/product_summary/search?mpn=3710RW

Output

If the call is successful, the product summaries for the item identified by the specified MPN (Roku media streamer model 3710RW) will be returned in the result set.