# 2dehands.be Scraper | $20 / mo | All-In-One (`fatihtahta/2dehands-2ememain-be-scraper`) Actor

Scrape Belgium's top marketplaces: 2dehands.be & 2ememain.be scraper. Target any category and extract rich data: prices, locations, seller info, and all product-specific features. Perfect for market research and competitor analysis.

- **URL**: https://apify.com/fatihtahta/2dehands-2ememain-be-scraper.md
- **Developed by:** [Fatih Tahta](https://apify.com/fatihtahta) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Stats:** 9 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 4.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## 2dehands.be Scraper | All-In-One | $20 / mo

**Slug:** `fatihtahta/2dehands-2ememain-be-scraper`

The **2dehands.be Scraper | All-In-One** is a powerful and reliable tool for extracting detailed listing data from Belgium's largest online marketplaces: **2dehands.be** (Dutch-speaking region) and **2ememain.be** (French-speaking region).

Built for resilience, this actor uses advanced stealth techniques and a real browser to bypass anti-scraping measures, delivering clean and structured data for any search query or category. Whether you're conducting market research, monitoring competitor prices, or analyzing product availability, this scraper provides the comprehensive data you need.

***

### Features 🚀

- **🎯 Dual-Region Scraping**: Target both `2dehands.be` and `2ememain.be` from a single, easy-to-use interface.
- **🔎 Scrape by Keyword or URL**: Start your scraping jobs by either providing a list of search keywords (e.g., "gaming laptop") or a list of direct category/search URLs for more specific targeting.
- **🛡️ Advanced Bot Detection Evasion**:
  - Uses **`playwright-extra` with a stealth plugin** to make the automated browser appear human, effectively bypassing sophisticated anti-scraping challenges.
  - Rotates realistic browser headers and intelligently manages sessions and proxies to ensure a high success rate.
- **🔄 Automatic Pagination**: The scraper automatically navigates through all available pages for your search, ensuring you get every single listing until your limit is reached or the results end.
- \*\* flexible Data Structure\*\*: The output is designed to be universally useful. It captures all core, universal fields for every item and intelligently groups all other category-specific details into a flexible `features` object.
- **🔢 Control Your Output**: Use the **Maximum Listings** input to specify the exact number of items you need per search, saving time and resources.
- **📋 Structured Data Output**: Download your results in clean, ready-to-use formats like JSON, CSV, Excel, or HTML.

***

### What Data Can I Scrape?

This scraper extracts a rich, detailed dataset for each listing.

#### Universal Fields (Available for all items):

- 📝 **Title** & **Full URL**
- 🆔 **Item ID**
- 💰 **Price** & **Price Type** (e.g., Fixed, Bidding)
- 📄 **Full Description**
- 📅 **Date Posted**
- 📍 **Location** (City/Region)
- 🖼️ **Main Image URL**
- 🧑‍💼 **Seller Name** & **Seller ID**
- 🌐 **Source Site** (`2dehands.be` or `2ememain.be`)

#### Product-Specific Features:

A flexible `features` object that contains all other available details. This adapts to any product category. Examples :

- **For Laptops**: `{"condition": "Used", "brand": "Apple", "storage": "512 GB", "memoryRAM": "16 GB"}`
- **For Clothing**: `{"condition": "New", "size": "Maat 36 (S)", "color": "Blauw"}`
- **For Furniture**: `{"condition": "Gebruikt", "type": "Kast", "delivery": "Ophalen"}`

***

### Why Scrape 2dehands.be & 2ememain.be? 🛒

As the leading classifieds platforms in Belgium, these sites are a treasure trove of data for:

- **Market Research**: Analyze the supply, demand, and pricing for any product category across different regions of Belgium.
- **Competitor Analysis**: Monitor what second-hand goods dealers and private sellers are listing, at what price, and in what condition.
- **Price Monitoring**: Track the market value of second-hand goods for resale, insurance, or personal interest.
- **Trend Spotting**: Identify popular and fast-selling items in various categories, from electronics to vintage furniture.

***

## Input and Output

#### Example Input (Using Search Query)

This will search for the first 50 "gaming laptop" listings on `2dehands.be`.

```
{
  "searchQueries": [
    "gaming laptop"
  ],
  "domain": "2dehands.be",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [ "RESIDENTIAL" ]
  }
}
```

#### Example Output

Here is an example of a single scraped item. Notice how the specific details are neatly organized in the features object.

```
{
  "url": "[https://www.2dehands.be/v/computers-en-software/windows-laptops/m2301344952-laptop-nodig-voor-school](https://www.2dehands.be/v/computers-en-software/windows-laptops/m2301344952-laptop-nodig-voor-school)",
  "itemId": "m2301344952",
  "title": "Laptop nodig voor school?",
  "description": "Laptop nodig voor school? Koensecondhandlaptops.be of kom vrijblijvend kijken in lint na afspraak. Stuur me bericht voor afspraak.",
  "price": 260,
  "priceType": "FIXED",
  "location": "Lint",
  "date": "Vandaag",
  "imageUrl": "[https://images.2dehands.com/api/v1/listing-twh-p/images/8e/8e814277-a0fa-45d9-b600-7d15c4581194?rule=ecg_mp_eps$_82.jpg](https://images.2dehands.com/api/v1/listing-twh-p/images/8e/8e814277-a0fa-45d9-b600-7d15c4581194?rule=ecg_mp_eps$_82.jpg)",
  "sellerName": "D.K.",
  "sellerId": 27798286,
  "sourceSite": "2dehands.be",
  "features": {
    "totalmemory": "256 GB",
    "screenSize": "15 inch",
    "delivery": "Ophalen of Verzenden",
    "condition": "Zo goed als nieuw"
  }
}
```

### ⚖️ Is It Legal to Scrape This Website?

This scraper is designed to be ethical and only extracts publicly available data. It does not access private user information. However, you should be aware that your results could contain personal data (e.g., seller names). Personal data is protected by regulations like GDPR, and you should not scrape it unless you have a legitimate reason. Please respect the terms of service of the websites you scrape and consult with a legal professional if you are unsure.

### ❓ Support

If you encounter any problems, have suggestions for new features, or find a bug, please create an issue on the Issues tab of the actor page in the Apify Console. It will be resolved around the clock.

Happy Scraping!
Fatih

# Actor input Schema

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

Enter specific category or search result URLs. Using this input will override the 'Search Queries' field.

## `searchQueries` (type: `array`):

Enter keywords to search for (e.g., 'gaming laptop', 'macbook pro m3'). <strong>Note:</strong> This is ignored if you provide specific Start URLs below.

## `domain` (type: `string`):

Select which site to target. This determines the language and region of the listings.

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

The total number of listings to scrape across all searches. The scraper will stop once this limit is reached. Leave empty to scrape all available listings.

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

Using residential proxies is highly recommended to prevent getting blocked.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.2dehands.be/q/baseball+hat/"
  ],
  "domain": "2dehands.be",
  "maxItems": 50000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "https://www.2dehands.be/q/baseball+hat/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fatihtahta/2dehands-2ememain-be-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": ["https://www.2dehands.be/q/baseball+hat/"] }

# Run the Actor and wait for it to finish
run = client.actor("fatihtahta/2dehands-2ememain-be-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": [
    "https://www.2dehands.be/q/baseball+hat/"
  ]
}' |
apify call fatihtahta/2dehands-2ememain-be-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fatihtahta/2dehands-2ememain-be-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/PhGubzKQ38FMOd2dm/builds/inoxv8KmjlsCuFb9c/openapi.json
