# Cdiscount Product Search Scraper (`ecomscrape/cdiscount-product-search-scraper`) Actor

The Cdiscount Product Search Scraper extracts detailed product data from Cdiscount, including name, price, sku, etc., using search query URLs. It's perfect for market research, trend analysis, lead generation, and campaign planning.

- **URL**: https://apify.com/ecomscrape/cdiscount-product-search-scraper.md
- **Developed by:** [ecomscrape](https://apify.com/ecomscrape) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 20 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Contact

If you encounter any issues or need to exchange information, please feel free to contact us through the following link:
[My profile](https://apify.com/ecomscrape)

### Introduction

Cdiscount maintains its position as France's second-largest ecommerce marketplace, with an impressive 8.8% market share and more than 20 million unique monthly visits. This French marketplace is a treasure trove of product data spanning electronics, household goods, fashion, toys, and sports equipment. For businesses conducting market research, competitive analysis, or price monitoring in the French market, accessing Cdiscount's vast product catalog is essential.

However, manually collecting product information from Cdiscount is time-consuming and inefficient. The Cdiscount Product Search Scraper solves this challenge by automating the data extraction process, enabling users to gather comprehensive product information at scale. Whether you're analyzing competitor pricing strategies, researching market trends, or building product databases, this scraper provides the automated solution you need to stay competitive in France's dynamic e-commerce landscape.

### Comprehensive Scraping Solution Overview

The Cdiscount Product Search Scraper is a powerful automation tool designed to extract detailed product information from Cdiscount.com's product listing pages. Built with robust error handling and proxy support, this scraper ensures reliable data collection while respecting the platform's access policies.

The scraper's key strengths include its ability to handle multiple product URLs simultaneously, extract comprehensive product attributes, and deliver structured data ready for analysis. Its proxy integration prevents detection and blocking, while configurable retry mechanisms ensure data collection reliability even when dealing with slow-loading pages or temporary connection issues.

This tool is ideal for e-commerce businesses, market researchers, pricing analysts, product managers, and data scientists who need systematic access to Cdiscount's product information. Whether you're tracking competitor products, analyzing market pricing, or building comprehensive product catalogs, this scraper provides the foundation for data-driven decision making.

### Input and Output Specifications

Example url 1: https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#*his*

Example url 2: https://www.cdiscount.com/b-430080-equipement-auto.html#*his*

Example url 3: https://www.cdiscount.com/electromenager/v-110-0.html

Example Screenshot of product list by query page:

![](https://i.ibb.co/J5W8ZG1/Screenshot-from-2025-01-08-00-53-06.png)

#### Input Format

The scraper accepts configuration through a JSON object with several key parameters:

##### Scrape with URLs:

```json
{
  "max_retries_per_url": 2, // Maximum number of retry attempts for each URL
  "proxy": { // Proxy configuration to avoid bot detection
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL" 
    ],
    "apifyProxyCountry": "FR" // Choose a country that matches your target data location
  },
  "max_items_per_url": 20, // Total number of items you want to scrape
  "urls": [ // Product list page URLs to scrape
    "https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#_his_",
    "https://www.cdiscount.com/b-430080-equipement-auto.html#_his_",
    "https://www.cdiscount.com/electromenager/v-110-0.html"
  ],
  "ignore_url_failures": true // Continue scraping even if some URLs fail
}
```

**The `urls` parameter**: List of product list page URLs that you want to scrape. You can add URLs one by one, or use the Bulk edit section to add a prepared list.

**The `ignore_url_failures` parameter**: If set to `true`, the scraper will continue running even if some URLs fail to be scraped after reaching the maximum number of retries. This ensures that one problematic URL doesn't stop your entire scraping job.

*When you provide a list of URLs for scraping, all options in the "Scrape with search filters" section will be disabled. The system will only collect data from the URLs you specified.*

##### Scrape with Search Filters:

```json
{
  "max_retries_per_url": 2, // Maximum number of retry attempts for each search filter
  "proxy": { // Proxy configuration to avoid bot detection
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL" 
    ],
    "apifyProxyCountry": "FR" // Choose a country that matches your target data location
  },
  "max_items_per_url": 20, // Total number of items you want to scrape
  "keyword": "ordinateur portable", // Search keyword to find products
  "page": 1 // Starting page number for search results
}
```

**The `keyword` parameter**: The search keyword to find products (e.g., "ordinateur portable", "téléphone", "jouet", "electroménager").

**The `page` parameter**: Starting page number for scraping, useful for continuing interrupted scrapes or targeting specific result ranges.

*When using search filters for scraping, you need to leave the `urls` field empty (or set it to `null`) in the "Scrape with URLs" configuration.*

##### General Options:

**The `max_items_per_url` parameter**: Limits the number of products extracted from each product list page or search results page. The default value is 20, providing a manageable batch size while allowing for comprehensive data collection.

**The `max_retries_per_url` parameter**: Sets the maximum number of retry attempts for each URL or search filters if the scrape is detected as a bot or the page fails to load. The default value is 2, providing a good balance between thoroughness and efficiency.

**The `proxy` parameter**: Proxy configuration is essential for maintaining anonymity and avoiding detection. The residential proxy option ensures that your scraping activities appear as legitimate browsing, reducing the risk of being blocked or rate-limited. You should choose a country that matches the location of the website you're scraping (e.g., France/FR for cdiscount.com).

**Output:**

The scraper returns structured data for each product with comprehensive fields:

```json
[ // List of product information
  {
  "brand_id": 5784,
  "bullet_points": [
    {
      "display_name": "Dimensions du couchage",
      "value": "140 x 190 cm",
      "display_type": "DISPLAY_NAME_AND_VALUE"
    },
    {
      "display_name": "Epaisseur du matelas",
      "value": "14 cm",
      "display_type": "DISPLAY_NAME_AND_VALUE"
    },
    {
      "display_name": "Type de couchage",
      "value": "Occasionnel",
      "display_type": "DISPLAY_NAME_AND_VALUE"
    },
    {
      "display_name": "Densité de l'assise",
      "value": "30 kg/m3",
      "display_type": "DISPLAY_NAME_AND_VALUE"
    }
  ],
  "category_id": 1000023613,
  "commercial_operations": [
    {
      "operation_shape": "commercial-operation",
      "banner_url": "https://www.cdiscount.com/imagesOK/CommercialOffer/096965_banner.png",
      "description": "Partagez votre avis et gagnez 50€.",
      "end_date": "2025-12-31T22:00:00Z",
      "label_name": "Bon plan",
      "label_type": "OTHER",
      "mechanics_type": "SPECIAL",
      "name": "Partagez votre avis et gagnez 50€.",
      "operation_guid": "b10cef0e-9a11-4da9-b6da-28d64cc8f410",
      "operation_id": 96965,
      "operation_type": "SPECIAL",
      "operation_type_id": 2,
      "special_page_url": "http://www.cdiscount.com/odr/ImagesOK/CommercialOffer/conditions_96848202410010941358204.pdf?rnd=70C692AB"
    },
    {
      "operation_shape": "commercial-operation",
      "banner_url": "https://www.cdiscount.com/imagesOK/CommercialOffer/082148_banner.png",
      "description": "Ce produit est certifié Oeko-Tex. Ce label garantit l'absence de substances nocives pour la santé ou la peau dans les textiles utilisés, grâce à des contrôles et tests en laboratoire. En le choisissant, vous contribuez à réduire la pollution des eaux et à protéger ceux qui le fabriquent.",
      "end_date": "2030-06-29T22:00:00Z",
      "label_name": "Plus responsable",
      "label_type": "ECO",
      "mechanics_type": "SPECIAL",
      "name": "Textile Oeko-Tex",
      "operation_guid": "93463f8b-e46e-4c44-8ed2-83ac1877140b",
      "operation_id": 82148,
      "operation_type": "SPECIAL",
      "operation_type_id": 2,
      "special_page_url": "https://www.cdiscount.com/nos-engagements-rse.html#acheter-responsable"
    }
  ],
  "department_id": 11701,
  "free_shipping": "Livraison gratuite",
  "id": 4197378169,
  "is_cdav": false,
  "is_downloadable": false,
  "is_fbc": false,
  "is_lgan": false,
  "is_main_price_with_variance": false,
  "is_new": true,
  "media": [
    {
      "alt": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
      "src": "//www.cdiscount.com/pdt2/3/c/d/1/400x400/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
      "sources": [
        {
          "media": "(max-width:300px)",
          "size": {
            "height": 300,
            "width": 300
          },
          "src_set": "//www.cdiscount.com/pdt2/3/c/d/1/300x300/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg"
        }
      ],
      "thumbnail": {
        "url": "//www.cdiscount.com/pdt2/3/c/d/1/140x140/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
        "size": "PDT140X140",
        "index": 1
      },
      "height": 400,
      "width": 400
    },
    {
      "alt": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
      "src": "//www.cdiscount.com/pdt2/3/c/d/2/400x400/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
      "sources": [
        {
          "media": "(max-width:300px)",
          "size": {
            "height": 300,
            "width": 300
          },
          "src_set": "//www.cdiscount.com/pdt2/3/c/d/2/300x300/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg"
        }
      ],
      "thumbnail": {
        "url": "//www.cdiscount.com/pdt2/3/c/d/2/140x140/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
        "size": "PDT140X140",
        "index": 2
      },
      "height": 400,
      "width": 400
    },
    {
      "alt": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
      "src": "//www.cdiscount.com/pdt2/3/c/d/3/400x400/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
      "sources": [
        {
          "media": "(max-width:300px)",
          "size": {
            "height": 300,
            "width": 300
          },
          "src_set": "//www.cdiscount.com/pdt2/3/c/d/3/300x300/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg"
        }
      ],
      "thumbnail": {
        "url": "//www.cdiscount.com/pdt2/3/c/d/3/140x140/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
        "size": "PDT140X140",
        "index": 3
      },
      "height": 400,
      "width": 400
    },
    {
      "alt": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
      "src": "//www.cdiscount.com/pdt2/3/c/d/4/400x400/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
      "sources": [
        {
          "media": "(max-width:300px)",
          "size": {
            "height": 300,
            "width": 300
          },
          "src_set": "//www.cdiscount.com/pdt2/3/c/d/4/300x300/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg"
        }
      ],
      "thumbnail": {
        "url": "//www.cdiscount.com/pdt2/3/c/d/4/140x140/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
        "size": "PDT140X140",
        "index": 4
      },
      "height": 400,
      "width": 400
    },
    {
      "alt": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
      "src": "//www.cdiscount.com/pdt2/3/c/d/5/400x400/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
      "sources": [
        {
          "media": "(max-width:300px)",
          "size": {
            "height": 300,
            "width": 300
          },
          "src_set": "//www.cdiscount.com/pdt2/3/c/d/5/300x300/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg"
        }
      ],
      "thumbnail": {
        "url": "//www.cdiscount.com/pdt2/3/c/d/5/140x140/tom3ltlinc3cd/rw/canape-convertible-express-3-places-tom-velo.jpg",
        "size": "PDT140X140",
        "index": 5
      },
      "height": 400,
      "width": 400
    }
  ],
  "min_quantity": 1,
  "name": "Canapé convertible express - 3 places - TOM - Velours côtelé beige - 185 x 100 x 87 cm",
  "new_offer_min_price": 0,
  "new_offer_quantity": 0,
  "pre_order_start_date": 0,
  "prices": {
    "offer_id": 4197378169,
    "price": {
      "value": 789.99,
      "value_without_v_a_t": 658.33
    },
    "striked_price": {
      "date": "2025-02-12T15:37:33.000+00:00",
      "legal_description_type": "ppi",
      "legal_label_type": "comparison_price",
      "value": 1108.6,
      "value_without_v_a_t": 923.83
    },
    "taxes": {
      "vat": {
        "type": "vat",
        "value": 131.67,
        "value_without_v_a_t": 0
      },
      "dea": {
        "type": "dea",
        "value": 30,
        "value_without_v_a_t": 25
      },
      "eco_part": {
        "type": "eco_part",
        "value": 30,
        "value_without_v_a_t": 25
      }
    }
  },
  "product_condition": "Produit neuf",
  "product_condition_id": 6,
  "product_id": "tom3ltlinc3cd",
  "product_state_id": 1,
  "rating": {
    "reviews_count": 0
  },
  "seller_id": 0,
  "seller_name": "CDISCOUNT",
  "seller_pool_id": 1,
  "stress_messages": null,
  "url": "//www.cdiscount.com/maison/canape-canapes/canape-convertible-express-3-places-tom-velo/f-11701-tom3ltlinc3cd.html#mpos=1|cd",
  "used_offer_min_price": 0,
  "used_offer_quantity": 0,
  "from_url": "https://www.cdiscount.com/b-402596-nouveautes-maison.html?#_his_"
}, // ... Many other product details
] 
```

**Key Data Fields Explained:**

**Core Product Information:**

- **id**: Unique offer identifier (4197378169) - essential for tracking specific product offers
- **product\_id**: SKU/product code (tom3ltlinc3cd) - vital for inventory management and cross-referencing
- **name**: Complete product title - crucial for product identification and search optimization
- **url**: Direct link to the product page - enables quick access to full product details

**Pricing Data:**

- **prices.price.value**: Current selling price (789.99 EUR) - core data for competitive pricing strategies
- **prices.striked\_price.value**: Previous/comparison price (1108.6 EUR) - reveals discount strategies and savings
- **prices.price.value\_without\_v\_a\_t**: Price excluding VAT - important for B2B analysis
- **prices.taxes**: Detailed tax breakdown including VAT, DEA, and eco-participation fees

**Visual Content:**

- **media**: Array of product images with multiple sizes (400x400, 300x300, 140x140) - valuable for visual analysis and catalog building
- **media\[].thumbnail**: Thumbnail versions for quick loading
- **media\[].alt**: Image descriptions for accessibility and SEO

**Product Specifications:**

- **bullet\_points**: Key product features with display names and values (dimensions, thickness, density, etc.)
- **product\_condition**: Condition status ("Produit neuf" = New product)
- **brand\_id**: Brand identifier for brand-level analysis

**Categorization:**

- **category\_id**: Product category classification (1000023613)
- **department\_id**: Department classification (11701)

**Customer Engagement:**

- **rating.reviews\_count**: Number of customer reviews - indicates product popularity
- **rating** object: Can include average rating scores when available

**Merchant Information:**

- **seller\_id**: Seller identifier (0 = Cdiscount direct)
- **seller\_name**: Merchant name ("CDISCOUNT")
- **seller\_pool\_id**: Seller group classification

**Commercial Operations:**

- **commercial\_operations**: Array of active promotions, certifications, and special offers
  - Operation details including banner URLs, descriptions, dates, and terms
  - Eco-certifications (e.g., Oeko-Tex textile certification)

**Inventory & Availability:**

- **is\_new**: Boolean indicating if product is new
- **min\_quantity**: Minimum order quantity
- **new\_offer\_quantity** / **used\_offer\_quantity**: Stock availability indicators
- **pre\_order\_start\_date**: Pre-order availability timestamp

**Shipping & Logistics:**

- **free\_shipping**: Shipping cost information ("Livraison gratuite" = Free delivery)
- **is\_fbc**: Fulfillment by Cdiscount indicator

**Additional Flags:**

- **is\_cdav**: Cdiscount à Volonté (subscription program) eligibility
- **is\_downloadable**: Digital product indicator
- **is\_lgan**: Special classification flag
- **from\_url**: Source URL where the product was discovered

### Usage Guidelines and Best Practices

**Step-by-Step Implementation:**

**Step 1: Choose Your Scraping Approach**

**Option A - URL Preparation:**
Navigate to Cdiscount category or search result pages using the website's navigation and filtering features. Copy the complete URLs with all parameters included.

**Option B - Use Search Filters:**
Define your search criteria using the built-in filters:

- Set `keyword` for specific products (e.g., "ordinateur portable", "téléphone", "jouet")
- Set `page` to start from a specific results page

**Step 2: Proxy Configuration**
Set up residential proxies matching your target geographic region (France/FR recommended for optimal access to Cdiscount). Enable `ignore_url_failures` for robust scraping.

**Step 3: Rate Limiting**
Configure reasonable delays between requests to avoid detection. Set `max_retries_per_url` (2-3 recommended) and adjust `max_items_per_url` based on your needs.

**Step 4: Data Validation**
Implement checks to ensure extracted data integrity after collection.

**Optimization Tips:**

**Method Selection:**

- Use URL-based scraping for specific category pages or complex filtered searches
- Use filter-based scraping for simple keyword searches
- Combine both approaches: use filters for product discovery, then URLs for targeted category extraction

**Scraping Strategy:**

- Use residential proxies from France (FR) or nearby European countries for better success rates
- Limit concurrent requests to prevent overwhelming the target server
- Implement data deduplication to handle potential duplicate products across different URLs
- Schedule scraping during off-peak French hours (late night/early morning CET) for improved performance

**Filter Optimization:**

**Keyword Strategy:**

- Use French keywords for better results (e.g., "ordinateur portable" instead of "laptop")
- Try specific product names or model numbers
- Test keyword variations to ensure comprehensive coverage

**Pagination Strategy:**

- Use `page` parameter to systematically collect large datasets
- Start with page 1 and increment for continuous collection
- Monitor for end of results to avoid unnecessary requests

**Advanced Usage:**

**For URL-Based Scraping:**

- Include all query parameters when copying URLs
- Test URLs manually in browser before adding to scraper
- Use URLs from different categories to diversify data

**For Filter-Based Scraping:**

- Start with broad keywords then refine based on results
- Use pagination to collect comprehensive datasets
- Monitor result quality and adjust keywords accordingly

**Error Handling:**

- Monitor retry counts and adjust based on success rates
- Enable `ignore_url_failures` to prevent one failed URL/search from stopping entire job
- Implement fallback mechanisms for critical data fields
- Log failed URLs or searches for manual review and re-processing
- Set up alerts for significant drops in success rates

**Common Issues:**

**Empty Results:**

- For filter-based: Verify keyword is in French
- Try broader or more common keywords
- Check if product category exists on Cdiscount

**Connection Issues:**

- Ensure using French (FR) proxies
- Enable `ignore_url_failures` for temporary issues
- Increase `max_retries_per_url` to 3-5 for better reliability

**URL Format Errors:**

- For URL-based: Ensure URLs are from cdiscount.com
- Include all query parameters and fragments (#*his*, etc.)
- Test URLs in browser before scraping

**Keyword Issues:**

- Use French terminology (e.g., "téléphone" not "phone")
- Try product categories in French (e.g., "electroménager", "jouet")
- Test keyword variations for better coverage

**Proxy Configuration:**

- Always use French (FR) residential proxies for cdiscount.com
- Rotate proxy settings if experiencing blocks
- European proxies (DE, BE, CH) can work as alternatives

**Use Cases:**

- **Price Monitoring**: Track prices across different product categories
- **Market Research**: Collect product data for competitive analysis
- **Inventory Tracking**: Monitor product availability across categories
- **Catalog Management**: Build comprehensive product databases
- **Trend Analysis**: Identify popular products and categories

### Business Applications and Benefits

**Time Efficiency**: Automates hours of manual product research into minutes of automated extraction, enabling teams to focus on analysis rather than data collection.

**Competitive Intelligence**: Provides systematic monitoring of competitor pricing, product launches, and market positioning strategies across France's second-largest e-commerce platform.

**Market Research**: Enables comprehensive analysis of product trends, pricing patterns, and customer preferences in the French market, supporting data-driven business decisions.

**Price Monitoring**: Facilitates dynamic pricing strategies by providing real-time competitor pricing data and historical price trend analysis.

**Product Catalog Management**: Streamlines the process of building comprehensive product databases for comparison sites, affiliate marketing, or internal inventory planning.

### Conclusion

The Cdiscount Product Search Scraper transforms manual product research into an automated, scalable process. By providing comprehensive access to France's second-largest marketplace data, it empowers businesses to make informed decisions based on real-time market intelligence.

Ready to automate your Cdiscount data collection? Deploy this scraper to gain competitive advantages in the French e-commerce market through systematic product intelligence gathering.

## Relate Actors

[**Cdiscount Product Details Page Scraper**](https://apify.com/ecomscrape/cdiscount-product-page-details-scraper): A specialized automated data extraction system designed for in-depth analysis of individual products on France's leading discount marketplace.

## Your feedback

We are always working to improve Actors' performance. So, if you have any technical feedback about Cdiscount Product Search Scraper or simply found a bug, please create an issue on the Actor's Issues tab in Apify Console.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the product list page urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped after the maximum number of retries is reached.

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

Enter the keyword to search for items

## `page` (type: `integer`):

Specify the page number to start scraping from

## `max_items_per_url` (type: `integer`):

Limit the number of items per URL or search filters you want to scrape

## `max_retries_per_url` (type: `integer`):

Limit the number of retries for each URL or search filters if the scrape is detected as a bot or the page fails to load

## `proxy` (type: `object`):

Select proxies to be used by your scraper.

## Actor input object example

```json
{
  "urls": [
    "https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#_his_"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20,
  "max_retries_per_url": 2,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "urls": [
        "https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#_his_"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20,
    "max_retries_per_url": 2,
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ecomscrape/cdiscount-product-search-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 = {
    "urls": ["https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#_his_"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
    "max_retries_per_url": 2,
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ecomscrape/cdiscount-product-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.cdiscount.com/b-109933-jouet-moins-de-2-ans.html#_his_"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20,
  "max_retries_per_url": 2,
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call ecomscrape/cdiscount-product-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ecomscrape/cdiscount-product-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zJ8UoCBfXP8f45baS/builds/r91PYFGn2m7WwoZdm/openapi.json
