# Marktplaats Auto's Search API Documentation

Search current car listings on Marktplaats.nl (Netherlands) and 2dehands.be (Belgium) with make, price, fuel, transmission, body, advertiser, location, free-text, sort and pagination filters. A valid empty result is a successful response. Filter facet ids come from the facets endpoint: fuel 473=Benzine and 474=Diesel, transmission 534=Automaat and 535=Handgeschakeld, advertiser 10898=Particulier and 10899=Bedrijf.

- **Documentation:** [https://scrappa.co/docs/marktplaats-autos-api/marktplaats_autos_search](https://scrappa.co/docs/marktplaats-autos-api/marktplaats_autos_search)
- **API group:** Marktplaats Auto's API
- **Endpoint:** `GET https://scrappa.co/api/marktplaats-autos/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | Yes | Marketplace host: www.marktplaats.nl or www.2dehands.be |
| `l1CategoryId` | integer | Yes | Level-1 category id. Auto's = 91. |
| `l2CategoryIds` | array | No | Repeatable make filter ids from the taxonomy endpoint, e.g. 157 for Volkswagen. |
| `offset` | integer | No | Pagination offset, zero-based. Defaults to 0. |
| `limit` | integer | No | Listings per page, 1 to 50. Defaults to 30. |
| `query` | string | No | Free-text search. |
| `sortBy` | string | No | OPTIMIZED, SORT_INDEX, PRICE, LOCATION or ATTRIBUTE. |
| `sortOrder` | string | No | INCREASING or DECREASING. |
| `sortAttribute` | string | No | constructionYear or mileage. Required when sortBy is ATTRIBUTE. |
| `attributesById` | array | No | Repeatable facet value ids, e.g. 473 for Benzine. Fuel: 473, 474. Transmission: 534, 535. Advertiser: 10898, 10899. |
| `attributeRanges` | array | No | Repeatable Key:min:max ranges in cents for PriceCents, or native units for constructionYear and mileage, e.g. PriceCents:10000:30000. |
| `postcode` | string | No | Postcode for the location filter, e.g. 1011 AB. |
| `distanceMeters` | integer | No | Radius in meters around the postcode, e.g. 100000. |
| `searchInTitleAndDescription` | boolean | No | Set to true to restrict the query to title and description. |
| `viewOptions` | string | No | Display mode, e.g. list-view. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/marktplaats-autos/search?domain=www.marktplaats.nl&l1CategoryId=91&offset=0&limit=30"
```

## Example response

```json
{
    "success": true,
    "data": {
        "listings": [
            {
                "itemId": "m2451834523",
                "title": "Audi Q5 2.0 Tfsi Quattro S-tronic",
                "priceInfo": {
                    "priceCents": 695000,
                    "priceType": "MIN_BID"
                },
                "location": {
                    "cityName": "Castricum",
                    "countryAbbreviation": "NL"
                },
                "images": [
                    "https://images.marktplaats.com/api/v1/hz-mp-pro-listing/images/af081d77-a130-4965-85e6-5edd9d742e1c?rule=ecg_mp_eps$_82.jpg"
                ],
                "seller": {
                    "sellerId": 7796188,
                    "sellerName": "Richard",
                    "isVerified": false
                },
                "categoryId": 93,
                "url": "https://www.marktplaats.nl/v/auto-s/audi/m2451834523-audi-q5-2-0-tfsi-quattro-s-tronic"
            }
        ],
        "facets": [
            {
                "type": "AttributeGroupFacet",
                "key": "fuel",
                "values": [
                    {
                        "attributeValueId": 473,
                        "attributeValueLabel": "Benzine",
                        "histogramCount": 166490
                    }
                ]
            }
        ],
        "totalResultCount": 268481,
        "maxAllowedPageNumber": 167,
        "pagination": {
            "offset": 0,
            "limit": 30,
            "hasMore": true,
            "nextOffset": 30
        }
    },
    "meta": {
        "endpoint_family": "search"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | A public parameter is invalid or an unsupported filter was sent. This response is not billable. |  |
|  | Marktplaats did not return usable data for this request. This response is not billable. |  |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
