# CeX Spain Price API 🇪🇸 (`gzfello/cex-spain-price-api`) Actor

Get real-time buy (cash) and sell prices from CeX Spain for any product: consoles, phones, GPUs, games, retro. Data includes cash price, exchange price, sell price, stock in 100+ stores, and last price change date.

- **URL**: https://apify.com/gzfello/cex-spain-price-api.md
- **Developed by:** [Ángel Vidal](https://apify.com/gzfello) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## CeX Spain Price API 🇪🇸

Real-time **buy-in (cash) prices** from CeX Spain — the largest second-hand retailer with 100+ stores. Get what CeX would pay you in cash for any product: consoles, phones, GPUs, games, retro collectibles.

### 💡 Why this Actor exists

If you flip products bought on Wallapop, Vinted or Milanuncios, your biggest risk is not knowing what CeX will pay you before you buy. This API solves it:

> See an iPhone 13 for €160 on Wallapop → query this API → CeX pays €280 cash → **+€120 guaranteed margin** (they have a store that will buy it).

No more guessing. No more "I hope someone buys it".

### 📦 What you get per product

| Field | Description |
|-------|-------------|
| `cashPrice` | What CeX pays you **in cash** today |
| `exchangePrice` | Trade-in value (store credit) |
| `sellPrice` | What CeX charges customers |
| `previousPrice` | Last price (detect trends) |
| `priceLastChanged` | When the price last moved |
| `storesCount` | How many of the 100+ stores have stock |
| `rating` | Product condition rating |

### 🚀 Quick start

Add product queries like:

- `iphone 15 pro max`
- `playstation 5`
- `rtx 4070`
- `nintendo switch oled`
- `pokemon esmeralda gameboy`

#### Example input

```json
{
    "queries": ["iphone 13", "ps5"],
    "maxHitsPerQuery": 20,
    "minCashPrice": 50,
    "includeStores": false
}
```

#### Example output

```json
{
    "query": "iphone 13",
    "boxName": "Apple iPhone 13 128GB Negro, Libre A",
    "sellPrice": 465,
    "cashPrice": 265,
    "exchangePrice": 310,
    "previousPrice": 450,
    "priceLastChanged": "2026-08-12 01:00:14",
    "storesCount": 38,
    "superCatName": "Móviles"
}
```

### ⚙️ Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `queries` | list | required | Products to search |
| `maxHitsPerQuery` | int | 20 | Max results per query (1–50) |
| `minCashPrice` | number | 0 | Only return items where CeX pays ≥ this |
| `includeStores` | bool | false | Include full store name list |

### 💼 Use cases

**Flippers / Resellers**
Buy on Wallapop below CeX's cash price → sell to CeX same week → instant cash. The `cashPrice` field is your guaranteed floor price.

**Retro collectors**
Track `priceLastChanged` on rare games. When CeX raises their buy-in price, demand (and value) is rising.

**Market analysts**
Compare `sellPrice` vs `cashPrice` spread across categories to find the most liquid products.

**Automation builders**
Feed results into your own Telegram bot or dashboard to alert on profitable finds.

### ❓ FAQ

**Is this official CeX data?**
Data comes from the publicly accessible catalog of es.webuy.com. Prices change as CeX updates them (typically weekly).

**Which country?**
Spain only. Same platform covers UK, PT, IT with different catalogs.

**How fresh are prices?**
As fresh as CeX's own catalog — we query live on every run.

**Can I track price history?**
Run periodically (e.g., via Apify Scheduler) and export to compare `priceLastChanged` over time.

### 🔒 Legal

This Actor accesses only publicly available information from es.webuy.com. It does not bypass authentication or access non-public data.

# Actor input Schema

## `queries` (type: `array`):

Products to search in the CeX Spain catalog. Examples: 'iphone 15 pro', 'playstation 5', 'rtx 4070', 'pokemon esmeralda'

## `maxHitsPerQuery` (type: `integer`):

Maximum number of products returned per query (1-50)

## `minCashPrice` (type: `integer`):

Only return products where CeX pays at least this much cash. Use 0 to get everything.

## `includeStores` (type: `boolean`):

Include the list of physical stores where each product is available (increases payload size)

## Actor input object example

```json
{
  "queries": [
    "iphone 15",
    "nintendo switch oled"
  ],
  "maxHitsPerQuery": 20,
  "minCashPrice": 0,
  "includeStores": false
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

No description

## `datasetItemsCount` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "iphone 15",
        "nintendo switch oled"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gzfello/cex-spain-price-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": [
        "iphone 15",
        "nintendo switch oled",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gzfello/cex-spain-price-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "iphone 15",
    "nintendo switch oled"
  ]
}' |
apify call gzfello/cex-spain-price-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gzfello/cex-spain-price-api"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3lbJB3YpBwv2Wdh1H/builds/If9a4BcVpBQ7ubAz4/openapi.json
