canonical: https://jentic.com/apis/ebay.com/buy-marketing

# Ebay Buy Marketing API

The eBay Buy Marketing API surfaces merchandised eBay products by metric - currently best-selling - so applications can recommend products that are actually moving on eBay rather than guessing from search ranking. Each merchandised product entry includes the listing reference, image, and price snapshot, ready for use in price-comparison sites, deal aggregators, and AI shopping agents. The single GET /merchandised_product endpoint accepts a category_id and metric_name and returns a ranked list, making the API simple to integrate as a discovery layer on top of the larger Browse API.

## For AI agents

Retrieve best-selling and merchandised eBay products by category for recommendations, deal feeds, and shopping agents. One endpoint, ranked by metric.

## Scope

Does not handle item search, full listing detail, or seller-side merchandising - use for retrieving ranked best-seller product lists by category only.

## Capabilities

- Retrieve best-selling eBay products for a given category to populate recommendation widgets
- Surface merchandised products with image, title, and price snapshot for price-comparison feeds
- Filter merchandised results by aspect (e.g., brand, model) to narrow to a product subset
- Drive shopping-agent suggestions with listings eBay actively merchandises rather than search ranking
- Power deal-of-the-day feeds with category-level best-seller rotations

## Use cases

### Best-seller widget for an affiliate site

Affiliate publishers call /merchandised_product with metric_name=BEST_SELLING and a leaf category_id to pull the top eBay best-sellers for that category, refreshing the widget once per hour. Each entry already includes the EPID, image URL, and current price, so the widget renders without a second Browse API roundtrip.

Example prompt: Call /merchandised_product with category_id=9355 and metric_name=BEST_SELLING and emit the top 10 entries as an HTML widget

### Shopping-agent product suggestions

An AI shopping assistant uses Buy Marketing to suggest gifts under a user budget. The agent calls /merchandised_product for the relevant leaf category, filters by aspect_filter (e.g., brand), and returns the ranked list. Because eBay's merchandising signal is based on actual sales velocity, suggestions land closer to what shoppers are buying than raw search ranking.

Example prompt: Get best-selling items in category 11450, filter to brand=Nike, and return the top 5 with title and price

### Deal-of-the-day rotation

Deal-aggregator sites use Buy Marketing as a category rotation source - each day a different leaf category's best-sellers headline the homepage. The single endpoint replaces multiple Browse search calls and keeps the rotation aligned with eBay's own merchandising rather than third-party trend signals.

Example prompt: Pick a random leaf category each day, fetch /merchandised_product, and publish the top 20 entries to the homepage

### AI agent integration via Jentic

An AI shopping agent queries Jentic with 'find best selling eBay products in a category' and Jentic returns the /merchandised_product operation along with its required parameters (category_id, metric_name). The agent loads the schema, executes the call with an OAuth Application access token issued through Jentic's vault, and returns ranked product cards to the user.

Example prompt: Use Jentic to search 'find best selling eBay products', load /merchandised_product, and execute it for category_id 9355

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /merchandised_product | Get ranked merchandised products for a category and metric (e.g., BEST_SELLING) |

## Key resources

- **merchandised_product** — Returns ranked best-selling or merchandised products for a category and metric

## Why Jentic

- **Setup:** Wiring the eBay Buy Marketing API by hand means running the OAuth 2.0 client-credentials flow for the buy.marketing scope, caching the application token, and setting the category and metric parameters on each call. Through Jentic you install once, import the Buy Marketing API from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** The Buy Marketing API selects best-seller lists through query parameters like category_id and metric_name rather than URL path segments, and it exposes a single merchandised-product operation, so scope your agent to that read. Nothing beyond retrieving ranked product lists is available unless the API adds it.
- **Credential handling:** Your eBay OAuth client credentials are stored once, encrypted, by your own Jentic One instance, which exchanges them for a scoped token and injects it at execution time. The raw client secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find best selling products on eBay', and Jentic returns the /merchandised_product operation with its category_id and metric_name parameters so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **eBay Browse API** — Browse API returns full item detail; pair with Buy Marketing to expand a best-seller into a buyable item.
- **eBay Item Feed Service** — Item Feed Service downloads bulk catalogue files; Buy Marketing surfaces ranked products from the live catalogue.
- **eBay Sell Recommendation API** — Sell Recommendation gives sellers per-listing optimisation tips; Buy Marketing gives buyers ranked products.

## FAQ

### What authentication does the Buy Marketing API use?

The Buy Marketing API uses OAuth 2.0 with the Client_Credentials grant - an Application access token, not a User token. Through Jentic, the OAuth client secret sits in your Jentic One instance and the agent receives a scoped access token only for the buy.marketing scope.

### Can I get best-selling products across all categories at once with the Buy Marketing API?

No. /merchandised_product requires a leaf category_id - you cannot pass a root category and get a global best-seller list. To build a cross-category leaderboard, call the endpoint per leaf category and merge the results client-side.

### What are the rate limits for the Buy Marketing API?

Buy Marketing falls under eBay's Buy APIs application-level rate limits, which are issued per partner application rather than published as a fixed public number. The Developer Analytics API exposes the live remaining quota for every Buy resource - query it to see the exact limit attached to your keyset.

### How do I retrieve the top-selling products in a category through Jentic?

Search Jentic for 'find best selling eBay products in a category', load the /merchandised_product operation schema, and execute it with a category_id and metric_name=BEST_SELLING. Install with pip install jentic. Get started with Jentic One, the self-hosted execution layer.

### Is the Buy Marketing API free?

There is no per-call fee for production use, but the API is part of the Buy API family which requires application-level approval through eBay's developer programme. Sandbox access is available immediately on developer.ebay.com.

### What metrics are supported by /merchandised_product?

The currently supported metric is BEST_SELLING. eBay reserves the metric_name parameter as an enum so additional merchandising signals can be added without breaking existing clients.

### Can I limit what my agent is allowed to do with the eBay Buy Marketing API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials your agent may use. The Buy Marketing API exposes a single read-only operation, GET /merchandised_product, which selects best-seller lists through query parameters like category_id and metric_name rather than URL path segments, so you can scope your agent to just that ranked-product read. Retrieving ranked product lists is the only thing this API does, and your stored eBay OAuth credentials are exchanged for a scoped token and injected only at execution time.
