# Marktplaats.nl Scraper (`dadhalfdev/marktplaats-scraper`) Actor

Scrape Marktplaats.nl listings. Use filters (keyword, category, price, postcode) or paste a search URL — the URL wins when set. Returns title, price, location, seller, and photos.

- **URL**: https://apify.com/dadhalfdev/marktplaats-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

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

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

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## 🛒 Marktplaats.nl Scraper

Want to find deals on [Marktplaats](https://www.marktplaats.nl/) or analyse the Dutch second-hand market? This scraper makes it super easy!

Use **structured filters** (keyword, category, price, postcode) — structured filters work better for AI agents — **or** paste an **`input_url`** straight from your browser once you've already filtered on Marktplaats. When `input_url` is set it overrides the filters below. Either way, you get listing data with prices, location, seller, and photos as CSV or JSON.

### 💡 Perfect for...

- **Buyers:** Monitor prices for bikes, phones, furniture, cars, and more.
- **Sellers & Resellers:** Track comparable listings and competitor pricing.
- **Market Research:** Analyse supply and pricing across Dutch categories.
- **Data Analysts:** Export clean structured data for dashboards and models.
- **🤖 AI Agents:** Power bots and OpenClaw workflows with real-time Marktplaats listings.
- **📚 RAG Systems:** Feed listing titles, prices, and descriptions into retrieval pipelines.
- **🔗 AI Workflows:** Plug into LangChain, AutoGPT, CrewAI, and similar stacks.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a Marktplaats results URL (`input_url`) if you already filtered in the browser — hash filters like `#PriceCentsFrom:…` are supported — or use structured filters (better for AI agents). `input_url` always wins when set; leave it empty when you want filters to apply.
- 🎯 **Website-Matched Search:** Uses Marktplaats’ own `/lrp/api/search` endpoint (same data as the site).
- 📍 **Distance Search:** Optional Dutch postcode + radius in km.
- 🗂️ **Categories:** All major L1 categories, plus optional L2 slug (e.g. `bmw` under Auto's).
- 🇳🇱 **Built for the Netherlands:** Nationwide Marktplaats inventory.

### 📦 What's inside the data?

For every listing you will get:
- **Core:** `id`, `url`, `title`, `description`, `date`, `category_id`
- **Pricing:** `price` (EUR), `price_cents`, `price_type`, `price_currency`
- **Location:** `city`, `country`, `latitude`, `longitude`
- **Seller:** `seller_id`, `seller_name`, `seller_verified`
- **Media / meta:** `image_url`, `image_urls`, `attributes`, `priority_product`, `traits`

### 🛠️ Sort options

- **`optimized`** – Relevance *(default)*
- **`date_desc` / `date_asc`** – Newest / oldest
- **`price_asc` / `price_desc`** – Price low→high / high→low
- **`year_desc` / `year_asc`** – Construction year (cars & similar)
- **`mileage_asc` / `mileage_desc`** – Mileage (cars & similar)

### 🚀 Quick start

**Option A — Input URL**
1. Open [Marktplaats](https://www.marktplaats.nl/), apply filters, copy the results URL (hash filters are OK).
2. Paste it into `input_url` and leave other filters empty / ignored.
3. Set `max_listings` and click **Start**.

**Option B — Structured filters (better for AI agents)**
1. Leave `input_url` empty.
2. Set `query` and/or `category` (+ optional subcategory, price, postcode).
3. Set `max_listings` (up to 2000) and click **Start**.

Export CSV, Excel, or JSON when done.

---

#### Tech details for developers 🧑‍💻

**Input Example (filters):**
```json
{
  "query": "fiets",
  "category": "fietsen-en-brommers",
  "price_min": 50,
  "price_max": 500,
  "sort_by": "price_asc",
  "max_listings": 100
}
````

**Input Example (URL override):**

```json
{
  "input_url": "https://www.marktplaats.nl/l/auto-s/bmw/#PriceCentsFrom:1000000|PriceCentsTo:2500000|sortBy:PRICE|sortOrder:INCREASING",
  "max_listings": 50
}
```

**Output Example:**

```json
{
  "id": "m2422760822",
  "url": "https://www.marktplaats.nl/v/auto-s/bmw/m2422760822-bmw-1-serie-...",
  "title": "BMW 1-serie 118i High Executive",
  "price": 17890.0,
  "price_cents": 1789000,
  "price_type": "FIXED",
  "price_currency": "EUR",
  "city": "Amsterdam",
  "seller_name": "Autobedrijf Example",
  "image_url": "https://images.marktplaats.com/..."
}
```

# Actor input Schema

## `input_url` (type: `string`):

Optional. Paste any Marktplaats search/results URL to override the filters below (including hash filters like #PriceCentsFrom:…). Must be left empty to use structured filters (better for AI agents).

## `query` (type: `string`):

Keyword search (same as Marktplaats search box), e.g. fiets, iphone, sofa. Ignored when input\_url is set.

## `category` (type: `string`):

Top-level Marktplaats category. Leave empty to search all categories. Ignored when input\_url is set.

## `subcategory` (type: `string`):

Optional L2 slug from the Marktplaats URL path (e.g. bmw under auto-s, or mountainbikes). Ignored when input\_url is set.

## `price_min` (type: `integer`):

Minimum price in euros. Ignored when input\_url is set.

## `price_max` (type: `integer`):

Maximum price in euros. Ignored when input\_url is set.

## `postcode` (type: `string`):

Dutch postcode for distance search (e.g. 1012AB). Use with distance\_km. Ignored when input\_url is set.

## `distance_km` (type: `integer`):

Search radius in kilometres around the postcode. Ignored when input\_url is set.

## `sort_by` (type: `string`):

Result order. Ignored when input\_url is set.

## `max_listings` (type: `integer`):

How many listings to return (1–2000).

## Actor input object example

```json
{
  "query": "fiets",
  "category": "",
  "sort_by": "optimized",
  "max_listings": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of scraped listings using the dataset 'overview' view.

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

All scraped listings from the default dataset without view transformation.

# 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 = {
    "query": "fiets",
    "subcategory": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/marktplaats-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 = {
    "query": "fiets",
    "subcategory": "",
}

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/marktplaats-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 '{
  "query": "fiets",
  "subcategory": ""
}' |
apify call dadhalfdev/marktplaats-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Marktplaats.nl Scraper",
        "description": "Scrape Marktplaats.nl listings. Use filters (keyword, category, price, postcode) or paste a search URL — the URL wins when set. Returns title, price, location, seller, and photos.",
        "version": "0.1",
        "x-build-id": "7ddn424d5x3mZsudI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dadhalfdev~marktplaats-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dadhalfdev-marktplaats-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/dadhalfdev~marktplaats-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dadhalfdev-marktplaats-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/dadhalfdev~marktplaats-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dadhalfdev-marktplaats-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",
                "properties": {
                    "input_url": {
                        "title": "Input URL",
                        "type": "string",
                        "description": "Optional. Paste any Marktplaats search/results URL to override the filters below (including hash filters like #PriceCentsFrom:…). Must be left empty to use structured filters (better for AI agents)."
                    },
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Keyword search (same as Marktplaats search box), e.g. fiets, iphone, sofa. Ignored when input_url is set."
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "",
                            "auto-s",
                            "fietsen-en-brommers",
                            "huis-en-inrichting",
                            "tuin-en-terras",
                            "computers-en-software",
                            "telecommunicatie",
                            "audio-tv-en-foto",
                            "witgoed-en-apparatuur",
                            "kleding-dames",
                            "kleding-heren",
                            "kinderen-en-baby-s",
                            "hobby-en-vrije-tijd",
                            "sport-en-fitness",
                            "doe-het-zelf-en-verbouw",
                            "dieren-en-toebehoren",
                            "boeken",
                            "spelcomputers-en-games",
                            "motoren",
                            "auto-onderdelen",
                            "auto-diversen",
                            "caravans-en-kamperen",
                            "huizen-en-kamers",
                            "diensten-en-vakmensen",
                            "vacatures",
                            "antiek-en-kunst",
                            "verzamelen",
                            "zakelijke-goederen",
                            "diversen",
                            "cd-s-en-dvd-s",
                            "contacten-en-berichten",
                            "muziek-en-instrumenten",
                            "postzegels-en-munten",
                            "sieraden-tassen-en-uiterlijk",
                            "tickets-en-kaartjes",
                            "vakantie",
                            "watersport-en-boten"
                        ],
                        "type": "string",
                        "description": "Top-level Marktplaats category. Leave empty to search all categories. Ignored when input_url is set.",
                        "default": ""
                    },
                    "subcategory": {
                        "title": "Subcategory slug",
                        "type": "string",
                        "description": "Optional L2 slug from the Marktplaats URL path (e.g. bmw under auto-s, or mountainbikes). Ignored when input_url is set."
                    },
                    "price_min": {
                        "title": "Minimum price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price in euros. Ignored when input_url is set."
                    },
                    "price_max": {
                        "title": "Maximum price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price in euros. Ignored when input_url is set."
                    },
                    "postcode": {
                        "title": "Postcode",
                        "type": "string",
                        "description": "Dutch postcode for distance search (e.g. 1012AB). Use with distance_km. Ignored when input_url is set."
                    },
                    "distance_km": {
                        "title": "Distance (km)",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Search radius in kilometres around the postcode. Ignored when input_url is set."
                    },
                    "sort_by": {
                        "title": "Sort by",
                        "enum": [
                            "optimized",
                            "date_desc",
                            "date_asc",
                            "price_asc",
                            "price_desc",
                            "year_desc",
                            "year_asc",
                            "mileage_asc",
                            "mileage_desc"
                        ],
                        "type": "string",
                        "description": "Result order. Ignored when input_url is set.",
                        "default": "optimized"
                    },
                    "max_listings": {
                        "title": "Maximum number of listings",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "How many listings to return (1–2000).",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
