# 2dehands Scraper - Belgian Second-Hand Listings (`bovi/2dehands-scraper`) Actor

Scrape 2dehands.be (2dehands.com) search, category and filtered result pages and single listings. Get prices and price types, condition, attributes, seller, location with coordinates, images and optional full details. Export JSON or CSV.

- **URL**: https://apify.com/bovi/2dehands-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** E-commerce, Lead generation, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 2dehands scraper - belgian second-hand listings

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/actors/running/actors-in-store.md#pay-per-event

## 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 Scraper - Belgian Second-Hand Listings

This Actor scrapes public search, category, filtered, and single-listing pages from 2dehands (2dehands.be, also reachable as 2dehands.com) into a downloadable dataset for price research, market monitoring, and seller research. No 2dehands login, cookie, or API key is needed.

- Compare prices and types such as fixed, minimum bid, see description, and free.
- Collect seller IDs, names, and verified flags for seller research.
- Get each listing's city, country, and coordinates.
- Re-run searches, categories, or filtered URLs on a schedule to track prices.
- Download image URLs and card attributes such as condition, color, storage, and delivery method.

### What you get

List URLs save card records. `scrapeProductDetails` opens each listing page and overlays non-empty detail fields. `productUrls` save readable detail records even when details are off.

For card records, unavailable scalar values are `null`; `images` and `badges` are `[]`, `card_attributes` is `{}`, and `main_image` is `null` without images. `price` is `null` unless the amount is positive or the type is `FREE`. Detail fields from `sku` through `ad_type` are omitted when empty or unavailable. A `productUrls` record always includes `url`, `product_id`, `name`, `scraped_at`, `main_image`, and `currency`; `product_id` and `name` can be `null`.

| Group | Fields | Type | When you get them |
| --- | --- | --- | --- |
| Listing | `url`, `product_id`, `name`, `description` | string | List cards; `description` is a snippet until replaced by detail text and is `null` when unavailable. |
| Price | `price`, `price_type`, `currency` | number; string | List cards. Common types include `FIXED`, `MIN_BID`, `SEE_DESCRIPTION`, and `FREE`; other site values pass through. `currency` is `EUR` unless another code is returned. |
| Images | `main_image`, `images` | string; array of strings | List cards with pictures; detail pages can replace the image list. |
| Place | `location`, `country`, `latitude`, `longitude` | string; number | List cards; values can be `null`. |
| Seller on the card | `seller_id`, `seller_name`, `seller_verified` | integer; string; boolean | List cards; values can be `null`. |
| Attributes | `card_attributes`, `condition`, `color`, `delivery_method` | object; string | List cards; empty or absent values use `{}` or `null`. |
| Status | `listed_age`, `badges`, `category_id`, `l1_category_id`, `reserved`, `scraped_at` | string; array of strings; integer; boolean; ISO 8601 string | List cards; `badges` is `[]` when empty and other values can be `null`. |
| Product details | `sku`, `brand`, `category`, `listed_at`, `seller_type`, `seller_active_since`, `seller_url`, `ad_type`; `in_stock`; `breadcrumbs`, `breadcrumb_urls`; `saved_count`, `view_count` | string; boolean; array of strings; integer | Only after a listing page is opened; empty or unavailable fields are omitted. |

> **Note:** `FREE` with zero cents is saved as price 0. Other types without a positive amount, including `SEE_DESCRIPTION`, have `price` `null`. Do not treat `null` as zero.

### Sample output

Shortened list-card record from a successful run with product details off. Omitted fields: `description`, `images`, `seller_id`, `card_attributes`, `badges`, `category_id`, `l1_category_id`, and `reserved`. Fields not shown are left out of this example.

```json
{
  "url": "https://www.2dehands.be/v/telecommunicatie/mobiele-telefoons-apple-iphone/m2464660882-iphone-13-256-gb-starlight",
  "product_id": "m2464660882",
  "name": "iPhone 13 - 256 GB, starlight",
  "price": 300, "price_type": "MIN_BID", "currency": "EUR",
  "main_image": "https://images.2dehands.com/api/v1/hz-twh-pro-listing/images/9b10f5f3-a2a7-4b37-809b-dbe2b2f5a3bc?rule=ecg_mp_eps$_86.jpg",
  "location": "Boom", "country": "België",
  "latitude": 51.093560085778, "longitude": 4.3728956986743,
  "seller_name": "Anissa", "seller_verified": false,
  "listed_age": "Vandaag", "condition": "Zo goed als nieuw",
  "color": "Wit", "delivery_method": "Ophalen",
  "scraped_at": "2026-11-12T11:47:43.761168+00:00"
}
```

### Pricing

All prices below are for the Free plan. Billing is pay-per-event; a saved listing is one result event.

| Event | When it is charged | Price per event | Per 1,000 / per 10,000 |
| --- | --- | --- | --- |
| `apify-default-dataset-item` | One saved listing with all fields | $0.001 (Free plan) | $1.00 / $10.00 (Free plan) |
| `apify-actor-start` | When the Actor starts: one event per GB of memory, minimum one event | $0.00005 (Free plan) | $0.05 / $0.50 (Free plan) |

The default memory is 512 MB, so one `apify-actor-start` event costs $0.00005 (Free plan). The Apify Free plan includes $5 of monthly platform usage credit; after one start event, that credit covers 4,999 saved listings.

You pay only for the events above. This Actor does not use the Pay per event + usage option, so compute, proxy traffic, and storage are not billed to you separately. A result event is charged only when a record is saved, and `maxResults` caps saved records.

### How to use

The run processes product URLs first, then keyword searches, then list URLs. `maxResults` applies to the whole run.

1. Open the Actor in Apify Console with your Apify account.
2. Enter keywords, list URLs, single listing URLs, or any combination.
3. Set the maximum results, pagination, and product-details options.
4. Keep the proxy default, or set `useApifyProxy` to false for direct requests.
5. Start the run and wait for records in the dataset.
6. Repeat the run with Apify Schedules; daily is a starting point for listing and price checks.

```json
{
  "searchQueries": ["racefiets"],
  "categoryUrls": ["https://www.2dehands.be/l/telecommunicatie/mobiele-telefoons-apple-iphone/f/256-gb/12825/"],
  "maxResults": 100,
  "usePagination": true,
  "scrapeProductDetails": false
}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
| --- | --- | --- |
| `searchQueries` | Each keyword becomes a separate search at `https://www.2dehands.be/q/iphone/`; spaces become `+`. | `[]` |
| `categoryUrls` | Search, category, or filtered URLs. The host is replaced with `www.2dehands.be`. If all URL and keyword inputs are empty, the `iphone` search URL is used. | `[]` |
| `productUrls` | Single listing URLs. Each readable page is saved as a detail record, even when `scrapeProductDetails` is false; the host is replaced with `www.2dehands.be`. | `[]` |
| `maxResults` | Stops after this many saved records. The input range is 1 to 100000; 0 or below saves nothing. Non-numeric values become 50. | `50` |
| `usePagination` | Follows later pages until max results, the reported total, or offset 30000. When false, only the first batch is used. Search requests use page size 30. | `true` |
| `scrapeProductDetails` | Opens each list-card page and merges detail fields; one extra request per listing. It does not change `productUrls`. | `false` |
| `proxyConfiguration` | Uses Apify Proxy when `useApifyProxy` is not false, with a direct request after four failed attempts. When false, requests are direct. | Apify Proxy, group `RESIDENTIAL` |

### Limits and edge cases

Rows reach the dataset one at a time.

| Condition | What you see | What to do |
| --- | --- | --- |
| Nothing to save | The run ends as Succeeded with an empty dataset when `maxResults` is 0 or below, no listings are returned, a list page has no search request, or every product URL fails. | Read the run log; set `maxResults` to at least 1. |
| A product URL cannot be read | That URL is not saved; other inputs continue. | Check the URL in a browser. |
| Pagination is off, reaches offset 30000, or reaches the reported total | Only the first batch is used, or that list URL stops; earlier rows remain. | Turn pagination on or use another URL. |
| The same item ID appears again, or a card has no item ID | The duplicate or card is skipped. | No change needed. |
| No positive price and type is not `FREE` | `price` is `null`. | Use `price_type`. |
| Detail fetch fails during a list run | The card is saved without detail fields. | Retry or pass the URL in `productUrls`. |
| Search results fail on the first page | The rendered page is read once and that URL is not paginated. | Expect only that first page. |
| Search results fail on a later page | The URL stops; earlier rows remain. | Run again or use a narrower URL. |
| A list URL raises an error | The run fails only if no records were saved; otherwise it succeeds with a short dataset and other URLs continue. | Read the run log and check the URL or proxy. |
| Requests fail | Each request waits up to 40 seconds, with four attempts and 1, 2, and 4 second waits, then one direct attempt when a proxy is set. | Keep the residential proxy group or set `useApifyProxy` to false. |
| An abort, timeout, or crash occurs mid-run | Records already pushed stay in the dataset and nothing further is added. | Run again if needed. |

Text values such as `listed_age`, `delivery_method`, and `country` keep the site's Dutch labels, for example `Vandaag`, `Ophalen`, and `België`.

### FAQ

#### How much does it cost to scrape 2dehands?

Each saved listing is charged at $0.001 per result event (Free plan), and 1,000 saved listings are $1.00 (Free plan). Pricing also lists the start event and the 4,999-result Free-plan credit example.

#### Why is the dataset empty?

The run can finish with an empty dataset when `maxResults` is 0 or below, no listings are returned, a list page has no search request, or every product URL fails. Check the run log and set `maxResults` to at least 1. With no URL or keyword inputs, the Actor searches for `iphone`.

#### What should I do when a run fails or stops early?

Read the run log, retry, use another 2dehands URL, or change the proxy setting. A list URL can fail with no saved records; after records are saved, earlier rows remain and other URLs continue.

#### Is scraping 2dehands listings allowed?

The Actor collects public listing data from 2dehands.be, also reachable as 2dehands.com. Whether a use is allowed depends on the source terms and applicable law for your use case; this page gives no legal guarantee.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

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

Keywords to search on 2dehands, for example "iphone" or "racefiets". Each keyword is scraped as a separate search.

## `categoryUrls` (type: `array`):

2dehands search, category or filtered result page URLs.

- Search page: https://www.2dehands.be/q/iphone/
- Category page: https://www.2dehands.be/l/telecommunicatie/mobiele-telefoons-apple-iphone/
- Filtered page: https://www.2dehands.be/l/telecommunicatie/mobiele-telefoons-apple-iphone/f/256-gb/12825/

If no input URLs or queries are given, the search 'iphone' is used.

## `productUrls` (type: `array`):

URLs of single 2dehands listings (https://www.2dehands.be/v/...). Each one is returned as a full detail record.

## `maxResults` (type: `integer`):

Maximum number of listing records to save.

## `usePagination` (type: `boolean`):

Continue through the next result pages of every list URL until Max results is reached. If off, only the first page (30 listings) of each list URL is scraped.

## `scrapeProductDetails` (type: `boolean`):

Open every listing page to add the full description, brand, breadcrumbs, view and saved counts, publication date and seller details. Slower, one extra request per listing.

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

Optional. 2dehands is usually reachable without a proxy; enable Apify Proxy if you get blocked.

## Actor input object example

```json
{
  "searchQueries": [],
  "categoryUrls": [
    "https://www.2dehands.be/q/iphone/"
  ],
  "productUrls": [],
  "maxResults": 50,
  "usePagination": true,
  "scrapeProductDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with the scraped records.

# 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 = {
    "categoryUrls": [
        "https://www.2dehands.be/q/iphone/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/2dehands-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 = {
    "categoryUrls": ["https://www.2dehands.be/q/iphone/"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/2dehands-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 '{
  "categoryUrls": [
    "https://www.2dehands.be/q/iphone/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/2dehands-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/2dehands-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/8kChpJcBizHrN72gh/builds/UhmHG8Fahp8PU19IS/openapi.json
