# LeasingMarkt Search API Documentation

Search public car leasing offers with make, yearly mileage, term, sorting, seller type and page filters. Returns fifteen rich offers per page with rates, images, specifications and the ids needed for the offer detail endpoint. A valid empty result is a successful response.

- **Documentation:** [https://scrappa.co/docs/leasingmarkt-api/leasingmarkt_search](https://scrappa.co/docs/leasingmarkt-api/leasingmarkt_search)
- **API group:** LeasingMarkt API
- **Endpoint:** `GET https://scrappa.co/api/leasingmarkt/v1/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 |
| --- | --- | --- | --- |
| `page` | integer | No | One-based page number. Defaults to 1. |
| `make` | integer | No | Numeric make id, for example 13 BMW or 9 Audi. |
| `yearly_mileage` | integer | No | Included kilometres per year. |
| `term_from` | integer | No | Minimum contract term in months. |
| `term_to` | integer | No | Maximum contract term in months. |
| `sort` | string | No | popularity, rate, rateDesc or new. |
| `seller_type` | string | No | ALL, PRIVATE or BUSINESS. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/leasingmarkt/v1/search?page=1&make=13&sort=rate&seller_type=ALL"
```

## Example response

```json
{
    "success": true,
    "data": {
        "offers": [
            {
                "id": "13378392",
                "variantId": "40413263",
                "monthlyRate": 159,
                "currency": "EUR"
            }
        ],
        "pagination": {
            "currentPage": 1,
            "itemsPerPage": 15,
            "totalPages": 2383,
            "totalResults": 35735,
            "hasMore": true,
            "nextPage": 2
        }
    },
    "meta": {
        "endpoint_family": "search"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is invalid. This response is not billable. |
| 502 | Invalid Source Response | LeasingMarkt returned an unexpected response. 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)
