# Marktplaats API — search Dutch and Belgian classifieds (Marktplaats, 2dehands, 2ememain): listings, listing detail, categories and seller inventory

> Keyword or category search with filters, sort, location, offset pagination (limit=30).
> ReefAPI engine `marktplaats` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/marktplaats/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /marktplaats/v1/search — 1 credit
Keyword or category search with filters, sort, location, offset pagination (limit=30).

**Parameters:**
- `query` (string, optional) — Free-text keyword. (search needs query OR l1/l2_category_id.)
- `site` (enum, optional, default "nl") — Marketplace edition — each is a separate site/country. [one of: nl, be_nl, be_fr]
- `l1_category_id` (integer, optional) — Top-level category id (discover via the categories action).
- `l2_category_id` (integer, optional) — Sub-category id under l1 (discover via the categories action).
- `sort_by` (enum, optional) — Sort field. Common Adevinta keys shown; others accepted. [one of: OPTIMIZED, PRICE, DATE]
- `sort_order` (enum, optional) — Sort direction. [one of: INCREASING, DECREASING]
- `price_from` (integer, optional) — Minimum price IN CENTS (Marktplaats uses cents: 1000 = EUR 10).
- `price_to` (integer, optional) — Maximum price IN CENTS (5000 = EUR 50).
- `postcode` (string, optional) — Postal code center for a distance search.
- `distance_meters` (integer, optional) — Search radius in METERS around postcode (10000 = 10 km).
- `offset` (integer, optional, default 0) — Pagination offset (skip N, page size 30). Page with meta.next_offset.

**Returns:** listings[] (price, condition, location, seller, images), facets, total, offset, has_more, next_offset

**Example request body:**
```json
{
  "query": "iphone",
  "site": "nl"
}
```

### POST /marktplaats/v1/listing — 1 credit
Listing detail by item_id and/or vip_url; enriched with full product details (price, availability, specs).

**Parameters:**
- `item_id` (string, optional) — Marktplaats item id, e.g. m2407996125. (listing needs item_id OR vip_url.)
- `vip_url` (string, optional) — Site-relative VIP page path (alternative to item_id).
- `site` (enum, optional, default "nl") — Marketplace edition — each is a separate site/country. [one of: nl, be_nl, be_fr]

**Returns:** listing{} — search row merged with full product details (price, availability, images)

**Example request body:**
```json
{
  "item_id": "m2407996125",
  "site": "nl"
}
```

### POST /marktplaats/v1/categories — 1 credit
Category tree from search facets, or browse a category (l1/l2) with listings.

**Parameters:**
- `query` (string, optional) — Optional keyword to scope the category tree.
- `site` (enum, optional, default "nl") — Marketplace edition — each is a separate site/country. [one of: nl, be_nl, be_fr]
- `l1_category_id` (integer, optional) — Browse this top-level category's listings.
- `l2_category_id` (integer, optional) — Browse this sub-category's listings.
- `offset` (integer, optional, default 0) — Pagination offset (skip N, page size 30). Page with meta.next_offset.

**Returns:** search_category_options, categories_by_id, facet_categories, listings[], sort_options

### POST /marktplaats/v1/seller_listings — 1 credit
Active listings for a seller; offset pagination via seller-name LRP search (name auto-resolved from profile when omitted).

**Parameters:**
- `seller_id` (integer, required) — Marktplaats seller id (from a listing's seller.seller_id).
- `seller_name` (string, optional) — Seller display name — speeds resolution; auto-resolved when omitted.
- `site` (enum, optional, default "nl") — Marketplace edition — each is a separate site/country. [one of: nl, be_nl, be_fr]
- `offset` (integer, optional, default 0) — Pagination offset (skip N, page size 30). Page with meta.next_offset.

**Returns:** listings[] for this seller, seller_id, seller_name, total, has_more, next_offset

## More
- Try it live, no code: https://reefapi.com/playground?engine=marktplaats
- Human docs page: https://reefapi.com/docs/marktplaats
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
