# Auto Trader UK Facets API Documentation

Get every filter facet Auto Trader UK exposes for a postcode-scoped search, with live option counts, facet groups and the supported sort options. Invalid facet names fail non-billable.

- **Documentation:** [https://scrappa.co/docs/autotrader-uk-api/autotrader_uk_facets](https://scrappa.co/docs/autotrader-uk-api/autotrader_uk_facets)
- **API group:** Auto Trader UK API
- **Endpoint:** `GET https://scrappa.co/api/autotrader-uk/v1/facets`

## 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 |
| --- | --- | --- | --- |
| `postcode` | string | Yes | UK postcode that scopes the facets, e.g. SW1A1AA. |
| `price_search_type` | string | No | total or monthly. Defaults to total. |
| `facets` | array | No | Optional subset of facet names. Defaults to the core filter set. |
| `make` | string | No | Optional make that scopes the counts. |
| `model` | string | No | Optional model that scopes the counts. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/autotrader-uk/v1/facets?postcode=SW1A1AA&price_search_type=total"
```

## Example response

```json
{
    "success": true,
    "data": {
        "facets": [],
        "facet_groups": [],
        "sort_options": []
    },
    "meta": {
        "endpoint_family": "facets"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Record Not Found | The requested listing or dealer is no longer available. This response is not billable. |
| 422 | Validation Error | A public parameter or range is invalid. This response is not billable. |
| 502 | Invalid Source Response | Auto Trader UK returned an invalid response. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. 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)
