# Auto Trader UK Scraper - Cars, Vans & Bikes (`s-r/autotrader-uk-scraper`) Actor

Scrape Auto Trader UK adverts by postcode. Make, model, trim, price, mileage location, distance, seller type, dealer page and photo count, for cars, vans, bikes, motorhomes and more.

- **URL**: https://apify.com/s-r/autotrader-uk-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** E-commerce, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 per-run start fees

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Auto Trader UK Scraper

Vehicle adverts from Auto Trader UK as a clean table. Give it a postcode and
whatever filters you care about, and get one row per advert with the make and
model, the trim, the price, where the vehicle is, how far away it is, whether
the seller is a dealer or a private seller, and how many photos the advert has.

It covers the whole marketplace, not just cars. **What to search** switches
between cars, vans, bikes, motorhomes, caravans, trucks, farm machinery and
plant, and every one returns the same shape of row.

### The postcode is not optional, and it is not just a filter

Every Auto Trader search is relative to a postcode, and that is what makes
`distance_miles` mean anything. The same advert is 9 miles away from one
postcode and 200 from another, so the distance belongs to your search rather
than to the vehicle. `location` is where the vehicle actually is and does not
change.

Add **Radius in miles** to bound the search geographically, or leave it out to
search nationally and let the distance column tell you what is near.

### Filters

All optional, and all of them narrow the search before anything is fetched
rather than filtering afterwards, so a tight search is also a fast one:

- **Make** and **Model**, for example BMW and 3 Series
- **Minimum** and **Maximum price**, in pounds
- **Earliest** and **Latest year** of registration
- **Fuel type**, **Body type**, **Transmission**
- **Radius in miles**

### What you get per advert

- `title`, `subtitle`, `highlight` — the model, the full trim line, and the
  seller's own attention-grabber when there is one
- `price`, `price_text`, `rrp`
- `location`, `distance_miles`
- `seller_type`, `dealer_url` — `TRADE` for a dealer, `PRIVATE` otherwise
- `photo_count`, `is_pre_reg`
- `advert_id`, `url`
- `postcode`, `channel`, `search_page`, `position`, `result_count`

`price` and `price_text` are both there on purpose. The text is exactly what
the advert displays, including the currency; the number is for sorting and
filtering. Where a price is not published, the number is null rather than zero.

`result_count` is how many adverts the search matched in total, which is far
more than any run returns. A national BMW search reports over forty thousand.
Having both numbers tells you what share you are holding.

### Run sizes

Adverts arrive about thirteen to a page. **Maximum adverts** caps the run and
**Maximum pages** is the rail: a broad national search runs to several thousand
pages, so without it a run would try to walk the entire market.

Featured adverts repeat across pages. They are removed by advert id, which is
why a page of thirteen sometimes contributes fewer than thirteen new rows.

### Errors

| Code | Meaning |
|---|---|
| `bad_input` | No postcode supplied |
| `no_results` | The search ran and matched nothing |
| `search_failed` | Auto Trader rejected the search, with its reason quoted |

`no_results` and `search_failed` are deliberately different. A filter
combination nobody is selling and a search that was refused look identical if
you only count rows.

### Related actors

For the US market, use **Autotrader Scraper**, which reads autotrader.com. The
two sites are different companies and share nothing but a name, so the two
actors are separate on purpose.

# Actor input Schema

## `postcode` (type: `string`):

A UK postcode. Every Auto Trader search is relative to one, and it sets the distance on each row.

## `channel` (type: `string`):

Which marketplace to read.

## `make` (type: `string`):

For example BMW. Leave empty for all makes.

## `model` (type: `string`):

For example 3 Series.

## `minPrice` (type: `integer`):

In pounds.

## `maxPrice` (type: `integer`):

In pounds.

## `minYear` (type: `integer`):

Registration year.

## `maxYear` (type: `integer`):

Registration year.

## `fuelType` (type: `string`):

For example Diesel, Petrol, Electric.

## `bodyType` (type: `string`):

For example Hatchback, SUV.

## `transmission` (type: `string`):

Manual or Automatic.

## `radius` (type: `integer`):

How far from the postcode to search.

## `maxItems` (type: `integer`):

Adverts arrive about thirteen to a page.

## `maxPages` (type: `integer`):

A broad search runs to thousands of pages, so this is the rail.

## Actor input object example

```json
{
  "postcode": "M1 1AE",
  "channel": "cars",
  "maxItems": 100,
  "maxPages": 10
}
```

# Actor output Schema

## `adverts` (type: `string`):

One row per advert.

## `summary` (type: `string`):

Adverts returned and how many the search matched.

## `errors` (type: `string`):

Why a search stopped.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "postcode": "SW1A 1AA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/autotrader-uk-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "postcode": "SW1A 1AA" }

# Run the Actor and wait for it to finish
run = client.actor("s-r/autotrader-uk-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postcode": "SW1A 1AA"
}' |
apify call s-r/autotrader-uk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s-r/autotrader-uk-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rEwVNRnQtagg6Vk0q/builds/eJquPEos9HVpTxUw5/openapi.json
