---
title: Marketing API
description: "The Marketing API is part of the eBay Buy APIs. It retrieves eBay products based on a metric, such as Best Selling. This API helps shoppers compare products and motivate them to purchase items. You can use the other [Buy APIs](/api-docs/buy/static/buy-overview.html) to create a buying application that lets users, eBay members or guests, buy from eBay sellers without visiting the eBay site. The Buy APIs provide the opportunity to purchase eBay items in your app or website. This API uses the following resources: * **merchandised\\_product** - retrieves eBay products for a specific metric, such as Best Selling. * **most\\_watched\\_items** - retrieves items with the highest watch counts in a category. * **similar\\_items** - retrieves recommended similar items for a specified item."
api_version: 1.0
api_name: buy_marketing_api
api_type: REST
api_group: buy/buy_marketing_api
source_url:
  html: https://developer.ebay.com/develop/api/buy/buy_marketing_api
  md: https://developer.ebay.com/develop/api/buy/buy_marketing_api.md
---

# Marketing API API

The Marketing API is part of the eBay Buy APIs. It retrieves eBay products based on a metric, such as Best Selling. This API helps shoppers compare products and motivate them to purchase items. You can use the other [Buy APIs](/api-docs/buy/static/buy-overview.html) to create a buying application that lets users, eBay members or guests, buy from eBay sellers without visiting the eBay site. The Buy APIs provide the opportunity to purchase eBay items in your app or website.  
  
This API uses the following resources:

*   **merchandised\_product** - retrieves eBay products for a specific metric, such as Best Selling.
*   **most\_watched\_items** - retrieves items with the highest watch counts in a category.
*   **similar\_items** - retrieves recommended similar items for a specified item.

## API Methods

The following API methods are available:

### getMerchandisedProducts

#### GET /merchandised_product
**Description:** This method returns an array of products based on the category and metric specified. This includes details of the product, such as the eBay product ID (EPID), title, and user reviews and ratings for the product. You can use the `epid` returned by this method in the **Browse API** **search** method to retrieve items for this product.

### **Restrictions**

*   To test **getMerchandisedProducts** in Sandbox, you must use category ID 9355 and the response will be mock data.
*   For a list of supported sites and other restrictions, see [Buy API Support by Marketplace](/api-docs/buy/static/ref-marketplace-supported.html).
**Parameters:**
- **aspect_filter** (string)
  - This value specifies the aspect name/value pairs used to refine product results. For example, the following would specify the brand to be returned:  

/buy/marketing/v1\_beta/merchandised\_product?category\_id=31388&metric\_name=BEST\_SELLING&aspect\_filter=Brand:Canon

You can also filter by multiple aspects using a comma-delimited list such as the following:  

/buy/marketing/v1\_beta/merchandised\_product?category\_id=31388&metric\_name=BEST\_SELLING&aspect\_filter=Color:Black,Brand:Nikon

This returns products that match both filters.  
  
**Note**: Multiple values for the same aspect filter are _not_ supported. For example, if you specify multiple values for the same aspect, only the last value will be used by the API. In the following example, only the last brand specified (Nikon) will be returned:  

/buy/marketing/v1\_beta/merchandised\_product?category\_id=31388&metric\_name=BEST\_SELLING&aspect\_filter=Brand:Canon,Brand:Nikon

To retrieve products for multiple values of the same aspect, make separate API calls for each filter value.  
You can use the **Browse API's** [search](/develop/api/buy/browse_api#buy-browse_api-item_summary-search) method with the `fieldgroups=ASPECT_REFINEMENTS` field to return the aspects of a product.
- **category_id** (string) *required*
  - This query parameter limits the products returned to a specific eBay category.  
  
The list of eBay category IDs is not published and category IDs are not all the same across all the eBay marketplace. You can use the following techniques to find a category by site:

*   Use the [Category Changes page](https://pages.ebay.com/sellerinformation/news/categorychanges.html).
*   Use the **Taxonomy API**. For details see [Get Categories for Buy APIs](/api-docs/buy/buy-categories.html).
*   Use the **Browse API** and submit the following method to get the **dominantCategoryId** for an item.  
    
    /buy/browse/v1/item\_summary/search?q=_keyword_&fieldgroups=ASPECT\_REFINEMENTS  
    

**Maximum:** 1  
  
**Required:** 1
- **limit** (string)
  - This value specifies the maximum number of products to return in a result set.  
  
**Note:** Maximum value means the method will return up _to_ that many products per set, but it can be less than this value. If the number of products found is less than this value, the method will return all of the products matching the criteria.  
**Default:** 8  
  
**Maximum:** 100
- **metric_name** (string) *required*
  - This value filters the result set by the specified metric. Only products in this metric are returned.  
  
**Note:** Currently, the only metric supported is `BEST_SELLING`.  
**Default:** `BEST_SELLING`  
  
**Maximum:** 1  
  
**Required:** 1

### getMostWatchedItems

#### GET /most_watched_items
**Description:** This method retrieves items with the highest watch counts in a specific category.  
  
The leaf category for which to retrieve items with the highest watch counts is specified by its **category\_id** value. Up to 50 items can be returned for a specific category using this method. The number of items to return using this method can be specified through the **max\_result** query parameter. If this parameter is not used, the top 20 most watched items will be returned for the specified category.  
  
A successful call returns details about the most watched items in a specific category, such as the watch count, current price, shipping cost, and basic information about the listing. Returned items are ranked in descending order with the highest watch count appearing first.
**Parameters:**
- **Accept-Language** (string)
  - This header is used to indicate the natural language and locale preferred by the user for the response.  
  
This header is required when targeting a specific locale of a marketplace that supports multiple locales. For example:

*   When targeting the French locale of the Belgium marketplace, it is required to pass in `fr-BE` to specify this. If this locale is not specified, the language will default to Dutch.
*   When targeting the French locale of the Canadian marketplace, it is required to pass in `fr-CA` to specify this. If this locale is not specified, the language will default to English.
- **category_id** (string) *required*
  - This query parameter can be used to specify the leaf category from which to retrieve most watched items.  
  
The list of eBay category IDs is not published and category IDs are not all the same across all the eBay marketplaces. You can use the following techniques to find a category by site:

*   Use the [Category Changes](https://pages.ebay.com/sellerinformation/news/categorychanges.html) page.
*   Use the **Taxonomy API**. For details on using this API, see [Get Categories for Buy APIs](/api-docs/buy/buy-categories.html).
*   Use the following **Browse API** method to get the **dominantCategoryId** for an item:
    
    /buy/browse/v1/item\_summary/search?q= _keyword_&fieldgroups=ASPECT\_REFINEMENTS
    

**Note:** If no category ID is input though this parameter, category `9355` will be used by default.  
**Maximum:** 1
- **max_results** (string)
  - This query parameter can be used to specify the maximum number of most watched items to return from the specified category.  
  
**Default value:** 20  
  
**Min value:** 1  
  
**Max value:** 50
- **X-EBAY-C-ENDUSERCTX** (string)
  - This header can be used to pass in affiliate credentials to return item affiliate information. For more information, see [Header for affiliate information.](/api-docs/buy/static/api-browse.html#affiliate-header)
- **X-EBAY-C-MARKETPLACE-ID** (string)
  - This header identifies the seller's eBay marketplace. It is required for all marketplaces outside of the US.  
  
**Note:** If the marketplace ID value is invalid or missing, the default value of `EBAY_US` is used.  
See [MarketplaceIdEnum](/develop/api/buy/buy_marketing_api/most_watched_items/getmostwatcheditems#buy-buy_marketing_api-most_watched_items-getmostwatcheditems.marketplaceidenum) for a list of supported marketplaces.  
  
**Default:** `EBAY_US`

### getSimilarItems

#### GET /similar_items
**Description:** This method retrieves items that are similar to the specified item.  
  
Items are considered _similar_ if they can serve as a replacement or alternative for the specified item. Similar items from a catalog are associated with the same product. For items not associated with a product, similarity is determined by keywords in the title and attribute value matches.  
  
The item for which to retrieve similar items is specified by its **item\_id** value, input as a required query parameter. A successful call returns a list of items similar to the specified item, as well as details about each item. This includes the current price and shipping costs are returned for each item, as well as basic information about the listing, such as its item ID, price, shipping cost, and time left on the listing.
**Parameters:**
- **Accept-Language** (string)
  - This header is used to indicate the natural language and locale preferred by the user for the response.  
  
This header is required when targeting a specific locale of a marketplace that supports multiple locales. For example:

*   When targeting the French locale of the Belgium marketplace, it is required to pass in `fr-BE` to specify this. If this locale is not specified, the language will default to Dutch.
*   When targeting the French locale of the Canadian marketplace, it is required to pass in `fr-CA` to specify this. If this locale is not specified, the language will default to English.
- **buying_option** (string)
  - This query parameter can be used to filter the result set based on the item's buying option type.  
  
**Valid Values:**

*   `FIXED_PRICE`
*   `AUCTION`
*   `BEST_OFFER`
*   `CLASSIFIED_AD`
- **excluded_category_ids** (string)
  - This query parameter can be used to specify categories to exclude from the result set.  
  
Because the list of eBay category IDs is not published and category IDs are not the same across all eBay marketplaces, category IDs may be determined by:

*   Visiting the [Category Changes page](<https://pages.ebay.com/sellerinformation/news/categorychanges.html >)
*   Using the **Taxonomy API**. Refer to [Get Categories for Buy APIs](/api-docs/buy/buy-categories.html) for complete information.
*   Issuing the following call to retrieve the `dominantCategoryId` for an item:
    
    /buy/browse/v1/item\_summary/search?q= _keyword_&fieldgroups=ASPECT\_REFINEMENTS
    

  
Up to three categories to be excluded can be specified through this parameter.
- **filter** (string)
  - An array of field filters that can be used to limit/customize the result set.  
  
Currently, only `itemEndDate` is supported. This filter limits the result set to include only items scheduled to end before the specified date and time. For example,

filter=itemEndDate:\[..2025-12-14T07:47:48Z\]
- **item_id** (string) *required*
  - This query parameter specifies the unique identifier of the item for which to retrieve similar items.  
  
**Note:** For this method, this item ID value should be input in the legacy format (`1*********2`), rather than the RESTful format (`v1|2**********2|0`).  
**Item ID format:**

https://api.ebay.com/buy/marketing/v1/similar\_items?item\_id=1\*\*\*\*\*\*\*\*2
- **max_results** (string)
  - This query parameter can be used to specify the max number of items to display from the result set.  
  
**Default:** 20  
  
**Max value:** 50
- **X-EBAY-C-ENDUSERCTX** (string)
  - This header can be used to pass in affiliate credentials to return item affiliate information. For more information, see [Header for affiliate information.](/api-docs/buy/static/api-browse.html#affiliate-header)
- **X-EBAY-C-MARKETPLACE-ID** (string)
  - This header identifies the seller's eBay marketplace. It is required for all marketplaces outside of the US.  
  
**Note:** If the marketplace ID value is invalid or missing, the default value of `EBAY_US` is used.  
See [MarketplaceIdEnum](/develop/api/buy/buy_marketing_api/similar_items/getsimilaritems#buy-buy_marketing_api-similar_items-getsimilaritems.marketplaceidenum) for a list of supported marketplaces.  
  
**Default:** `EBAY_US`

## Error Codes

The following error codes may be returned by this API:

### REQUEST Errors

#### 70001 - API_MARKETING
**Description:** A metric\_name is required to make the API call.

#### 70002 - API_MARKETING
**Description:** The metric\_name {metric\_name} is invalid.

#### 70003 - API_MARKETING
**Description:** A categoryId is required to make the API call.

#### 70004 - API_MARKETING
**Description:** The category id {categoryId} is invalid.

#### 70005 - API_MARKETING
**Description:** The 'limit' value should be between 1 and 100 (inclusive).

#### 70006 - API_MARKETING
**Description:** The 'limit' value must be an integer value.

#### 70100 - API_MARKETING
**Description:** The 'max\_results' value must be a positive integer from 1 up to 50.

#### 12600 - API_MARKETING
**Description:** There is one or more issues with the 'excluded\_category\_ids' filter. Please see documentation for correct syntax and make sure you are using a valid category ID for the marketplace.

#### 12601 - API_MARKETING
**Description:** The 'excluded\_category\_ids' field has exceeded the maximum limit of 3 category IDs.

#### 12602 - API_MARKETING
**Description:** The specified buying option is invalid. Please see documentation for supported values.

#### 12603 - API_MARKETING
**Description:** There is an issue with the 'itemEndDate' filter. Please see documentation for details on proper syntax of this filter and the date range constraints.

#### 12604 - API_MARKETING
**Description:** The 'max\_results' value must be a positive integer from 1 up to 50.

#### 12605 - API_MARKETING
**Description:** The required 'item\_id' parameter is either missing or has an invalid value. Please include this parameter and use a supported value.

### BUSINESS Errors

#### 70007 - API_MARKETING
**Description:** The marketplace value {marketplace} is not supported. The supported values are: {marketplaces}.

### APPLICATION Errors

#### 70000 - API_MARKETING
**Description:** There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.

#### 12000 - API_MARKETING
**Description:** There was a problem with an eBay internal system or process. Contact eBay developer support for assistance.

## Rate Limits

See [API Call Limits](https://developer.ebay.com/develop/get-started/api-call-limits) on the eBay Developer Program.

## Resources

### Documentation

- [eBay Developer Program](https://developer.ebay.com/)
- [API Documentation](https://developer.ebay.com/develop/api/)
- [SDKs and Widgets](https://developer.ebay.com/develop/sdks-and-widgets)
- [Developer Community Forum](https://community.ebay.com/t5/Developer-Groups/ct-p/developergroup)

### Tools

- [API Explorer](https://developer.ebay.com/my/api_test_tool)
- [GraphQL Explorer](https://developer.ebay.com/my/graphql_explorer)

### Support

- [Developer Support](https://developer.ebay.com/support/)
- [API Status](https://developer.ebay.com/support/api-status)
- [Release Notes](https://developer.ebay.com/develop/api/release_notes/)

---
*Generated on 2026-08-11T18:20:57.203Z*