Skip to content

About

Castorama Scraper API by Piloterr: product, search data from Castorama as structured JSON. Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Castorama Scraper API by Piloterr – scrape Castorama data as JSON

Castorama Scraper API

Discord Get API key API docs License: MIT

The Piloterr Castorama Scraper API lets you extract public data from Castorama as clean, structured JSON — no proxies, headless browsers or HTML parsing to maintain. Endpoints available in production:

  • Castorama Product API — Read one Castorama product from its URL.
  • Castorama Search API — Search Castorama by keyword or search URL and page the DIY listings.

Use it for price monitoring, assortment tracking, competitor analysis, product research or catalog enrichment.

Endpoint Path Credits What you get
Castorama Product API /v2/castorama/product 1 Read one Castorama product from its URL. You get price, brand, and specifications.
Castorama Search API /v2/castorama/search 1 Search Castorama by keyword or search URL and page the DIY listings. Cards include title, price, and product link.

Table of contents

How it works

  1. Create a free Piloterr account and copy your API key from the dashboard.
  2. Send a GET (or POST) request to https://api.piloterr.com/v2/... with the header x-api-key: YOUR_API_KEY.
  3. Receive structured JSON — Piloterr handles rendering, proxies, retries and parsing.
export PILOTERR_API_KEY="your-api-key"
pip install requests        # Python
# TypeScript: Node.js 18+ (native fetch), run with `npx tsx file.ts`

Every endpoint accepts both GET (query string) and POST (JSON body with the same fields).

Castorama Product API

Read one Castorama product from its URL. You get price, brand, and specifications.

GET | POST https://api.piloterr.com/v2/castorama/product · 1 credit per request · Full reference

Request parameters

Parameter Type Required Description
query string ✅ Product URL ending in _CAFR.prd.

Python example

import json
import os
import requests

response = requests.get(
    "https://api.piloterr.com/v2/castorama/product",
    headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
    params={
        "query": "https://www.castorama.fr/mastic-bain-et-cuisine-rubson-blanc-280ml/5410091628840_CAFR.prd",
    },
    timeout=120,
)
response.raise_for_status()
data = response.json()

print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])

TypeScript example

type CastoramaProduct = {
  ean?: string;
  url?: string;
  name?: string;
  brand?: string;
  price?: number;
  images?: string[];
  rating?: number;
  currency?: string;
  in_stock?: boolean;
  was_price?: unknown;
  description?: string;
  review_count?: number;
  price_display?: string;
  specifications?: {
    name?: string;
    value?: string;
  }[];
  was_price_display?: unknown;
};

const params = new URLSearchParams({
  "query": "https://www.castorama.fr/mastic-bain-et-cuisine-rubson-blanc-280ml/5410091628840_CAFR.prd",
});

const response = await fetch(`https://api.piloterr.com/v2/castorama/product?${params}`, {
  headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);

const data = (await response.json()) as CastoramaProduct;

console.log(JSON.stringify(data, null, 2).slice(0, 2000));
POST variant
POST https://api.piloterr.com/v2/castorama/product
x-api-key: YOUR_API_KEY
Content-Type: application/json

{"query": "https://www.castorama.fr/mastic-bain-et-cuisine-rubson-blanc-280ml/5410091628840_CAFR.prd"}

Output example

Example response from the API reference, abridged — real values depend on the page you scrape.

{
  "ean": "5410091628840",
  "url": "https://www.castorama.fr/mastic-bain-et-cuisine-rubson-blanc-280ml/5410091628840_CAFR.prd",
  "name": "Mastic bain et cuisine Rubson blanc 280ml",
  "brand": "Rubson",
  "price": 10.9,
  "images": [
    "https://media.castorama.fr/is/image/Castorama/mastic-bain-et-cuisine-rubson-blanc-280ml~5410091628840_30c_FR_CF",
    "https://media.castorama.fr/is/image/Castorama/mastic-bain-et-cuisine-rubson-blanc-280ml~5410091628840_30t_FR_CF"
  ],
  "rating": 4.5,
  "currency": "EUR",
  "in_stock": true,
  "was_price": null,
  "description": "Le mastic sanitaire Rubson blanc de 280 ml garantit une étanchéité parfaite et durable pour vos baignoires, éviers et douches. Conçu spéc…",
  "review_count": 55,
  "price_display": "10,90 €",
  "specifications": [
    {
      "name": "Type d'article",
      "value": "Mastic cuisine et salle de bains"
    },
    {
      "name": "Marque",
      "value": "Rubson"
    }
  ],
  "was_price_display": null
}

Response fields

Field Type Description
ean string
url string
name string
brand string
price number
images string[]
rating number
currency string
in_stock boolean
was_price object
description string
review_count integer
price_display string
specifications[] object[]
specifications[].name string
specifications[].value string
was_price_display object

Castorama Search API

Search Castorama by keyword or search URL and page the DIY listings. Cards include title, price, and product link.

GET | POST https://api.piloterr.com/v2/castorama/search · 1 credit per request · Full reference

Request parameters

Parameter Type Required Description
query string ✅ Keyword, or a Castorama listing URL (/search or a .cat category).
page number — Page from 1. Sent as ?page= on the listing.

Python example

import json
import os
import requests

response = requests.get(
    "https://api.piloterr.com/v2/castorama/search",
    headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
    params={
        "query": "joint-silicone",
    },
    timeout=120,
)
response.raise_for_status()
data = response.json()

print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])

TypeScript example

type CastoramaSearch = {
  results?: {
    ean?: string;
    url?: string;
    name?: string;
    image?: string;
    price?: number;
    rating?: number;
    currency?: string;
    position?: number;
    was_price?: unknown;
    unit_price?: number;
    review_count?: number;
    price_display?: string;
    was_price_display?: unknown;
    unit_price_display?: string;
  }[];
  pagination?: {
    next?: string;
    page?: number;
    per_page?: number;
    total_pages?: number;
    total_results?: number;
  };
};

const params = new URLSearchParams({
  "query": "joint-silicone",
});

const response = await fetch(`https://api.piloterr.com/v2/castorama/search?${params}`, {
  headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);

const data = (await response.json()) as CastoramaSearch;

console.log(JSON.stringify(data, null, 2).slice(0, 2000));
POST variant
POST https://api.piloterr.com/v2/castorama/search
x-api-key: YOUR_API_KEY
Content-Type: application/json

{"query": "joint-silicone"}

Output example

Example response from the API reference, abridged — real values depend on the page you scrape.

{
  "results": [
    {
      "ean": "5410091628840",
      "url": "https://www.castorama.fr/mastic-bain-et-cuisine-rubson-blanc-280ml/5410091628840_CAFR.prd",
      "name": "Mastic bain et cuisine Rubson blanc 280ml",
      "image": "https://media.castorama.fr/is/image/Castorama/mastic-bain-et-cuisine-rubson-blanc-280ml~5410091628840_30c_FR_CF",
      "price": 10.9,
      "rating": 4.5,
      "currency": "EUR",
      "position": 1,
      "was_price": null,
      "unit_price": 38.93,
      "review_count": 55,
      "price_display": "10,90 €",
      "was_price_display": null,
      "unit_price_display": "38,93 € / L"
    }
  ],
  "pagination": {
    "next": "https://www.castorama.fr/search?term=joint-silicone&page=2",
    "page": 1,
    "per_page": 48,
    "total_pages": 189,
    "total_results": 9050
  }
}

Response fields

Field Type Description
results[] object[]
results[].ean string
results[].url string
results[].name string
results[].image string
results[].price number
results[].rating number
results[].currency string
results[].position integer
results[].was_price object
results[].unit_price number
results[].review_count integer
results[].price_display string
results[].was_price_display object
results[].unit_price_display string
pagination object
pagination.next string
pagination.page integer
pagination.per_page integer
pagination.total_pages integer
pagination.total_results integer

Code examples in other languages

Ready-to-run examples live in the examples/ folder. Each one reads your key from the PILOTERR_API_KEY environment variable.

Language Product Search
cURL (Bash) product search
PHP product search
C# product search
Go product search
Java product search
Ruby product search
Node.js product search

Practical use cases

  • Price monitoring — Track prices, promotions and availability over time to react to competitors.
  • Assortment & catalog tracking — Follow new products, delisted items and category changes.
  • Competitor analysis — Benchmark ranges, brands and positioning across retailers.
  • Product research — Spot best-sellers and trends from search results.
  • Catalog enrichment — Pull titles, images and attributes into your PIM or marketplace listings.

Why Piloterr?

  • No infrastructure — no proxies, headless browsers or CAPTCHA solving to run yourself.
  • Structured JSON — stable, documented fields instead of brittle HTML selectors.
  • Pay per request — transparent credit cost per endpoint, failed requests are retried for you.
  • One API key, hundreds of sources — Castorama plus many other e-commerce, search and company data endpoints in the Piloterr library.
  • Any language — plain HTTPS + JSON, with examples for Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby and Node.js.

FAQ

Is it legal to scrape Castorama?

Collecting publicly available data is generally allowed in many jurisdictions, but rules depend on your country, the data you collect and how you use it. Avoid personal data unless you have a lawful basis, respect the website's terms where they apply, and get legal advice for your specific use case. This is not legal advice.

Do I need proxies or a headless browser?

No. Piloterr handles rendering, proxy rotation and retries on its side. You only send an HTTPS request with your x-api-key header and receive JSON.

How much does a request cost?

Credits per call: /v2/castorama/product 1, /v2/castorama/search 1. See the Piloterr website for plans.

What data does the Castorama API return?

Each endpoint returns structured JSON: Castorama Product — ean, url, name, brand, price, images; Castorama Search — results[], results[].ean, results[].url, results[].name, results[].image, results[].price.

How do I paginate Castorama results?

Use the page parameter and keep requesting while the response indicates more results.

Which languages are supported?

Any language that can make an HTTP request. This README shows Python and TypeScript; the examples/ folder contains cURL, PHP, C#, Go, Java, Ruby and Node.js.

Official SDKs

Use Piloterr from your own language with a typed client:

SDK Package Install
Node.js @piloterr/sdk npm install @piloterr/sdk
Python piloterr pip install piloterr
Go piloterr-go go get github.com/piloterr/piloterr-go
.NET Piloterr dotnet add package Piloterr
Ruby piloterr gem install piloterr
PHP piloterr/sdk composer require piloterr/sdk
Java piloterr-java build from source, see its README
CLI @piloterr/cli npm install -g @piloterr/cli
MCP server @piloterr/mcp npx -y @piloterr/mcp

Related scrapers

Support


Piloterr
Built by Piloterr — web scraping APIs for e-commerce, search, real estate and more, one API key.

Castorama is a trademark of its respective owner. This repository is not affiliated with or endorsed by Castorama. Examples are released under the MIT license.

About

Castorama Scraper API by Piloterr: product, search data from Castorama as structured JSON. Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby examples.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors