Castorama product search on www.castorama.fr.
query is a keyword or a listing URL (/search?term= or a category path ending in .cat). The response is { results, pagination }. Each card has the EAN, name, product URL, image, price, rating and, when the card shows it, the unit price.
A product URL (…_CAFR.prd) returns 400.
GET https://api.piloterr.com/v2/castorama/search?query=joint-silicone
GET https://api.piloterr.com/v2/castorama/search?query=joint-silicone&page=2
GET https://api.piloterr.com/v2/castorama/search?query=https://www.castorama.fr/search?term=joint-silicone
GET https://api.piloterr.com/v2/castorama/search?query=https://www.castorama.fr/outillage/outillage-electroportatif/perceuse-visseuse-perceuse-a-percussion-et-tournevis-sans-fil/cat_id_3796.cat
Example (keyword):
joint-silicone
Example (search URL):
https://www.castorama.fr/search?term=joint-silicone
Example (category URL):
https://www.castorama.fr/outillage/outillage-electroportatif/perceuse-visseuse-perceuse-a-percussion-et-tournevis-sans-fil/cat_id_3796.cat
query is required. Only www.castorama.fr is accepted.
| Form |
Example |
What happens |
| Keyword |
joint-silicone |
Builds https://www.castorama.fr/search?term=joint-silicone. Some keywords redirect to a category; the cards of that page are returned. |
| Search URL |
https://www.castorama.fr/search?term=joint-silicone |
Uses that listing. page adds or replaces ?page=. |
| Category URL |
https://www.castorama.fr/outillage/outillage-electroportatif/perceuse-visseuse-perceuse-a-percussion-et-tournevis-sans-fil/cat_id_3796.cat |
Category listing. The path must end with .cat. |
A product URL returns 400. Another host returns 400. An empty value returns 400. page below 1 returns 400.
page starts at 1. Page 2 of the same listing is ?page=2.
| Parameter |
Type |
Required |
Description |
query |
string |
yes |
Keyword, /search URL, or .cat category URL |
page |
integer |
no |
Page from 1. Sent as ?page= on the listing. |
| Field |
Type |
Description |
results[] |
array |
Product cards on this page |
results[].position |
integer |
Position on the page, from 1 |
results[].ean |
string | null |
EAN from the card |
results[].name |
string |
Product name |
results[].url |
string |
Product URL ending in _CAFR.prd |
results[].image |
string | null |
Main image |
results[].price |
number | null |
Price in euros |
results[].price_display |
string | null |
Price as shown, for example 10,90 € |
results[].was_price |
number | null |
Crossed-out price when the card shows one |
results[].was_price_display |
string | null |
Crossed-out price as shown, for example 41,90 € |
results[].currency |
string | null |
EUR when a price is present |
results[].rating |
number | null |
Average rating out of 5 |
results[].review_count |
integer | null |
Number of reviews |
results[].unit_price |
number | null |
Unit price when the card shows one |
results[].unit_price_display |
string | null |
Unit price as shown, for example 38,93 € / L |
pagination.page |
integer |
Requested page |
pagination.per_page |
integer |
Cards returned on this page |
pagination.total_results |
integer | null |
Total from the heading |
pagination.total_pages |
integer | null |
Last page link |
pagination.next |
string | null |
Next page URL, or null on the last page |
was_price is the crossed-out price on the card. It is null when the page shows only the current price. price stays the current price.
Cards outside the product list are ignored, and a repeated product URL is returned once.
A broad keyword can redirect to a guide without products (scie, joint) and then returns 404. Pass the category .cat URL instead.
price is a number (10.9) and price_display keeps the French comma (10,90 €). Currency is EUR.
unit_price is set only when the card shows a line such as soit 38,93 € / L.
per_page is the number of cards on this page (48 on the keyword page checked here, 54 on the drill category).
total_results is the figure in the heading (9 050 produits). total_pages is the last page link.
The sample below keeps the first card. A live call returns every card on the page.
A page with no product card returns 404.
- Monitor paint, tools, and building prices in France
- Page a category
- Resolve a keyword to a product URL
| Code |
Meaning |
400 |
Empty query, unknown host, product URL, or page below 1 |
403 |
Blocked |
404 |
No product card on the page |
500 |
Fetch failed |
Castorama Product