# Gumtree Cars & Vans Scraper (`dadhalfdev/gumtree-scraper`) Actor

Scrape used cars and vans from gumtree.com. Paste a search URL from your browser, or use filters (make, model, price, mileage, year, fuel, body, transmission). Returns price, mileage, year, specs, location, and listing URL.

- **URL**: https://apify.com/dadhalfdev/gumtree-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 9 total users, 3 monthly users, 99.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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

## 🚗 Gumtree Cars & Vans Scraper

Want to find the perfect used car or van, or analyze the UK automotive market? This scraper makes it super easy!

Paste an **`input_url`** from your browser once you've already filtered on Gumtree, **or** use **structured filters** (make, model, price, mileage, year, fuel, body, transmission, etc.) — structured filters work better for AI agents. When `input_url` is set it overrides the filters. Either way, you get up to 1000 used **car** or **van** listings from [gumtree.com](https://www.gumtree.com/) with pricing, specs, and location as CSV or JSON.

### 💡 Perfect for...

- **Car & Van Buyers:** Monitor the market for the best deals on your next vehicle in the UK.
- **Dealerships:** Keep an eye on competitors' pricing and inventory to stay competitive.
- **Market Research:** Analyze trends in the UK used car and van market (average prices, popular models, mileage vs. price).
- **Data Analysts:** Download clean, structured data for visualizations, dashboards, or predictive pricing models.
- **🤖 AI Agents:** Power your autonomous agents with real-time Gumtree listings. Perfect for OpenClaw workflows and bots tracking specific vehicles.
- **📚 RAG Systems:** Feed detailed vehicle specifications and pricing into Retrieval-Augmented Generation pipelines to answer complex queries about the automotive market.
- **🔗 AI Workflows:** Integrate seamlessly with LangChain, AutoGPT, CrewAI, and other AI frameworks that need structured automotive data.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a Gumtree search URL (`input_url`) if you already filtered in the browser, or use structured filters (better for AI agents). `input_url` always wins when set.
- 🎯 **Website-Matched Filters:** Make, model, fuel, body, transmission, colour, seller, price, mileage, and year use the **same option values as gumtree.com**.
- 🚚 **Cars and Vans:** Switch `vehicle_type` between used cars and used vans.
- ⚙️ **Rich Listings:** Extracts price, year, mileage, fuel, body, transmission, colour, seller type, location, and images out of the box.
- ⏱️ **Sorting Options:** Traverse results by relevance, newest, price, or distance — same sort values as on the site.
- 🇬🇧 **Built for the UK:** Optional postcode/location + distance (use Nationwide for countrywide results).

### 📦 What's inside the data?

For every single listing, you will get:

- **Core Details:** `id`, `title`, `url`, `image`, `images`, `photo_count`, `short_description`
- **Technical Specs:** `make`, `model`, `fuel_type`, `body_type`, `transmission`, `colour`, `doors`, `seats`, `engine_size`, `mileage`, `year`, `registration`
- **Pricing:** `price`, `price_text`
- **Seller & Place:** `seller_type`, `seller_id`, `pro_account`, `location`, `postcode`, `distance`, `distance_miles`
- **Context:** `vehicle_type` (`cars` / `vans`), `posted_date`, `featured`, `urgent`, `status`

### 🛠️ Sort options

You can tell the scraper what order to read the listings in using the `sort_by` parameter (same values as Gumtree):

- **`relevance`** – Most relevant first
- **`date`** – Most recent first *(default)*
- **`price_lowest_first`** – Price: Low to High
- **`price_highest_first`** – Price: High to Low
- **`distance`** – Nearest first

### 🚀 Quick start

**Option A — Input URL**

1. Open [Gumtree cars](https://www.gumtree.com/cars-vans-motorbikes/cars) or [vans](https://www.gumtree.com/cars-vans-motorbikes/vans), apply filters in the browser, copy the results URL — ideally `https://www.gumtree.com/cars-vans-motorbikes/cars/...` or `/cars-vans-motorbikes/vans/...`.
2. Paste it into `input_url`.
3. Set `max_cars` and click **Start**.

**Option B — Structured filters (better for AI agents)**

1. Leave `input_url` empty.
2. Choose **Used cars** or **Used vans**.
3. Type a make and model, plus any optional filters (same values as on Gumtree).
4. Optionally set `search_location` + `distance` (Nationwide = `1000`).
5. Choose `sort_by`, set `max_cars` (up to 1000).
6. Click **Start** and export CSV, Excel, or JSON when done.

***

#### Tech details for developers 🧑‍💻

**Input Example (structured filters):**

```json
{
  "vehicle_type": "cars",
  "make": "bmw",
  "model": "bmw::3-series",
  "max_price": "15000",
  "fuel_type": "diesel",
  "transmission": "automatic",
  "sort_by": "date",
  "max_cars": 100
}
```

**Input Example (URL override):**

```json
{
  "input_url": "https://www.gumtree.com/cars-vans-motorbikes/cars/bmw/3-series?max_price=15000&vehicle_fuel_type=diesel&sort=date",
  "max_cars": 500
}
```

**Input Example (used vans):**

```json
{
  "vehicle_type": "vans",
  "make": "ford",
  "max_price": "10000",
  "sort_by": "date",
  "max_cars": 100
}
```

**Output Example:**

```json
{
  "id": 1515065112,
  "title": "2015 BMW 3 Series 330d Luxury 4dr Step Auto SALOON Diesel Automatic",
  "url": "https://www.gumtree.com/p/bmw/2015-bmw-3-series-330d-luxury-4dr-step-auto-saloon-diesel-automatic/1515065112",
  "image": "https://img.gumtree.com/ePR8PyKf84wPHx7_RYmEag/dea8977a64724762a7_db953b189da8/86",
  "make": "BMW",
  "model": "3 SERIES",
  "year": 2016,
  "mileage": 90830,
  "price": 8495,
  "price_text": "£8,495.00",
  "fuel_type": "Diesel",
  "body_type": "Saloon",
  "transmission": "Automatic",
  "colour": "Black",
  "registration": "YA16YEV",
  "seller_type": "Trade",
  "location": "Nelson, Lancashire",
  "vehicle_type": "cars",
  "posted_date": "1 day ago"
}
```

### 📋 Input reference (detailed)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `input_url` | string | No | — | Paste a Gumtree cars/vans URL; overrides all filters below when set. Leave empty to use filters (better for AI agents). Prefer `/cars-vans-motorbikes/cars|vans/...` paths (avoid `/search?...`). |
| `vehicle_type` | string | No | `cars` | `cars` (Used cars) or `vans` (Used vans). |
| `make` | string | No | any | Vehicle make from Gumtree (e.g. `bmw`, `ford`, `volkswagen`). |
| `model` | string | No | any | Make + model as `make::slug` (e.g. `bmw::3-series`, `ford::transit`). A model name such as `3 Series` also works when Make is set. |
| `search_location` | string | No | — | Optional UK postcode or location (e.g. `SW1A1AA`, `london`). |
| `distance` | string | No | any | Search radius from location. `1000` = **Nationwide**. |
| `min_price` / `max_price` | string | No | any | Price ladder values from Gumtree. |
| `min_mileage` / `max_mileage` | string | No | any | Mileage ladder values from Gumtree. |
| `min_year` / `max_year` | string | No | any | Registration year ladder from Gumtree. |
| `fuel_type` | string | No | any | Site fuel values (e.g. `diesel`, `petrol`, `electric`, `hybrid_electric`). |
| `body_type` | string | No | any | Body type from Gumtree. |
| `transmission` | string | No | any | e.g. `automatic`, `manual`. |
| `colour` | string | No | any | Exterior colour from Gumtree. |
| `seller_type` | string | No | any | e.g. `trade`, `private`. |
| `sort_by` | string | No | `date` | Result order (see sort options above). |
| `max_cars` | integer | No | `50` | Maximum listings to return (`1`–`1000`). |

#### Notes on filters

- Make, model, fuel, and the other filters accept the short site value (`bmw`, `petrol`) or the label (`BMW`, `Petrol`).
- `model` uses `make::slug` (double colon), e.g. `bmw::3-series`.
- Prefer `/cars-vans-motorbikes/cars/` or `/cars-vans-motorbikes/vans/` URLs. Generic `/search?...` URLs are often blocked.
- Gumtree SRPs typically expose up to ~50 pages (~30 ads/page).
- `input_url` always wins over filters when provided.

### 🔧 Custom scrapers and agents

If you need a custom web scraper, or custom AI agents and workflows, contact me through [tuik.ai](https://www.tuik.ai). We help businesses cut costs and time by up to 10x.

# Actor input Schema

## `input_url` (type: `string`):

Paste a Gumtree cars/vans search URL (e.g. https://www.gumtree.com/cars-vans-motorbikes/cars/bmw/3-series) to use instead of the filters below — overrides all structured filters when set. Prefer /cars-vans-motorbikes/cars|vans/... paths (avoid /search?...). Leave empty to use the filters below (better for AI agents).

## `vehicle_type` (type: `string`):

Search used cars or used vans on Gumtree.

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

Vehicle make (same values as on gumtree.com).

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

Make + model as make::slug (e.g. bmw::3-series). Pick a row matching your Make.

## `search_location` (type: `string`):

Optional free-text UK place or postcode that Gumtree understands (e.g. london, manchester, SW1A1AA). Not a fixed keyword list — leave empty for nationwide. Place names work best with Make = Any; postcodes work best when a make is selected. Pair with Distance for a radius search.

## `distance` (type: `string`):

Search radius from location. Nationwide = 1000.

## `min_price` (type: `string`):

Minimum price ladder from Gumtree.

## `max_price` (type: `string`):

Maximum price ladder from Gumtree.

## `min_mileage` (type: `string`):

Minimum mileage ladder from Gumtree.

## `max_mileage` (type: `string`):

Maximum mileage ladder from Gumtree.

## `min_year` (type: `string`):

Minimum registration year from Gumtree.

## `max_year` (type: `string`):

Maximum registration year from Gumtree.

## `fuel_type` (type: `string`):

Fuel type values from gumtree.com.

## `body_type` (type: `string`):

Body type values from gumtree.com.

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

Transmission values from gumtree.com.

## `colour` (type: `string`):

Colour values from gumtree.com.

## `seller_type` (type: `string`):

Trade or private seller.

## `sort_by` (type: `string`):

Sort order from the Gumtree results page.

## `max_cars` (type: `integer`):

Maximum number of listings to scrape (capped at 1000). Gumtree SRPs typically expose up to ~50 pages (~30 ads/page).

## Actor input object example

```json
{
  "vehicle_type": "cars",
  "make": "",
  "model": "",
  "distance": "",
  "min_price": "",
  "max_price": "",
  "min_mileage": "",
  "max_mileage": "",
  "min_year": "",
  "max_year": "",
  "fuel_type": "",
  "body_type": "",
  "transmission": "",
  "colour": "",
  "seller_type": "",
  "sort_by": "date",
  "max_cars": 50
}
```

# Actor output Schema

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

Table view of scraped listings using the dataset 'overview' view.

## `results` (type: `string`):

All scraped listings from the default dataset without view transformation.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/gumtree-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/gumtree-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 '{}' |
apify call dadhalfdev/gumtree-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dadhalfdev/gumtree-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/zsPTSYO8dzoqzHumb/builds/lIVOkbyGBOC9dPpfi/openapi.json
