# Rexel Search ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/rexel/search` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/rexel-search | ## Description Search Rexel France by keyword, EAN or search URL. Returns product cards and pagination via browser rendering. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/rexel/search' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Keyword prise ```json { "results": [ { "ean": null, "url": "https://www.rexel.fr/frx/HAGWXF122/p/71742449", "name": "Prise de courant gallery 2P+T double pré cablées", "brand": "HAGER", "image_url": "https://api.rexel.fr/media/api/fr/content/71742449/LARGE_WEBP", "rexel_ref": "HAGWXF122", "product_id": 71742449, "description": "La prise de courant double pré cablées 2P+T WXF122 fait partie de la gamme gallery.", "manufacturer_ref": "WXF122" } ], "pagination": { "next": "https://www.rexel.fr/frx/search?text=prise&page=2", "page": 1, "per_page": 24, "total_pages": 2262, "total_results": 54275 } } ``` ### EAN redirect ```json { "results": [ { "ean": "3250617191227", "url": "https://www.rexel.fr/frx/HAGWXF122/p/71742449", "name": "Prise de courant gallery 2P+T double pré cablées", "brand": "Hager", "image_url": "https://api.rexel.fr/media/api/fr/content/71742449/EXTRA_LARGE_WEBP", "rexel_ref": "HAGWXF122", "product_id": 71742449, "description": "La prise de courant double pré cablées 2P+T WXF122 fait partie de la gamme gallery.", "manufacturer_ref": "WXF122" } ], "pagination": { "next": null, "page": 1, "per_page": 24, "total_pages": 1, "total_results": 1 } } ``` ## Documentation ## Overview Search electrical products on Rexel France. Pass a keyword, an EAN, or a Rexel search URL. You get product cards with name, brand, references, image and description, plus pagination. France only (`www.rexel.fr`). Prices and stock need a Rexel pro account and are not returned. Browser rendering. Costs **2 credits** per call. ## Quickstart ``` GET https://api.piloterr.com/v2/rexel/search?query=prise GET https://api.piloterr.com/v2/rexel/search?query=3250617191227 GET https://api.piloterr.com/v2/rexel/search?query=https://www.rexel.fr/frx/search?text=prise&page=2 ``` ## Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `query` | string | yes | Keyword, EAN, or Rexel FR search URL | | `page` | integer | no | Page number (1-based) | | `return_page_source` | boolean | no | Return rendered HTML instead of JSON | ## Response fields | Field | Type | Description | |---|---|---| | `results` | array | Product cards | | `results[].product_id` | integer | Rexel product id | | `results[].name` / `brand` | string | Title and brand | | `results[].rexel_ref` / `manufacturer_ref` | string | References | | `results[].ean` | string | Present when search redirects to a product page | | `results[].url` / `image_url` / `description` | string | Link, image, short text | | `pagination` | object | `page`, `per_page`, `total_results`, `total_pages`, `next` | ## Error codes | Code | Meaning | |---|---| | `400` | Empty or invalid `query` (non-FR Rexel sites are rejected) | | `404` | No products found | | `500` | Rendering failed | ## Related endpoints - [Rexel Product](https://www.piloterr.com/library/rexel-product)