# Autotrader UK Scraper 🚗 (`shahidirfan/autotrader-uk-scraper`) Actor

Extract car listings from Autotrader UK at scale—prices, specs, dealer info, and VIN data. Perfect for market research, competitive pricing analysis, inventory monitoring, and automotive data collection.

- **URL**: https://apify.com/shahidirfan/autotrader-uk-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Autotrader UK Car Scraper

Extract car listings from Autotrader UK — the UK's largest automotive marketplace. Scrape prices, specifications, mileage, images, seller information, and more from any search or filter combination.

---

### What It Does

This actor scrapes car listings from [autotrader.co.uk](https://www.autotrader.co.uk) and returns structured data including price, year, mileage, location, seller type, images, and Autotrader's own price rating. Simply paste a search URL or specify your filters (make, model, postcode, year range, etc.) to start collecting data.

---

### Features

- Scrape car listings by **URL**, **make/model**, **postcode**, **price range**, **year**, or **keyword**
- Extract all key listing details: price, year, mileage, specification, location, seller type, and images
- Supports **pagination** to collect hundreds or thousands of listings
- Returns **Autotrader's price rating** (Great/Good/Fair/Low) for each listing
- Provides **clean image URLs** ready to use (no placeholder tokens)
- Detects **write-off category markers** on listings
- Works with any valid Autotrader UK car search URL

---

### Use Cases

- **Price research** — Compare asking prices for specific makes and models
- **Market analysis** — Track supply and demand across regions
- **Dealer intelligence** — Monitor competitor stock and pricing
- **Investment decisions** — Find undervalued vehicles using price ratings
- **Data journalism** — Analyse UK car market trends
- **Fleet procurement** — Source vehicles meeting specific requirements

---

### Input Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `startUrl` | String | Full Autotrader UK search URL. When provided, all URL filters are auto-extracted and individual parameters below are ignored. |
| `postcode` | String | UK postcode for location-based search (e.g. `SW1A 1AA`, `M1 1AE`). Used when no URL is provided. |
| `make` | String | Car brand (e.g. `BMW`, `Ford`, `Toyota`). Used when no URL is provided. |
| `model` | String | Car model (e.g. `3 Series`, `Fiesta`). Used when no URL is provided. |
| `keyword` | String | Free-text keyword (e.g. `sunroof`, `heated seats`). |
| `results_wanted` | Integer | Maximum number of listings to collect. Default: `20`. |
| `max_pages` | Integer | Maximum pages to scrape (~28 listings per page). Default: `5`. |
| `proxyConfiguration` | Object | Proxy settings. Residential proxies recommended. |

---

### Output Fields

Each listing in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `advertId` | String | Unique Autotrader listing ID |
| `title` | String | Full listing title (make, model, variant) |
| `specification` | String | Engine size, transmission, and variant details |
| `attentionGrabber` | String | Short marketing tagline |
| `price` | String | Listed price (e.g. `£15,995`) |
| `rrp` | String | Recommended Retail Price (if available) |
| `discount` | String | Savings amount if price is below RRP |
| `monthlyPrice` | String | Monthly finance payment amount |
| `initialPayment` | String | Required deposit for finance |
| `termMonths` | Integer | Duration of the finance agreement in months |
| `year` | String | Registration year |
| `mileage` | String | Vehicle mileage |
| `priceRating` | String | Autotrader price rating: `great`, `good`, `fair`, or `low` |
| `location` | String | Seller location |
| `distance` | String | Distance from searched postcode (if provided) |
| `sellerType` | String | `DEALER` or `PRIVATE` |
| `dealerRating` | Number | Overall dealer review rating (out of 5) |
| `url` | String | Direct link to the Autotrader listing |
| `image` | String | URL of the primary photo |
| `images` | Array | All available image URLs |
| `numberOfImages` | Integer | Total photo count |
| `hasWriteOff` | Boolean | Present and `true` if vehicle has a write-off marker |
| `tags` | Array | Comprehensive list of vehicle tags (fuel type, transmission, etc.) |

---

### Usage Examples

#### By URL

Paste any Autotrader UK search URL directly:

```json
{
    "startUrl": "https://www.autotrader.co.uk/car-search?advertising-location=at_cars&channel=cars&make=BMW&model=3+Series&postcode=SW1A+1AA&year-from=2020",
    "results_wanted": 50,
    "max_pages": 10
}
````

#### By Make and Model

```json
{
    "make": "Toyota",
    "model": "Yaris",
    "postcode": "M1 1AE",
    "yearFrom": 2019,
    "results_wanted": 30
}
```

#### By Keyword

```json
{
    "keyword": "electric",
    "postcode": "E1 6AN",
    "maxPrice": 30000,
    "results_wanted": 40
}
```

***

### Sample Output

```json
{
    "advertId": "202503221234567",
    "title": "BMW 3 Series 2.0 320d M Sport",
    "specification": "2.0 320d M Sport Auto Euro 6 (s/s) 4dr",
    "attentionGrabber": "Full BMW Service History, Low Mileage",
    "price": "£18,495",
    "rrp": "£19,995",
    "discount": "£1,500",
    "monthlyPrice": "£299",
    "initialPayment": "£2,000",
    "termMonths": 48,
    "year": "2021 (70 reg)",
    "mileage": "34,000 miles",
    "priceRating": "good",
    "location": "London",
    "distance": "5 miles",
    "sellerType": "DEALER",
    "dealerRating": 4.8,
    "url": "https://www.autotrader.co.uk/car-details/202503221234567",
    "image": "https://m.atcdn.co.uk/a/media/800x600/12345abc.jpg",
    "images": [
        "https://m.atcdn.co.uk/a/media/800x600/12345abc.jpg",
        "https://m.atcdn.co.uk/a/media/800x600/12345def.jpg"
    ],
    "numberOfImages": 12,
    "tags": [
        "2021 (70 reg)",
        "Saloon",
        "34,000 miles",
        "2.0L",
        "188BHP",
        "Automatic",
        "Diesel"
    ]
}
```

***

### Tips

- **Use a URL**: The easiest way is to search on Autotrader UK manually, apply all your filters, then paste the full URL into the `startUrl` field.
- **Postcode matters**: Autotrader UK uses postcode for distance sorting. `SW1A 1AA` (London) is a good general default.
- **Price rating**: The `priceRating` field (`great`, `good`, `fair`, `low`) is Autotrader's own assessment — use it to filter for undervalued vehicles.
- **Images**: Replace `400x300` in image URLs with other dimensions like `800x600` for larger photos.
- **Proxy**: Using residential proxies via the proxy configuration reduces the chance of rate limiting on large runs.

***

### Integrations

This actor works seamlessly with the Apify ecosystem:

- **Apify API** — Access data programmatically via the REST API
- **Webhooks** — Trigger downstream workflows when a run completes
- **Apify Scheduler** — Run on a schedule to monitor price changes over time
- **Google Sheets** — Export directly to spreadsheets via Apify's Google Sheets integration
- **Make / Zapier** — Connect to 1,000+ apps for automated workflows

***

### FAQ

**Does this work with all Autotrader UK URL types?**
Yes — any `autotrader.co.uk/car-search` URL is supported. The actor parses all standard filter parameters from the URL automatically.

**Can I scrape motorbikes or vans?**
This actor is optimised for car listings. Other vehicle types may return limited data.

**How many listings can I scrape?**
Each page contains approximately 28 listings. Use `results_wanted` and `max_pages` to control the total. There is no strict upper limit.

**Do I need a proxy?**
For small runs (under 100 results), no proxy is required. For larger runs or repeat scraping, residential proxies are recommended to avoid rate limiting.

***

### Legal Notice

This actor is designed for personal research, price comparison, and market analysis. Usage must comply with [Autotrader UK's Terms of Service](https://www.autotrader.co.uk/content/terms/terms-conditions). Do not use scraped data for commercial redistribution without appropriate permissions. The actor does not circumvent any login or paywall mechanisms — it only accesses publicly available listing data.

# Actor input Schema

## `startUrl` (type: `string`):

Paste a full Autotrader UK car-search URL. If provided, all URL filters (make, model, year, postcode, etc.) are extracted automatically and individual parameter fields below are ignored.

## `results_wanted` (type: `integer`):

Maximum number of car listings to collect.

## `max_pages` (type: `integer`):

Maximum number of result pages to scrape. Each page contains ~28 listings.

## `proxyConfiguration` (type: `object`):

Use Apify Proxy for reliable scraping. Residential proxies recommended for best results.

## Actor input object example

```json
{
  "startUrl": "https://www.autotrader.co.uk/car-search?advertising-location=at_cars&channel=cars&homeDeliveryAdverts=exclude&make=BMW&postcode=SW1A%201AA&year-to=2026",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrl": "https://www.autotrader.co.uk/car-search?advertising-location=at_cars&channel=cars&homeDeliveryAdverts=exclude&make=BMW&postcode=SW1A%201AA&year-to=2026",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/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 = {
    "startUrl": "https://www.autotrader.co.uk/car-search?advertising-location=at_cars&channel=cars&homeDeliveryAdverts=exclude&make=BMW&postcode=SW1A%201AA&year-to=2026",
    "results_wanted": 20,
    "max_pages": 5,
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrl": "https://www.autotrader.co.uk/car-search?advertising-location=at_cars&channel=cars&homeDeliveryAdverts=exclude&make=BMW&postcode=SW1A%201AA&year-to=2026",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/autotrader-uk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/autotrader-uk-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Autotrader UK Scraper 🚗",
        "description": "Extract car listings from Autotrader UK at scale—prices, specs, dealer info, and VIN data. Perfect for market research, competitive pricing analysis, inventory monitoring, and automotive data collection.",
        "version": "0.0",
        "x-build-id": "i7qRNPZpgN9w4YlyD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~autotrader-uk-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-autotrader-uk-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~autotrader-uk-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-autotrader-uk-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~autotrader-uk-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-autotrader-uk-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "Paste a full Autotrader UK car-search URL. If provided, all URL filters (make, model, year, postcode, etc.) are extracted automatically and individual parameter fields below are ignored."
                    },
                    "results_wanted": {
                        "title": "Maximum results",
                        "type": "integer",
                        "description": "Maximum number of car listings to collect.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum pages",
                        "type": "integer",
                        "description": "Maximum number of result pages to scrape. Each page contains ~28 listings.",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for reliable scraping. Residential proxies recommended for best results.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
