# CeX (WeBuy) API — the second-hand games, phones, computing and electronics chain across nine countries: search a million products with all THREE prices (what you pay, what CeX pays you in cash, what CeX pays you as a trade-in voucher), read the full product, and see live per-store stock across the physical shop network. No account, no browser.

> Search the CeX catalogue of one country. Every row carries the three prices side by side — the selling price, the cash price CeX pays you and the trade-in voucher price — plus the grade, the condition, online stock, the list of shops that hold the item and live facet counts. Filter by category, department, product line, brand, condition, grade, shop, stock and price; sort by price, name, rating or popularity. Give at least `query`, `category`, `supercategory`, `product_line`, `brand` or `store`.
> ReefAPI engine `cex` · 5 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/cex/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/cex/v1/search — 1 credit
Search the CeX catalogue of one country. Every row carries the three prices side by side — the selling price, the cash price CeX pays you and the trade-in voucher price — plus the grade, the condition, online stock, the list of shops that hold the item and live facet counts. Filter by category, department, product line, brand, condition, grade, shop, stock and price; sort by price, name, rating or popularity. Give at least `query`, `category`, `supercategory`, `product_line`, `brand` or `store`.

**Parameters:**
- `query` (string, optional) — Free-text search, exactly as typed into the CeX search box. Leave empty to browse a category or a store with the filters below.
- `country` (enum, optional, default "uk") — Which CeX storefront to read. Prices and stock are per country and the currency is read from that storefront's own settings. [one of: au, es, ie, in, it, mx, pl, pt, uk]
- `category` (string, optional) — CeX category name as the site prints it (the `category` field of any search row; `taxonomy` lists them with live counts).
- `supercategory` (string, optional) — Top-level department: Gaming, Phones, Computing, Electronics, Film & TV, New Accessories, Apparel.
- `product_line` (string, optional) — CeX product line inside a department (`taxonomy` lists them).
- `brand` (string, optional) — Manufacturer as the catalogue spells it (Apple, Samsung, Sony…).
- `condition` (string, optional) — CeX packaging condition. This is NOT the A/B/C grade — that is `grade`. [one of: Boxed, Unboxed, Mint, Discounted]
- `grade` (string, optional) — CeX cosmetic grade. Each grade is its own product with its own three prices. [one of: A, B, C]
- `store` (string, optional) — Limit to items the catalogue lists as held by one named store (use the `name` from the `stores` action). Per-store quantity comes from `store_stock`.
- `availability` (enum, optional) — Restrict to items CeX currently has in stock. [one of: online, store, any]
- `price_min` (number, optional) — Lowest selling price (what you pay), in the storefront's currency.
- `price_max` (number, optional) — Highest selling price (what you pay), in the storefront's currency.
- `sort` (enum, optional, default "relevance") — Sort order, using CeX's own sorted indexes. [one of: relevance, price_asc, price_desc, name_asc, name_desc, rating, popularity]
- `page` (integer, optional, default 1) — 1-based page. CeX caps paging at 1000 items per query (page x page_size <= 1000) however large `total` is.
- `page_size` (integer, optional, default 24) — Rows per page, 1-100.

**Returns:** results[]{box_id, title, url, currency, price_sell (what you pay), price_cash (what CeX pays you in cash), price_exchange (what CeX pays you as a voucher), previous_price_sell, first_price_sell, price_reduced, cash_percent_of_sell, exchange_percent_of_sell, sells_this_item, buys_this_item, category, category_id, product_lines[], supercategory, brand, condition, grade, rating, image, images{small, medium, large}, in_stock_online, stock_online, in_stock_in_store, store_count, stores[], out_of_stock_stores[], out_of_stock_store_count, collection_stores[], collection_quantity, availability[], is_new_item, discontinued, price_last_changed, master_box_id, attributes{…per-category}, country}, count, total, total_unfiltered, page, page_size, has_more, pagination_cap, facets{category, product_line, supercategory, brand, condition, grade}, filters_applied, currency, country, query

**Example request body:**
```json
{
  "query": "ps5",
  "country": "uk"
}
```

### POST https://api.reefapi.com/cex/v1/product — 1 credit
One CeX product in full: the three prices (selling, cash and voucher) with the previous and launch selling price and when the price last changed, whether CeX currently sells and buys it, the grade and condition, the full description, every image, online and collection stock, the variant group and all of the product's own attributes.

**Parameters:**
- `box_id` (string, required) — CeX product id — the `box_id` on every search row, or a pasted product URL (…/product-detail?id=SAPPI13128GPUNLB).
- `country` (enum, optional, default "uk") — Which CeX storefront to read. Prices and stock are per country and the currency is read from that storefront's own settings. [one of: au, es, ie, in, it, mx, pl, pt, uk]

**Returns:** product{box_id, title, url, currency, price_sell, price_cash, price_exchange, previous_price_sell, first_price_sell, price_last_changed, sells_this_item, buys_this_item, cannot_buy, is_new_item, grade, condition, category, category_id, supercategory, supercategory_id, rating, rating_text, description, images{small, medium, large}, image_names[], stock_online, collection_quantity, out_of_stock, variant_group, variant_value, is_master_box, attributes[]{name, value, attribute_id, is_variant}, displayed_attributes[]{name, value}, country}

**Example request body:**
```json
{
  "box_id": "SAPPI13128GPUNLB"
}
```

### POST https://api.reefapi.com/cex/v1/store_stock — 1 credit
Live per-shop stock for one product across the whole CeX store network: every shop that holds it, how many units are on hand, the quantity reserved for click-and-collect and whether collection is available there. This is the chain's physical inventory, not an online availability flag.

**Parameters:**
- `box_id` (string, required) — CeX product id — the `box_id` on every search row, or a pasted product URL (…/product-detail?id=SAPPI13128GPUNLB).
- `country` (enum, optional, default "uk") — Which CeX storefront to read. Prices and stock are per country and the currency is read from that storefront's own settings. [one of: au, es, ie, in, it, mx, pl, pt, uk]

**Returns:** stock[]{store_id, store_name, quantity_on_hand, collection_quantity, available_for_collection}, count, total_quantity, stores_with_stock, box_id, country, note (only when no shop holds the item)

**Example request body:**
```json
{
  "box_id": "SAPPI13128GPUNLB"
}
```

### POST https://api.reefapi.com/cex/v1/stores — 1 credit
The CeX shop network of one country: every shop with its id, name, region, phone number, coordinates and today's closing time. With `store_id`, one shop with its full weekly opening and break hours instead.

**Parameters:**
- `country` (enum, optional, default "uk") — Which CeX storefront to read. Prices and stock are per country and the currency is read from that storefront's own settings. [one of: au, es, ie, in, it, mx, pl, pt, uk]
- `store_id` (integer, optional) — Return one store with its weekly opening hours instead of the whole network.

**Returns:** stores[]{store_id, name, region, phone, latitude, longitude, closing_time_today, country}, count, country — or store{…, opening_hours{open{monday…}, close{monday…}}, break_hours} for one store_id

**Example request body:**
```json
{
  "country": "uk"
}
```

### POST https://api.reefapi.com/cex/v1/taxonomy — 1 credit
The CeX browse tree of one country — the seven departments and their product lines — together with live category and product-line counts taken from the search index, so each name can be pasted straight into `search`.

**Parameters:**
- `country` (enum, optional, default "uk") — Which CeX storefront to read. Prices and stock are per country and the currency is read from that storefront's own settings. [one of: au, es, ie, in, it, mx, pl, pt, uk]
- `supercategory_id` (integer, optional) — Limit the product lines to one department id (from the same answer).

**Returns:** supercategories[]{supercategory_id, name, product_line_count, live_count, product_lines[]{product_line_id, name, category_count, live_count}}, categories[]{name, live_count}, count, total_products, country

**Example request body:**
```json
{
  "country": "uk"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=cex
- Human docs page: https://reefapi.com/docs/cex
- Overview page: https://reefapi.com/cex-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
