# Castorama Scraper: Product Prices & Store Context (`hexagone-data/castorama-scraper`) Actor

Collect product data from castorama.fr. Verify product-page prices with the observed seller, postcode and store, or collect category listing data. Export JSON, CSV or Excel. Independent scraper.

- **URL**: https://apify.com/hexagone-data/castorama-scraper.md
- **Developed by:** [Hexagone Data](https://apify.com/hexagone-data) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 products

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

## Castorama France product prices

Collect product data from **castorama.fr**, then export the results as JSON, CSV or Excel. Use rendered product pages to record a price together with the seller, product reference, delivery postcode and store observed on the page. A separate category mode collects listing data for broader catalog research.

This is an independent scraper by Hexagone Data, not an official Castorama service.

### Try one product

1. Click **Try for free**, open the input form and switch to JSON.
2. Paste the input below and start the run. It requests one product with delivery postcode `75001`, without imposing a store.
3. Open **Output → Products** to inspect the record and export it. Read **Run summary** for warnings; in Storage, the key-value store also contains `OUTPUT` (JSON) and `SUMMARY` (HTML).

```json
{
  "startUrls": [{"url": "https://www.castorama.fr/paillasson-coco-kebir-goodhome-l-45-x-l-75-cm/5059340473512_CAFR.prd"}],
  "renderedProductPages": true,
  "deliveryPostalCode": "75001",
  "maxItems": 1,
  "proxyConfiguration": {"useApifyProxy": false}
}
```

“Try for free” is Apify's trial button; this Actor has the per-product price below. Availability and prices can change after this example was recorded.

### Price

**$1.50 per 1,000 products added to the dataset**: 20 products cost $0.03; one product costs $0.0015. The configured event is Product. There is no separate Actor startup event, and platform usage is included in this pay-per-event price. Apify account or subscription terms still apply.

`maxItems` limits unique products across the run; `0` removes that product limit. Apify's maximum charge per run can stop delivery earlier. A run that delivers no products emits no Product charge; a partial run can charge for the products it has delivered. Read the summary before assuming a category is complete.

### Choose the collection mode

**Rendered product pages — `renderedProductPages: true`.** Supply product-page URLs ending in `_CAFR.prd`. A browser checks the visible product reference, seller, price and context. Ambiguous pages are rejected instead of producing a comparable price. This mode does not accept category URLs. It focuses on price verification; descriptive fields may be null.

`deliveryPostalCode` sets the delivery postcode through the site's form. The resulting `priceContext.store` is the store observed on the page: it is **not a promise that the store is near that postcode**, nor that a price applies nationally. For example, a run with postcode `75001` observed Castorama Brest. Compare records only within the context you need.

`expectedStore` is an optional exact-name **check**, not a store selector. If the site shows a different store, the page is rejected. Leave it unset for the first test.

**Category/listing mode — `renderedProductPages: false`.** Supply category or brand-category URLs on castorama.fr. The Actor follows supported listing pagination and deduplicates products across the supplied URLs. This mode extracts listing data; it does not perform the rendered price/context checks described above. Delivery postcode and expected-store checks belong to rendered mode. Product pages can also be processed in this older extraction mode, with different field availability.

Set `renderedProductPages` explicitly in API inputs to avoid ambiguity. Do not mix category URLs into a rendered-mode run. Search, sorting and filtering URLs are rejected; use clean category/product URLs. Website changes, access blocks, missing pages and limits can prevent complete collection. No whole-catalog coverage is guaranteed.

### Output fields

Each dataset record represents a product. Core fields include `sku`, `name`, `url`, `price`, `priceCurrency`, `sourceUrl` and `scrapedAt`. `sku` contains the product reference extracted from the site. Fields such as image, description, rating, review count, category, availability and delivery days depend on the page and mode; missing values remain null.

Rendered records also include these **nested objects**:

- `priceContext`: selected postcode, observed store and context evidence.
- `variantEvidence`: URL/visible references, their verification status and visible selections.

`priceSource` identifies the extraction source. `originalPrice` and `discountPercent` are nullable: an absent crossed-out price is not filled in as an invented promotion. These are product data, not a local store stock check or a guaranteed delivery quote.

JSON preserves nested context. CSV and Excel are available from the dataset export controls; inspect the exported columns before importing into your application. The **Prices** and **Delivery** views are conveniences, and can show empty fields when that mode does not provide them.

### Troubleshooting and support

Check the terminal run message, `OUTPUT` and `SUMMARY`, not only the green run status. A partial collection may finish with products and warnings. Listing-mode site maintenance can finish successfully with zero products and a maintenance explanation; it is not proof of an empty category. Invalid inputs and rendered runs with no comparable product fail with a diagnostic.

If the embedded summary is blank, open the run's **Storage → Key-value store → SUMMARY** record. A category sent to rendered mode is rejected before a summary is written; in that case read the run's status message. Interrupted runs may retain an internal checkpoint; do not treat that as a complete export.

Start with one product and keep the selected postcode stable when comparing prices. If `expectedStore` fails, check the actual store rather than assuming the requested postcode selected it. For access failures, consult the run log before enabling an optional proxy. Repeated retries do not guarantee access.

Report reproducible problems through this Actor's **Issues** tab. Include the run ID, input URLs, collection mode and relevant warning, without credentials or proxy secrets. Hexagone Data maintains the Actor; product-page and catalog changes may require a correction. Scheduling and downstream alerts must be configured separately in Apify or your own workflow.

# Actor input Schema

## `startUrls` (type: `array`):

castorama.fr pages to scrape. Accepted: category and sub-category pages (…/cat_id_XXX.cat), brand-in-category pages (…-dyn.cat) and product pages (…/{EAN}\_CAFR.prd). Search, sorting and filtering parameters are disallowed by the site's robots.txt and rejected with a reason.

## `renderedProductPages` (type: `boolean`):

Use a real browser for product-page URLs, bind each price to its visible seller, EAN, variant, postcode and store, and reject ambiguous pages.

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

Stops after this many unique products across all start URLs. 0 = no limit.

## `deliveryPostalCode` (type: `string`):

Five-digit delivery postcode used for rendered product pages. It is set through Castorama's public form and verified on every delivered product.

## `expectedStore` (type: `string`):

Optional exact-name check of the observed store, not a store selector. A different store causes rejection. Leave empty for a first run.

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

Not needed by default. Only enable it if your runs get blocked.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.castorama.fr/paillasson-coco-kebir-goodhome-l-45-x-l-75-cm/5059340473512_CAFR.prd"
    }
  ],
  "renderedProductPages": true,
  "maxItems": 1,
  "deliveryPostalCode": "75001",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All products, one record each, with every field.

## `prices` (type: `string`):

Price view: product, price, crossed-out price, discount, rating, EAN, link.

## `delivery` (type: `string`):

Delivery view: product, EAN, category, condition, availability, handling days (product-page URLs).

## `summary` (type: `string`):

Readable per-URL summary: page type, status, products collected versus announced by the site, reason for any URL that returned nothing.

## `summaryJson` (type: `string`):

The same summary as JSON (OUTPUT record), for programmatic use.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.castorama.fr/paillasson-coco-kebir-goodhome-l-45-x-l-75-cm/5059340473512_CAFR.prd"
        }
    ],
    "renderedProductPages": true,
    "maxItems": 1,
    "deliveryPostalCode": "75001"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hexagone-data/castorama-scraper").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 = {
    "startUrls": [{ "url": "https://www.castorama.fr/paillasson-coco-kebir-goodhome-l-45-x-l-75-cm/5059340473512_CAFR.prd" }],
    "renderedProductPages": True,
    "maxItems": 1,
    "deliveryPostalCode": "75001",
}

# Run the Actor and wait for it to finish
run = client.actor("hexagone-data/castorama-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.castorama.fr/paillasson-coco-kebir-goodhome-l-45-x-l-75-cm/5059340473512_CAFR.prd"
    }
  ],
  "renderedProductPages": true,
  "maxItems": 1,
  "deliveryPostalCode": "75001"
}' |
apify call hexagone-data/castorama-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hexagone-data/castorama-scraper"
        }
    }
}
```

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/f2jMGEeScGZDexMdI/builds/3nKNh9EL5SLDNDhHA/openapi.json
