# Auto Trader UK Dealer Listings API Documentation

Search the current stock of one Auto Trader UK retailer with the same validated filters, sorting and pagination as search. Dealer stock listings are returned with the same rich card fields as the main search.

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

## 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 |
| --- | --- | --- | --- |
| `retailer_id` | string | Yes | Auto Trader retailer id, e.g. 10044570. |
| `postcode` | string | Yes | UK postcode that scopes the search, e.g. SW1A1AA. |
| `price_search_type` | string | No | total or monthly. Defaults to total. |
| `make` | string | No | Vehicle make, e.g. BMW. |
| `min_price` | integer | No | Optional minimum price in GBP. |
| `max_price` | integer | No | Optional maximum price in GBP. |
| `min_year_manufactured` | integer | No | Optional minimum first registration year. |
| `max_year_manufactured` | integer | No | Optional maximum first registration year. |
| `min_mileage` | integer | No | Optional minimum mileage in miles. |
| `max_mileage` | integer | No | Optional maximum mileage in miles. |
| `sort` | string | No | relevance, price_asc, price_desc, distance, mileage, year_dsc, year_asc or most_recent. |
| `page` | integer | No | Result page, 1 to 100. Defaults to 1. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "data": {
        "listings": [],
        "pagination": {
            "page": 1,
            "page_count": 5,
            "total_results": 98,
            "has_more": true
        }
    },
    "meta": {
        "endpoint_family": "dealer_listings"
    }
}
```

## 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)
