# Mascus Search API Documentation

Search public Mascus listings by sector, category, make, model, country and page. Returns listing cards, live facet counts, totals and pagination. Each card carries a listing id that the listing route accepts unchanged. Range filters the source ignores are rejected with 422 instead of returning unfiltered data.

- **Documentation:** [https://scrappa.co/docs/mascus-api/mascus_search](https://scrappa.co/docs/mascus-api/mascus_search)
- **API group:** Mascus API
- **Endpoint:** `GET https://scrappa.co/api/mascus/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 |
| --- | --- | --- | --- |
| `sector` | string | No | construction, cargo-transport, agriculture, materialhandling, forestry or groundscare. Defaults to construction. |
| `category` | string | No | Verified category code, currently excavators. |
| `make` | string | No | Brand code, for example CAT. |
| `model` | string | No | Model name shown in search facets, for example 320, 320 GC or EC 220 E. Requires make. |
| `country` | string | No | de, nl, be, com (United States), uk or pl. Defaults to de. |
| `page` | integer | No | One-based page number. Defaults to 1. |
| `pagesize` | integer | No | Cards per page, 5 to 200. Defaults to 40. |
| `sort` | string | No | price_asc or price_desc. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/mascus/v1/search?sector=construction&category=excavators&country=de&page=1&pagesize=40&make=CAT&model=320+GC"
```

## Example response

```json
{
    "success": true,
    "data": {
        "items": [],
        "totalResults": 0,
        "facets": [],
        "pagination": {
            "page": 1,
            "pagesize": 40,
            "total": 0
        }
    },
    "meta": {
        "endpoint_family": "search"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | An unknown sector, category, country or sort, a model without a make, a page window above 10000, or a range filter the source ignores. This response is not billable. |
| 503 | Bad Gateway | Mascus returned an unexpected response or ignored a requested filter. This response is not billable. |
| 503 | Service Unavailable | Mascus could not be reached. 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)
