# Coolblue & PriceSpy Scraper — EU EAN Price & Stock Feed (`vesper_studio/eu-ean-price-stock-monitor`) Actor

HTTP-first European EAN-13 / GTIN price, stock & Buy Box monitor across Coolblue (NL/BE) and PriceSpy / leDénicheur / Prisjakt (FR/GB/SE/NO/FI/IE). Strict EAN checksum validation, multi-seller offers, historical delta tracking, and Pay-Per-Event billing in 256 MB RAM.

- **URL**: https://apify.com/vesper_studio/eu-ean-price-stock-monitor.md
- **Developed by:** [Xavier Richard](https://apify.com/vesper_studio) (community)
- **Categories:** E-commerce, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.50 / 1,000 product offer checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU EAN Price, Stock & Availability Feed

A high-speed, 100% HTTP **European EAN Price, Stock & Availability Feed** built for Apify (`eu-ean-price-stock-monitor`). Monitor retail prices, discount percentages, stock availability, and Buy Box / multi-seller offers across European e-commerce storefronts and price comparators using **EAN-13 / GTIN-13 codes**, **keywords**, or **direct URLs** — with zero Playwright overhead, 256–512 MB target memory, and no proxy required by default.

> **Product Positioning & Compliance:** This Actor is a public catalog **EAN Price, Stock & Availability Feed** for market intelligence, catalog enrichment, replenishment alerts, and competitive benchmarking.

***

### Supported Adapters & European Markets

| Adapter ID  | Platform / Storefronts                        | Countries                          | Currencies                 | Seller / Buy Box Coverage                   |
| :---------- | :-------------------------------------------- | :--------------------------------- | :------------------------- | :------------------------------------------ |
| `coolblue`  | Coolblue (`coolblue.nl`, `coolblue.be`)       | `NL`, `BE`                         | `EUR`                      | 1P retailer offer + stock + reference price |
| `pricespy`  | PriceSpy / leDénicheur / Prisjakt / Hintaopas | `FR`, `GB`, `SE`, `NO`, `FI`, `IE` | `EUR`, `GBP`, `SEK`, `NOK` | Multi-seller offer matrix + Buy Box flag    |
| `bol`       | *Planned interface stub*                      | `NL`, `BE`                         | `EUR`                      | Modular adapter contract ready              |
| `kaufland`  | *Planned interface stub*                      | `DE`, `FR`, `CZ`, `SK`, `PL`       | `EUR`, `CZK`, `PLN`        | Modular adapter contract ready              |
| `cdiscount` | *Planned interface stub*                      | `FR`                               | `EUR`                      | Modular adapter contract ready              |

***

### Key Features

- **100% HTTP + TLS Fingerprinting (`got-scraping`)**: Extracts structured `application/ld+json` and Next.js App Router (`self.__next_f`) payloads directly from server responses — 10x–50x faster and far cheaper than headless browsers.
- **Strict EAN-13 / GTIN-13 Checksum Validation**: Validates GS1 check digits (`normalizeEan13`) on inputs and outputs, automatically converting leading-zero GTIN-14 codes into canonical 13-digit `ean` & `gtin13`.
- **Buy Box & Multi-Seller Feed**: Captures individual seller prices, shipping/stock status, condition filtering (`onlyNewCondition`), and a deterministic `isBuyBox` winner flag per product.
- **Delta Mode (`onlyPriceChanges` + Key-Value Store)**: Stores the latest `(price, inStock, sellerName)` snapshot in a persistent Apify Key-Value Store (`eu-ean-price-stock-state`) and cleanly persists state on `Actor.on('aborting')`. Emit only price, stock, or Buy Box changes on scheduled runs.
- **Pay-Per-Event Ready (`product-checked`)**: Built-in budget guard verifying remaining `maxTotalChargeUsd` before each `Actor.charge` batch.
- **Zero Proxy by Default**: Runs without proxies out of the box; optional `proxyConfiguration` can be enabled in input for high-volume schedules.

***

### Input Configuration

```json
{
    "eans": ["4548736132580"],
    "keywords": ["Sony WH-1000XM5"],
    "urls": [],
    "adapters": ["coolblue", "pricespy"],
    "countries": ["NL", "FR"],
    "onlyPriceChanges": false,
    "trackDelta": true,
    "deltaStateStoreName": "eu-ean-price-stock-state",
    "onlyNewCondition": true,
    "fastListingMode": true,
    "maxOffersPerProduct": 10,
    "maxItemsPerQuery": 5,
    "maxItems": 100,
    "maxConcurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
}
```

***

### Normalized Output Schema

Every dataset record is strictly validated with `zod` and conforms to the following schema:

```json
{
    "ean": "4548736132580",
    "gtin13": "4548736132580",
    "sku": "6219512",
    "title": "Sony WH-1000XM5 Sans fil Circum-aural Casque",
    "brand": "Sony",
    "merchant": "pricespy",
    "country": "FR",
    "currency": "EUR",
    "price": 203.89,
    "originalPrice": null,
    "discountPercent": null,
    "inStock": true,
    "stockLabel": "InStock",
    "sellerName": "Amazon.fr",
    "isBuyBox": true,
    "url": "https://ledenicheur.fr/product.php?p=6219512",
    "scrapedAt": "2026-11-13T04:35:00.000Z",
    "priceChanged": true
}
```

***

### Integrations: Clay, n8n, Make & Apify API

#### 1. Apify REST API (cURL / Node.js / Python)

Trigger a synchronous run and stream the JSON feed directly into your ERP, PIM, or BI warehouse:

```bash
curl -X POST "https://api.apify.com/v2/acts/<YOUR_USERNAME>~eu-ean-price-stock-monitor/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "eans": ["4548736132580"],
    "adapters": ["coolblue", "pricespy"],
    "countries": ["NL", "FR"],
    "onlyPriceChanges": true
  }'
```

#### 2. Clay (HTTP API Enrichment & Table Sync)

1. In your Clay table containing an `ean` column, add an **HTTP API** enrichment column (or use the **Apify** integration).
2. Point it to `https://api.apify.com/v2/acts/<YOUR_USERNAME>~eu-ean-price-stock-monitor/run-sync-get-dataset-items?token={{APIFY_TOKEN}}`.
3. Pass `{"eans": ["{{ean}}"], "adapters": ["coolblue", "pricespy"], "countries": ["NL", "FR"]}` as JSON body.
4. Map `price`, `inStock`, `sellerName`, `isBuyBox`, and `discountPercent` back into Clay columns for automated supplier/retailer benchmarking.

#### 3. n8n Workflow (Scheduled Delta Alerts)

1. Add an **Apify** node (or **HTTP Request** node) triggered on a **Schedule** (e.g., every 4 hours).
2. Enable `"onlyPriceChanges": true` so only price drops, restocks, out-of-stock events, or Buy Box shifts are returned.
3. Route dataset items through an **IF** node (`inStock === false` or `discountPercent >= 15`) to **Slack**, **Email**, **PostgreSQL**, or **Google Sheets**.

#### 4. Make (Integromat) Scenarios

1. Use the **Apify — Run an Actor** module with `"onlyPriceChanges": true` and `"deltaStateStoreName": "eu-ean-price-stock-state"`.
2. Attach a **Watch Actor Runs** webhook or **Get Dataset Items** module.
3. Push updated records to **Shopify**, **BigQuery**, **Airtable**, or **Webhook** endpoints.

***

### Local Development & Verification

```bash
npm install
npm test
npm run lint
apify validate-schema
apify run
```

# Actor input Schema

## `eans` (type: `array`):

List of EAN-13 or GTIN-13 codes to look up (validated against the GS1 check digit). Invalid EANs are skipped with a warning.

## `keywords` (type: `array`):

Product names, model numbers, or SKUs to search across enabled adapters.

## `urls` (type: `array`):

Direct Coolblue (coolblue.nl, coolblue.be) or PriceSpy / leDénicheur / Prisjakt product or search URLs. The matching adapter is selected automatically from the URL hostname.

## `adapters` (type: `array`):

Adapters to query for EANs and keywords. Supported now: 'coolblue' (NL, BE) and 'pricespy' (FR, GB, SE, NO, FI, IE). Modular interface ready for 'bol', 'kaufland', 'cdiscount'.

## `countries` (type: `array`):

ISO 3166-1 alpha-2 country codes to query per adapter (Coolblue: NL, BE; PriceSpy/leDénicheur/Prisjakt: FR, GB, SE, NO, FI, IE).

## `onlyPriceChanges` (type: `boolean`):

When enabled, compares each item against the previous state stored in the Key-Value Store and pushes only items with a price, stock, or Buy Box seller change (plus newly discovered items).

## `trackDelta` (type: `boolean`):

Persists the latest (price, inStock, sellerName) snapshot per product/offer in the Key-Value Store and populates the 'priceChanged' field even when 'onlyPriceChanges' is false.

## `deltaStateStoreName` (type: `string`):

Named Apify Key-Value Store used to persist price and stock snapshots across scheduled runs. Use 'default' for per-run isolation.

## `onlyNewCondition` (type: `boolean`):

Filter out used/refurbished offers on multi-seller comparator feeds (e.g., PriceSpy / leDénicheur).

## `fastListingMode` (type: `boolean`):

When enabled, extracts full price, stock, and SKU data directly from search listing cards on supported storefronts (e.g., Coolblue) in a single HTTP request instead of fetching every product detail page.

## `maxOffersPerProduct` (type: `integer`):

Maximum number of seller offers to extract per PriceSpy / leDénicheur / Prisjakt product page.

## `maxItemsPerQuery` (type: `integer`):

Maximum number of product detail pages to inspect per search query on each adapter/country.

## `maxItems` (type: `integer`):

Global cap on dataset items emitted per run.

## `maxConcurrency` (type: `integer`):

Bounded concurrent HTTP requests (keep 3-8 for 256-512 MB memory targets).

## `proxyConfiguration` (type: `object`):

Disabled by default for zero-proxy HTTP execution. Enable Apify Proxy or custom proxy URLs only if needed for high-volume runs.

## Actor input object example

```json
{
  "eans": [
    "4548736132580"
  ],
  "keywords": [
    "Sony WH-1000XM5"
  ],
  "urls": [],
  "adapters": [
    "coolblue",
    "pricespy"
  ],
  "countries": [
    "NL",
    "FR"
  ],
  "onlyPriceChanges": false,
  "trackDelta": true,
  "deltaStateStoreName": "eu-ean-price-stock-state",
  "onlyNewCondition": true,
  "fastListingMode": true,
  "maxOffersPerProduct": 10,
  "maxItemsPerQuery": 5,
  "maxItems": 100,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "eans": [
        "4548736132580"
    ],
    "keywords": [
        "Sony WH-1000XM5"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vesper_studio/eu-ean-price-stock-monitor").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 = {
    "eans": ["4548736132580"],
    "keywords": ["Sony WH-1000XM5"],
}

# Run the Actor and wait for it to finish
run = client.actor("vesper_studio/eu-ean-price-stock-monitor").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 '{
  "eans": [
    "4548736132580"
  ],
  "keywords": [
    "Sony WH-1000XM5"
  ]
}' |
apify call vesper_studio/eu-ean-price-stock-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vesper_studio/eu-ean-price-stock-monitor"
        }
    }
}
```

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/NXFZtvzyUOc93geoq/builds/6hYtaIhMwpMoJXtEP/openapi.json
