# Cdiscount Product Search & Price Tracker (`nimbryxo-studio/cdiscount-product-search-and-price-tracker`) Actor

Search Cdiscount by keyword, look up product URLs, or pull top-rated results, with price, discount, brand, seller, and rating data per product.

- **URL**: https://apify.com/nimbryxo-studio/cdiscount-product-search-and-price-tracker.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Cdiscount Product Search & Price Tracker

Cdiscount is one of France's largest online marketplaces, but comparing prices or ratings across more than a handful of listings means clicking through page after page by hand. This actor turns a Cdiscount keyword search, a list of product URLs, or a top-rated-products lookup into structured product records with pricing, discount, and rating data already extracted.

### What this actor does

- Searches Cdiscount by keyword, with sort order (relevance, price, rating, newest) and a price range filter applied to the results.
- Fetches full product pages by URL to pull brand, seller, and description alongside the pricing and rating fields.
- Surfaces top-rated products for a keyword by reading the same search results sorted by customer rating — this mode doesn't add new fields, it just orders the results differently.
- Computes the discount percentage itself from the current and pre-discount price whenever both are published.
- Leaves a field out of the record entirely when Cdiscount doesn't publish it for that product, instead of sending an empty placeholder.

### Output per product

| Field | Description |
|---|---|
| `productId` | Cdiscount's internal product identifier |
| `title` | Product name |
| `brand` | Manufacturer or brand name |
| `price` | Current price in euros |
| `originalPrice` | Pre-discount price in euros, when Cdiscount shows one |
| `discountPercent` | Discount percentage, computed from `price` and `originalPrice` |
| `rating` | Customer rating, 0–5 scale |
| `reviewCount` | Number of customer reviews |
| `imageUrl` | Main product image URL |
| `productUrl` | Direct link to the Cdiscount product page |
| `category` | Product category or department, from search results |
| `seller` | Marketplace seller name (from `productDetails` mode) |
| `description` | Product description text (from `productDetails` mode) |
| `searchKeyword` | The keyword that returned this product (`search` and `topSellers` modes) |
| `recordType` | Always `product` |
| `scrapedAt` | ISO 8601 UTC timestamp of the scrape |

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` (keyword search), `productDetails` (fetch specific URLs), or `topSellers` (keyword search sorted by rating). Required. |
| `keyword` | string | `smartphone` | Search keyword, used in `search` and `topSellers` modes. |
| `productUrls` | array | `[]` | Cdiscount product page URLs to scrape, used in `productDetails` mode. |
| `sortBy` | string | `relevance` | Result order for `search` mode: `relevance`, `price_asc`, `price_desc`, `rating`, or `new`. |
| `minPrice` | integer | – | Keep only products priced at or above this value, in euros. |
| `maxPrice` | integer | – | Keep only products priced at or below this value, in euros. |
| `maxItems` | integer | `20` | Maximum number of products to return. |

#### Example: keyword search with a price range

```json
{
  "mode": "search",
  "keyword": "aspirateur",
  "sortBy": "price_asc",
  "minPrice": 50,
  "maxPrice": 200,
  "maxItems": 50
}
```

#### Example: specific product pages

```json
{
  "mode": "productDetails",
  "productUrls": [
    "https://www.cdiscount.com/telephonie/telephone-mobile/exemple-produit.html"
  ],
  "maxItems": 10
}
```

#### Example: top-rated products for a category

```json
{
  "mode": "topSellers",
  "keyword": "ordinateur portable",
  "maxItems": 30
}
```

### Use cases

- **Price tracking** — watch how a product's price and discount move over time by rerunning `productDetails` on the same URLs.
- **Market research** — pull a category's full price and rating spread with a single `search` run.
- **Competitive benchmarking** — compare brand, seller, and rating data for similar products side by side.
- **Catalog enrichment** — add Cdiscount pricing and availability signals to a product database by matching on `productId`.
- **Deal discovery** — sort by `price_asc` or filter by `minPrice`/`maxPrice` to surface the cheapest options in a category.

### FAQ

**Does this need a Cdiscount account or login?**
No. All three modes read Cdiscount's public search and product pages.

**What currency are the prices in?**
Euros. Cdiscount is a French marketplace and doesn't publish prices in other currencies.

**What's actually different about `topSellers` mode?**
It runs the same keyword search as `search` mode, just sorted by customer rating instead of relevance. It doesn't add seller or description fields — for those, use `productDetails` with the product's URL.

**Why don't search results include `seller` or `description`?**
Those two fields only appear on the full product page, which `productDetails` mode fetches. Search results only carry what's visible on the search results grid.

**Why is `originalPrice` or `discountPercent` sometimes missing?**
Those fields are only included when Cdiscount itself publishes a pre-discount "crossed out" price for that product. If a product isn't discounted, there's nothing to compute a percentage from.

**Can I combine a price range with a sort order?**
Yes — `minPrice`/`maxPrice` and `sortBy` both apply to `search` mode and can be set together.

**How many products can one run return?**
Up to the `maxItems` value you set, capped at 500 per run.

**Is this affiliated with Cdiscount?**
No. This actor reads Cdiscount's public pages and is not affiliated with, endorsed by, or connected to Cdiscount in any way.

# Actor input Schema

## `mode` (type: `string`):

What to scrape.

## `keyword` (type: `string`):

Keyword to search for (mode=search or topSellers).

## `productUrls` (type: `array`):

List of Cdiscount product page URLs to scrape.

## `sortBy` (type: `string`):

Sort order for search results.

## `minPrice` (type: `integer`):

Filter products with price at or above this value.

## `maxPrice` (type: `integer`):

Filter products with price at or below this value.

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

Maximum number of products to return.

## Actor input object example

```json
{
  "mode": "search",
  "keyword": "smartphone",
  "productUrls": [],
  "sortBy": "relevance",
  "maxItems": 20
}
```

# Actor output Schema

## `products` (type: `string`):

Dataset containing all scraped Cdiscount products.

# 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 = {
    "mode": "search",
    "keyword": "smartphone",
    "productUrls": [],
    "sortBy": "relevance",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/cdiscount-product-search-and-price-tracker").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 = {
    "mode": "search",
    "keyword": "smartphone",
    "productUrls": [],
    "sortBy": "relevance",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/cdiscount-product-search-and-price-tracker").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 '{
  "mode": "search",
  "keyword": "smartphone",
  "productUrls": [],
  "sortBy": "relevance",
  "maxItems": 20
}' |
apify call nimbryxo-studio/cdiscount-product-search-and-price-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/cdiscount-product-search-and-price-tracker"
        }
    }
}
```

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/KdPieB0eXhxLGZhgt/builds/yv9xsRHpwIzszIcrW/openapi.json
