# PistonHeads Car Scraper UK (`mrdoe/pistonheads-car-scraper-uk`) Actor

Extracts used car listings from PistonHeads.com's classifieds, including price, year, mileage, engine specs, images, and seller details.

- **URL**: https://apify.com/mrdoe/pistonheads-car-scraper-uk.md
- **Developed by:** [MrDoe](https://apify.com/mrdoe) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

![PistonHeads Car Scraper UK hero](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/pistonheads-car-scraper-uk--hero.png)

**Turn PistonHeads.com's classifieds into structured data in minutes** - no coding, no manual copy-pasting. Get price, year, mileage, engine specs, photos, and seller details for used cars listed on PistonHeads, the UK's enthusiast car marketplace.

### What does PistonHeads Car Scraper UK do?

PistonHeads Car Scraper UK collects used car listings from [PistonHeads.com](https://www.pistonheads.com), a UK classifieds site known for enthusiast, performance, and classic cars alongside everyday used cars. Point it at a make or make+model page and it extracts every current listing shown there - price, spec, photos, and who's selling it.

### Why use PistonHeads Car Scraper UK?

- **Market research** - track pricing and mileage trends for a specific make or model.
- **Sourcing** - build a shortlist of cars matching your exact spec across dealers and private sellers.
- **Price benchmarking** - compare asking prices for a model across trims, years, and sellers.
- **Data enrichment** - pull structured listing data into your own spreadsheet, CRM, or valuation tool.

### How to use PistonHeads Car Scraper UK

![How PistonHeads Car Scraper UK works](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/pistonheads-car-scraper-uk--how-it-works.png)

1. Go to the **Input** tab.
2. Add one or more **Start URLs** - a PistonHeads make page (e.g. `https://www.pistonheads.com/buy/porsche`) or make+model page (e.g. `https://www.pistonheads.com/buy/porsche/911-carrera-992`).
3. Set **Max listings per URL** if you want fewer than the page's full set.
4. Click **Start** and wait for the run to finish.
5. Open the **Dataset** tab to preview, filter, and export your results.

### Input

![PistonHeads Car Scraper UK input options](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/pistonheads-car-scraper-uk--input.png)

| Field | Type | Description |
| --- | --- | --- |
| `startUrls` | Array | One or more PistonHeads make or make+model URLs to scrape. |
| `maxItemsPerUrl` | Integer | Maximum number of listings to keep per start URL (default: 16, the most a single page shows). |

Example input:

```json
{
    "startUrls": [
        { "url": "https://www.pistonheads.com/buy/porsche/911-carrera-992" },
        { "url": "https://www.pistonheads.com/buy/bmw/m3" }
    ],
    "maxItemsPerUrl": 16
}
```

### Output

![PistonHeads Car Scraper UK dataset output](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/pistonheads-car-scraper-uk--output.png)

![PistonHeads Car Scraper UK data fields](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/pistonheads-car-scraper-uk--fields.png)

Each listing is saved as one item in the dataset, for example:

```json
{
    "id": "20895963",
    "url": "https://www.pistonheads.com/buy/listing/20895963",
    "headline": "Porsche 911",
    "price": 90450,
    "currency": "GBP",
    "make": "Porsche",
    "model": "911 Carrera [992]",
    "year": 2019,
    "mileage": 17985,
    "bodyType": "Convertible",
    "colour": "Grey",
    "fuelType": "Petrol",
    "transmissionType": "Auto",
    "engineSize": 3800,
    "enginePower": 444,
    "images": ["https://img.pistonheads.com/Fullsize/porsche/911/porsche-911-1476102954-1.jpg"],
    "sellerName": "Porsche Centre Cambridge",
    "sellerType": "Trade",
    "sellerLocation": "Cambridge, United Kingdom",
    "sourceUrl": "https://www.pistonheads.com/buy/porsche/911-carrera-992",
    "scrapedAt": "2026-08-14T00:00:00.000Z"
}
```

#### Data table

| Field | Description |
| --- | --- |
| `id` / `url` | PistonHeads listing ID and its own page |
| `headline` | The seller's headline for the listing |
| `price`, `currency` | Asking price and currency (GBP) |
| `make`, `model`, `year` | Vehicle identification |
| `mileage`, `bodyType`, `colour`, `fuelType`, `transmissionType` | Core spec |
| `engineSize`, `enginePower` | Engine size (cc) and power (bhp) |
| `images` | Full-size photo URLs |
| `sellerName`, `sellerType`, `sellerLocation` | Who's selling it (dealer/private) and where |
| `sourceUrl` | The start URL this listing was found on |
| `scrapedAt` | ISO timestamp when the item was scraped |

### Pricing / Cost estimation

How much does it cost to scrape PistonHeads listings? Pricing depends on your Apify plan's compute unit rate and how many start URLs you request. Each start URL is a single fast request, so even a large list of makes/models finishes quickly.

### Tips for better runs

- Use make+model URLs (e.g. `/buy/porsche/911-carrera-992`) for a focused pull instead of a whole make, since a make page mixes every model together.
- A single page shows up to 16 current listings - add more start URLs (different makes/models) rather than expecting deeper pagination from one URL.
- Use the Apify **Schedule** feature to re-run this Actor periodically and track new listings or price changes over time.

### FAQ

**Is this legal?** This Actor only collects publicly visible listing data. You are responsible for using the data in accordance with PistonHeads.com's Terms of Service and any applicable laws in your jurisdiction.

**Why did some fields come back empty?** Not every listing includes every field (e.g. some private sellers omit engine specs). The Actor returns `null` for anything that isn't available for a given car.

**Found a bug or have a feature request?** Please use the Issues tab on this Actor's page - feedback directly shapes future updates.

# Actor input Schema

## `startUrls` (type: `array`):

PistonHeads.com pages to scrape. Use a make page (e.g. <code>https://www.pistonheads.com/buy/porsche</code>) or a make + model page (e.g. <code>https://www.pistonheads.com/buy/porsche/911-carrera-992</code>). Each page returns its current listings (up to 16).

## `maxItemsPerUrl` (type: `integer`):

Maximum number of listings to keep from each start URL.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.pistonheads.com/buy/porsche/911-carrera-992"
    }
  ],
  "maxItemsPerUrl": 16
}
```

# Actor output Schema

## `listings` (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 = {
    "startUrls": [
        {
            "url": "https://www.pistonheads.com/buy/porsche/911-carrera-992"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/pistonheads-car-scraper-uk").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 = { "startUrls": [{ "url": "https://www.pistonheads.com/buy/porsche/911-carrera-992" }] }

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/pistonheads-car-scraper-uk").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 '{
  "startUrls": [
    {
      "url": "https://www.pistonheads.com/buy/porsche/911-carrera-992"
    }
  ]
}' |
apify call mrdoe/pistonheads-car-scraper-uk --silent --output-dataset

```

## MCP server setup

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

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/LddT687vud69K63fQ/builds/bKC4r9519ErYuCaCu/openapi.json
