# 2dehands.be Car Scraper (`smtc/2dehands-be-car-scraper`) Actor

Actor that scrapes 2dehands car listings from a search URL and returns normalized JSON records.

- **URL**: https://apify.com/smtc/2dehands-be-car-scraper.md
- **Developed by:** [Arthur Fleck](https://apify.com/smtc) (community)
- **Categories:** Automation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 2dehands.be Car Listings Scraper

### Overview

2dehands.be Car Listings Scraper collects structured data from vehicle listings on 2dehands.be. It is built for automotive search pages and turns filtered 2dehands.be car results into clean, usable records for research, monitoring, analytics, and internal data workflows.

The actor starts from a normal 2dehands.be car search URL, follows the search pagination, opens each vehicle detail page, and extracts the listing data available in the page payload. This includes pricing, seller details, car specifications, images, listing statistics, and grouped vehicle attributes.

The results are saved to an Apify dataset and can be exported in formats such as JSON, JSONL, CSV, Excel, XML, or accessed directly through the Apify API.

### What information does the scraper collect?

The actor can collect fields such as:

🚗 Vehicle title  
🆔 Listing ID  
🔗 Listing URL  
📝 Description  
💰 Price in cents  
💱 Currency  
🏷️ Price type  
👤 Seller name and ID  
🏢 Seller type  
📍 Seller city and country  
🌐 Seller profile URL  
🖼️ Listing images  
📊 View and favorite counts  
🚘 Brand and model  
📅 Construction year  
🛣️ Mileage  
⛽ Fuel type  
⚙️ Transmission  
🌱 Environmental details  
🧾 Vehicle history  
✅ Options and equipment  
📦 Optional raw source data  

### Common use cases

This scraper is useful for anyone who needs reliable Belgian used-car market data. You can use it to:

Monitor vehicle prices on 2dehands.be  
Track available inventory by brand, model, mileage, year, or fuel type  
Analyze dealer and private-seller activity  
Build used-car pricing datasets  
Compare supply trends over time  
Feed automotive dashboards or valuation tools  
Support sourcing, trade-in, and resale decisions  
Create market intelligence reports for the Belgian car market  

### Input

The actor accepts a filtered 2dehands.be car search URL and processes listings from that result set.

```json
{
  "startUrl": "https://www.2dehands.be/l/auto-s/bmw/f/gebruikt/14049/#f:10899|Language:all-languages|offeredSince:Een%20week|PriceCentsFrom:500000|constructionYearFrom:2021|mileageFrom:5001|mileageTo:125001",
  "maxListings": 300,
  "includeContactFields": false,
  "includeSellerProfile": true,
  "includeImages": true,
  "includeRaw": false,
  "requestDelayMs": 500,
  "detailMaxAttempts": 3,
  "maxConsecutiveBlockedDetails": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

### Input fields

`startUrl`\
Required. A 2dehands.be car search-results URL, including any selected filters.

`maxListings`\
Maximum number of vehicle detail pages to process. Default: `300`.

`includeContactFields`\
Includes contact-related fields when available, such as phone number or seller website. Default: `false`.

`includeSellerProfile`\
Fetches additional seller profile metadata. Default: `true`.

`includeImages`\
Includes listing image URLs in the output. Default: `true`.

`includeRaw`\
Adds sanitized raw search and detail payloads for debugging or advanced processing. Default: `true`.

`requestDelayMs`\
Delay between detail-page requests. Default: `500`.

`detailMaxAttempts`\
Maximum attempts for each detail page when the page cannot be fetched or does not contain a parseable listing payload. Default: `3`.

`maxConsecutiveBlockedDetails`\
Stops the run after this many consecutive detail pages return a 2dehands block page. Default: `5`.

`proxyConfiguration`\
Optional proxy settings. For larger runs, enable Apify Proxy if 2dehands starts returning `403` block pages.

### Output

Each dataset item represents one vehicle listing.

```json
{
  "source": "2dehands",
  "scrapedAt": "2026-05-19T10:00:00.000Z",
  "itemId": "m2401319955",
  "url": "https://www.2dehands.be/v/auto-s/bmw/m2401319955-2ctb960-bmw-1-hatch",
  "title": "(2CTB960) BMW 1 HATCH",
  "description": "Vehicle description...",
  "price": {
    "priceCents": 1849000,
    "currency": "EUR",
    "priceType": "FIXED"
  },
  "seller": {
    "id": 123456,
    "name": "Seller name",
    "type": "TRADER",
    "city": "Aartselaar",
    "country": "BE",
    "pageUrl": "https://www.2dehands.be/u/seller-name/123456/"
  },
  "carDetails": {
    "brand": "BMW",
    "model": "1",
    "constructionYear": "2022",
    "condition": "NEW"
  },
  "flatAttributes": {
    "mileage": "44.656 km",
    "fuel": "Benzine",
    "transmission": "Handgeschakeld"
  },
  "images": [
    "https://images.2dehands.com/api/v1/..."
  ],
  "stats": {
    "viewCount": 23,
    "favoritedCount": 1
  }
}
```

### Notes

This actor is focused on car listings from 2dehands.be search-result pages.

It uses the site's search data and listing detail payloads. If 2dehands.be changes its page or API structure, the actor may require updates.

For larger result sets, 2dehands may start returning temporary `403` block pages on detail requests. The actor detects this, skips blocked detail pages, and stops early after repeated consecutive blocks to avoid wasting run time. Enable Apify Proxy and increase `requestDelayMs` for larger jobs.

Contact fields are excluded by default. Enable them only when they are needed for your use case and when your usage complies with applicable rules.

Please make sure your use of the data follows the 2dehands.be terms of service and relevant data protection regulations.

### Custom Development and Support

SMTC is a software development company specializing in web platforms, data extraction, and analytics applications. We help teams turn marketplace data into practical tools, from custom Apify actors and API integrations to dashboards, reporting workflows, and internal business applications.

If you need a tailored scraper, additional data fields, automation, or integration with your existing systems, contact us with your requirements. We can help design, build, and maintain a solution that fits your project.

# Actor input Schema

## `startUrl` (type: `string`):

A 2dehands search results URL, including hash filters.

## `maxListings` (type: `integer`):

Maximum number of detail pages to process.

## `includeContactFields` (type: `boolean`):

Include contact fields such as phone number when present in the listing page data.

## `includeSellerProfile` (type: `boolean`):

Fetch seller profile metadata such as review score and profile pictures.

## `includeImages` (type: `boolean`):

Include listing image URLs in output.

## `includeRaw` (type: `boolean`):

Include sanitized search/detail source payloads for debugging.

## `requestDelayMs` (type: `integer`):

Delay between detail requests.

## `detailMaxAttempts` (type: `integer`):

Maximum attempts for each detail page when the page cannot be fetched or does not contain a parseable listing payload.

## `maxConsecutiveBlockedDetails` (type: `integer`):

Stop the run after this many consecutive detail pages return a 2dehands block page. This prevents long runs from wasting time and cost after the site starts returning 403 responses.

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

Select proxies for requests. Enable Apify Proxy for larger runs if 2dehands starts returning 403 block pages.

## Actor input object example

```json
{
  "startUrl": "https://www.2dehands.be/l/auto-s/bmw/f/gebruikt/14049/#f:10899|Language:all-languages|offeredSince:Een%20week|PriceCentsFrom:500000|constructionYearFrom:2021|mileageFrom:5001|mileageTo:125001",
  "maxListings": 300,
  "includeContactFields": false,
  "includeSellerProfile": true,
  "includeImages": true,
  "includeRaw": true,
  "requestDelayMs": 500,
  "detailMaxAttempts": 3,
  "maxConsecutiveBlockedDetails": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Structured car listing records extracted from 2dehands.be, including listing details, seller data, prices, vehicle attributes, images, and listing statistics.

# 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 = {
    "startUrl": "https://www.2dehands.be/l/auto-s/bmw/f/gebruikt/14049/#f:10899|Language:all-languages|offeredSince:Een%20week|PriceCentsFrom:500000|constructionYearFrom:2021|mileageFrom:5001|mileageTo:125001",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("smtc/2dehands-be-car-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 = {
    "startUrl": "https://www.2dehands.be/l/auto-s/bmw/f/gebruikt/14049/#f:10899|Language:all-languages|offeredSince:Een%20week|PriceCentsFrom:500000|constructionYearFrom:2021|mileageFrom:5001|mileageTo:125001",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("smtc/2dehands-be-car-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 '{
  "startUrl": "https://www.2dehands.be/l/auto-s/bmw/f/gebruikt/14049/#f:10899|Language:all-languages|offeredSince:Een%20week|PriceCentsFrom:500000|constructionYearFrom:2021|mileageFrom:5001|mileageTo:125001",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call smtc/2dehands-be-car-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=smtc/2dehands-be-car-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "2dehands.be Car Scraper",
        "description": "Actor that scrapes 2dehands car listings from a search URL and returns normalized JSON records.",
        "version": "0.6",
        "x-build-id": "WuWnfgeFs5qCcL7HR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/smtc~2dehands-be-car-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-smtc-2dehands-be-car-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/smtc~2dehands-be-car-scraper/runs": {
            "post": {
                "operationId": "runs-sync-smtc-2dehands-be-car-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/smtc~2dehands-be-car-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-smtc-2dehands-be-car-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrl"
                ],
                "properties": {
                    "startUrl": {
                        "title": "Search URL",
                        "type": "string",
                        "description": "A 2dehands search results URL, including hash filters."
                    },
                    "maxListings": {
                        "title": "Max listings",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of detail pages to process.",
                        "default": 300
                    },
                    "includeContactFields": {
                        "title": "Include contact fields",
                        "type": "boolean",
                        "description": "Include contact fields such as phone number when present in the listing page data.",
                        "default": false
                    },
                    "includeSellerProfile": {
                        "title": "Include seller profile",
                        "type": "boolean",
                        "description": "Fetch seller profile metadata such as review score and profile pictures.",
                        "default": true
                    },
                    "includeImages": {
                        "title": "Include images",
                        "type": "boolean",
                        "description": "Include listing image URLs in output.",
                        "default": true
                    },
                    "includeRaw": {
                        "title": "Include raw payloads",
                        "type": "boolean",
                        "description": "Include sanitized search/detail source payloads for debugging.",
                        "default": true
                    },
                    "requestDelayMs": {
                        "title": "Request delay ms",
                        "minimum": 0,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "Delay between detail requests.",
                        "default": 500
                    },
                    "detailMaxAttempts": {
                        "title": "Detail max attempts",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum attempts for each detail page when the page cannot be fetched or does not contain a parseable listing payload.",
                        "default": 3
                    },
                    "maxConsecutiveBlockedDetails": {
                        "title": "Max consecutive blocked details",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Stop the run after this many consecutive detail pages return a 2dehands block page. This prevents long runs from wasting time and cost after the site starts returning 403 responses.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies for requests. Enable Apify Proxy for larger runs if 2dehands starts returning 403 block pages."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
