# Autotrader UK Scraper (`epctex/autotradercouk-scraper`) Actor

Extract comprehensive vehicle and machinery data from Autotrader.co.uk without an API. Search results and listing details in one powerful tool.

- **URL**: https://apify.com/epctex/autotradercouk-scraper.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** Automation
- **Stats:** 333 total users, 11 monthly users, 99.7% runs succeeded, 20 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$30.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Actor - Autotrader UK Scraper

### Autotrader UK scraper

Since Autotrader.co.uk doesn't provide a good and free API, this actor should help you to retrieve data from it.

The Autotrader UK data scraper supports the following features:

- Search - Get any search results. You can use all cars, vans, bikes, motorhomes, caravans, trucks, farms, and plant search URLs.

- Listing details - Retrieve information about the cars, vans, bikes, motorhomes, caravans, trucks, farms, and plants. Brand, model, price, mileage, fuel type, transmission, interior colors, exterior colors, and many other features.

**🇺🇸 If you are looking into scraping Autotrader.com instead of the UK store, please check our** [Autotrader Scraper](https://apify.com/epctex/autotrader-scraper?fpr=yhdrb).

### Bugs, fixes, updates, and changelog

This scraper is under active development. If you have any feature requests you can create an issue from [here](https://github.com/epctex-support/autotradercouk-scraper/issues).

### Input Parameters

The input of this scraper should be JSON containing the list of pages on Autotrader UK that should be visited. Possible fields are:

- `startUrls`: (Required) (Array) List of Autotrader UK URLs. It should be a search, list, or listing detail URL. Search and list URLs must include a postcode. If missing, a default value will be assigned, which may change the returned results.

- `endPage`: (Optional) (Number) Final number of page that you want to scrape. The default is `Infinite`. This applies to all `search` request and `startUrls` individually.

- `maxItems`: (Optional) (Number) You can limit scraped items. This should be useful when you search through the big lists or search results.

- `proxy`: (Required) (Proxy Object) Proxy configuration.

- `extendOutputFunction`: (Optional) (String) Function that takes a JQuery handle ($) as an argument and returns an object with data.

- `customMapFunction`: (Optional) (String) Function that takes each object's handle as an argument and returns an object with executing the function.

This solution requires using **Proxy servers**, either your own proxy servers or you can use [Apify Proxy](https://www.apify.com/docs/proxy).

#### Tip

When you want to scrape over a specific listing URL, just copy and paste the link as one of the **startUrl**.

If you would like to scrape only the first page of a list then put the link for the page and have the `endPage` as 1.

With the last approach that is explained above you can also fetch any interval of pages. If you provide the 5th page of a list and define the `endPage` parameter as 6 then you'll have the 5th and 6th pages only.

#### Compute Unit Consumption

The actor is optimized to run blazing fast and scrape many listings as possible. Therefore, it forefronts all listing detail requests. If the actor doesn't block very often it'll scrape 100 listings in 2 minutes with ~0.1-0.2 compute units.

#### Autotrader UK Scraper Input example

```json
{
  "startUrls":[
    "https://www.autotrader.co.uk/car-search?page=2&postcode=E1%207DJ&sort=relevance",
    "https://www.autotrader.co.uk/motorhome-search?postcode=E1%207DJ&berth=2&include-delivery-option=on&advertising-location=at_motorhomes&page=1",
    "https://www.autotrader.co.uk/caravan-search?postcode=E1%207DJ&include-delivery-option=on&advertising-location=at_caravans&page=1",
    "https://www.autotrader.co.uk/truck-search?postcode=E1%207DJ&make=DAF&include-delivery-option=on&advertising-location=at_trucks",
    "https://www.autotrader.co.uk/farm-search?postcode=E1%207DJ&category=ATVS&include-delivery-option=on&advertising-location=at_farm",
    "https://www.autotrader.co.uk/plant-search?postcode=E1%207DJ&category=ATTACHMENTS&include-delivery-option=on&advertising-location=at_plants",
    "https://www.autotrader.co.uk/car-details/202306299089853",
    "https://www.autotrader.co.uk/car-details/202304266675832?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_cars&include-delivery-option=on&make=Audi&model=A6%20Saloon&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/van-details/202306148523378?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_vans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/bike-details/202303074975713?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_bikes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/motorhome-details/202212162575381?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_motorhomes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/caravan-details/202306138460879?advertising-location=at_caravans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/truck-details/202306128433310?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_trucks&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/plant-machinery-details/202304276732947?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_plants&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/farm-machinery-details/202305107209361?journey=YOU_MAY_ALSO_LIKE_JOURNEY&advertising-location=at_farm&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/cars/retailer/stock?postcode=OL11+2LH",
    "https://www.autotrader.co.uk/cars/retailer/stock?advertising-location=at_cars&advertising-location=at_profile_cars&onesearchad=Used&onesearchad=Nearly%20New&onesearchad=New&postcode=OL11%202LH&retailerId=10032546&sort=price-asc"
  ],
  "maxItems": 50,
  "proxy":{
    "useApifyProxy":true,
    "countryCode":"US"
  }
}


```

### During the Run

During the run, the actor will output messages letting you know what is going on. Each message always contains a short label specifying which page from the provided list is currently specified.
When items are loaded from the page, you should see a message about this event with a loaded item count and total item count for each page.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

### Autotrader UK Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or <a href="https://www.apify.com/docs/api" target="blank">our API reference</a> to learn more about getting results from this Autotrader UK actor.

### Scraped Autotrader UK Output

The structure of each item in Autotrader UK looks like this. Most fields are always present (`null` when a listing genuinely has no value for them). A few fields — `featuresHighlights`, `vehicleHighlights`, `runningCosts`, `expertReview`, `financeInfo`, `insurance`, and `deliveryAndCollection` — are passed through directly from the site's own page data, so their internal shape and presence can vary between listings and vehicle types:

```json
{
  "id": "202607184306549",
  "stockItemId": "3dec332e15d8481d9e9b4912c0230848",
  "title": "2008 Fiat 500 1.4 Sport Euro 4 3dr",
  "motExpiry": null,
  "heading": {
    "title": "2008 Fiat 500",
    "subtitle": "1.4 Sport Euro 4 3dr"
  },
  "attentionGrabber": "Ulez-AC-LEATHER-ALLOYS",
  "price": 850,
  "priceCurrency": "£",
  "priceOnApplication": false,
  "noAdminFees": true,
  "adminFee": null,
  "adminFeeInfoDescription": null,
  "capabilities": {
    "marketExtensionHomeDelivery": true,
    "marketExtensionClickAndCollect": null
  },
  "isFinanceAvailable": true,
  "financeProvider": "Auto Hub Car Sales",
  "retailerId": "10049180",
  "hasClickAndCollect": false,
  "dealer": {
    "dealerId": "10049180",
    "distance": "9 miles",
    "location": {
      "town": "Park Royal",
      "county": "BRENT",
      "postcode": "NW10 7TR",
      "latLong": "51.5335372,-0.2752819"
    },
    "media": {
      "email": "autohubcs@gmail.com",
      "dealerWebsite": {
        "href": "https://autohubcarsales.cdweb.uk/?utm_source=autotrader&utm_medium=referral"
      },
      "phoneNumber1": "(07537) 123507",
      "phoneNumber2": null
    },
    "name": "Auto Hub Car Sales"
  },
  "video": null,
  "spin": null,
  "imageList": {
    "size": 17,
    "images": [
      {
        "url": "https://m.atcdn.co.uk/a/media/{resize}/55599db241004241bbcdf49c84c84332.jpg",
        "templated": true,
        "autotraderAllocated": false
      }
    ]
  },
  "priceIndicatorRating": "NOANALYSIS",
  "priceIndicatorRatingLabel": null,
  "mileage": {
    "mileage": 106253,
    "unit": "MILE"
  },
  "plate": "08",
  "year": 2008,
  "vehicleCheckStatus": "PASSED",
  "vehicleCheckSummary": {
    "type": "FULL",
    "title": "10 checks passed",
    "checks": [
      { "key": "STOLEN", "failed": false },
      { "key": "SCRAPPED", "failed": false },
      { "key": "IMPORTED", "failed": false },
      { "key": "EXPORTED", "failed": false },
      { "key": "WRITE_OFF", "failed": false }
    ]
  },
  "sellerName": "Auto Hub Car Sales",
  "sellerLocation": "Park Royal",
  "sellerLocationDistance": {
    "unit": "MILE",
    "value": 9
  },
  "sellerContact": {
    "phoneNumberOne": "(07537) 123507",
    "byEmail": true
  },
  "description": "This 2008 Fiat 500 Sport offers a practical and stylish choice for those seeking a compact vehicle with a distinct character. As a Sport trim model, it combines the classic Italian design of the 500 with specific aesthetic touches, including body colour side rubbing strips that feature the 500 logo...",
  "colour": "Red",
  "manufacturerApproved": false,
  "specification": {
    "isCrossover": false,
    "emissionClass": "Euro 4",
    "co2Emissions": { "co2Emission": 149, "unit": "g/km" },
    "topSpeed": { "topSpeed": 113, "unit": "mph" },
    "minimumKerbWeight": { "weight": 930, "unit": "kg" },
    "wheelbase": "2,300mm",
    "engine": {
      "power": { "enginePower": 100, "unit": "BHP" },
      "sizeLitres": 1.4
    },
    "exteriorWidth": { "width": 1627, "unit": "mm" },
    "exteriorLength": { "length": 3546, "unit": "mm" },
    "exteriorHeight": { "height": 1488, "unit": "mm" },
    "seats": 4,
    "doors": 3,
    "bodyType": "Hatchback",
    "rawBodyType": "Hatchback",
    "fuel": "Petrol",
    "transmission": "Manual",
    "make": "Fiat",
    "model": "500",
    "annualTax": { "standardRate": 225 }
  },
  "url": "https://www.autotrader.co.uk/car-details/202607184306549?sort=relevance&twcs=true&searchId=ef17b085-5ef0-4cb8-9ecf-10212a89edbf",
  "featuresHighlights": [
    {
      "title": "Rare features",
      "category": "RARE",
      "count": "7",
      "featureItems": [
        {
          "description": "Very rare features are only found on 10% of cars similar to this one. This car's very rare features:",
          "items": [
            { "name": "15in 18Spoke Alloy Wheels" },
            { "name": "Bi-Xenon Headlights" }
          ]
        }
      ]
    }
  ],
  "vehicleHighlights": [
    {
      "key": "FeaturesHasVeryRare",
      "title": "7 rare features",
      "description": "Body Coloured Side Rubbing Strips with 500 Logo - Chrome door mirror housings - Bi-Xenon Headlights...",
      "descriptionList": [
        "Body Coloured Side Rubbing Strips with 500 Logo",
        "Chrome door mirror housings"
      ],
      "badge": "Top 10%",
      "linkDescription": "Show all features",
      "quantifier": "HAS_VERY_RARE",
      "vehicleHighlightContext": {
        "quantifier": "HAS_VERY_RARE",
        "highlightName": "FEATURES_RARE",
        "index": 1
      }
    }
  ],
  "runningCosts": [
    { "key": "Emission", "label": "CO₂ emissions", "value": "149g/km" },
    { "key": "Insurance", "label": "Insurance group", "value": "12P" },
    { "key": "Tax", "label": "Tax per year", "value": "£225" },
    { "key": "FUEL_URBAN", "label": "Urban", "value": "39.2mpg" },
    { "key": "FUEL_EXTRA_URBAN", "label": "Extra Urban", "value": "56.5mpg" },
    { "key": "FUEL_AVERAGE", "label": "Average", "value": "48.7mpg" }
  ],
  "expertReview": {
    "rating": 3.5,
    "reviewUrl": "http://www.autotrader.co.uk/content/car-reviews/fiat-500-1-2-sport-car-review"
  },
  "financeInfo": {
    "pcpInfo": {
      "heading": "Learn more about Personal contract purchase (PCP)",
      "video": {
        "url": "https://vimeo.com/637959800/417871703d",
        "description": "The following video explains what is Personal contract purchase (PCP) when it comes to finance options."
      },
      "summary": {
        "heading": "What is PCP finance?",
        "content": [
          { "type": "TEXT", "value": "Personal contract purchase (PCP) is a flexible way to finance a vehicle..." }
        ]
      },
      "questions": "... (full list of PCP Q&A entries - same boilerplate content for every listing that offers finance)"
    },
    "hpCsInfo": {
      "heading": "Learn more about Hire purchase (HP) / Conditional sale (CS)",
      "video": {
        "url": "https://vimeo.com/638697359/732687ad82",
        "description": "The following video explains what is Hire purchase (HP) / Conditional sale (CS) when it comes to finance options."
      },
      "summary": {
        "heading": "What is HP/CS finance?",
        "content": [
          { "type": "TEXT", "value": "Hire purchase (HP) / Conditional sale (CS) is a flexible way to finance a vehicle..." }
        ]
      },
      "questions": "... (full list of HP/CS Q&A entries - same boilerplate content for every listing that offers finance)"
    },
    "tradingName": "Auto Hub Car Sales"
  },
  "insurance": {
    "insuranceLink": "https://www.moneysupermarket.com/dialogue/car-autotrader/questions/your-car?source=AFL-AUTO&vehicleId=3dec332e15d8481d9e9b4912c0230848&ref1=Used",
    "isCrossover": false,
    "stockItemId": "3dec332e15d8481d9e9b4912c0230848"
  },
  "deliveryAndCollection": {
    "location": {
      "visitVehicleText": "Visit this car today",
      "townText": "Park Royal",
      "distanceText": "9 miles away"
    },
    "homeDelivery": {
      "consumerPostcode": "E1 7DJ",
      "freeDeliveryRadiusText": "Free within 5 miles",
      "deliveryCostPerMileText": "(£1.80 per mile thereafter)",
      "deliveryText": "Delivery available",
      "deliverySubText": "Can be delivered to ",
      "deliveryCostText": "£1.80 per mile",
      "deliversToMyPostcode": true,
      "hasHomeDelivery": true
    }
  },
  "mileageComparison": null
}
```

### Contact

Please visit us through [epctex.com](https://epctex.com) to see all the products that are available for you. If you are looking for any custom integration or so, please reach out to us through the chat box in [epctex.com](https://epctex.com). In need of support? <business@epctex.com> is at your service.

# Actor input Schema

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

URLs to start with. It should be list or detail URL. Search and list URLs must include a postcode. If missing, a default value will be assigned, which may change the returned results.

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

Maximum number of listing items that you want as output. Default is all

## `endPage` (type: `integer`):

The page number that you want to end with. By default there is no end page. This is applies to all search request and startUrls individually.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.autotrader.co.uk/car-search?page=2&postcode=E1%207DJ&sort=relevance",
    "https://www.autotrader.co.uk/motorhome-search?postcode=E1%207DJ&berth=2&include-delivery-option=on&advertising-location=at_motorhomes&page=1",
    "https://www.autotrader.co.uk/caravan-search?postcode=E1%207DJ&include-delivery-option=on&advertising-location=at_caravans&page=1",
    "https://www.autotrader.co.uk/truck-search?postcode=E1%207DJ&make=DAF&include-delivery-option=on&advertising-location=at_trucks",
    "https://www.autotrader.co.uk/farm-search?postcode=E1%207DJ&category=ATVS&include-delivery-option=on&advertising-location=at_farm",
    "https://www.autotrader.co.uk/plant-search?postcode=E1%207DJ&category=ATTACHMENTS&include-delivery-option=on&advertising-location=at_plants",
    "https://www.autotrader.co.uk/car-details/202306299089853",
    "https://www.autotrader.co.uk/car-details/202304266675832?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_cars&include-delivery-option=on&make=Audi&model=A6%20Saloon&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/van-details/202306148523378?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_vans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/bike-details/202303074975713?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_bikes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/motorhome-details/202212162575381?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_motorhomes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/caravan-details/202306138460879?advertising-location=at_caravans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/truck-details/202306128433310?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_trucks&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/plant-machinery-details/202304276732947?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_plants&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/farm-machinery-details/202305107209361?journey=YOU_MAY_ALSO_LIKE_JOURNEY&advertising-location=at_farm&include-delivery-option=on&postcode=E1%207DJ&fromsra"
  ],
  "maxItems": 20,
  "endPage": 1,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "https://www.autotrader.co.uk/car-search?page=2&postcode=E1%207DJ&sort=relevance",
        "https://www.autotrader.co.uk/motorhome-search?postcode=E1%207DJ&berth=2&include-delivery-option=on&advertising-location=at_motorhomes&page=1",
        "https://www.autotrader.co.uk/caravan-search?postcode=E1%207DJ&include-delivery-option=on&advertising-location=at_caravans&page=1",
        "https://www.autotrader.co.uk/truck-search?postcode=E1%207DJ&make=DAF&include-delivery-option=on&advertising-location=at_trucks",
        "https://www.autotrader.co.uk/farm-search?postcode=E1%207DJ&category=ATVS&include-delivery-option=on&advertising-location=at_farm",
        "https://www.autotrader.co.uk/plant-search?postcode=E1%207DJ&category=ATTACHMENTS&include-delivery-option=on&advertising-location=at_plants",
        "https://www.autotrader.co.uk/car-details/202306299089853",
        "https://www.autotrader.co.uk/car-details/202304266675832?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_cars&include-delivery-option=on&make=Audi&model=A6%20Saloon&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/van-details/202306148523378?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_vans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/bike-details/202303074975713?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_bikes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/motorhome-details/202212162575381?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_motorhomes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/caravan-details/202306138460879?advertising-location=at_caravans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/truck-details/202306128433310?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_trucks&include-delivery-option=on&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/plant-machinery-details/202304276732947?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_plants&include-delivery-option=on&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/farm-machinery-details/202305107209361?journey=YOU_MAY_ALSO_LIKE_JOURNEY&advertising-location=at_farm&include-delivery-option=on&postcode=E1%207DJ&fromsra"
    ],
    "maxItems": 20,
    "endPage": 1,
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/autotradercouk-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 = {
    "startUrls": [
        "https://www.autotrader.co.uk/car-search?page=2&postcode=E1%207DJ&sort=relevance",
        "https://www.autotrader.co.uk/motorhome-search?postcode=E1%207DJ&berth=2&include-delivery-option=on&advertising-location=at_motorhomes&page=1",
        "https://www.autotrader.co.uk/caravan-search?postcode=E1%207DJ&include-delivery-option=on&advertising-location=at_caravans&page=1",
        "https://www.autotrader.co.uk/truck-search?postcode=E1%207DJ&make=DAF&include-delivery-option=on&advertising-location=at_trucks",
        "https://www.autotrader.co.uk/farm-search?postcode=E1%207DJ&category=ATVS&include-delivery-option=on&advertising-location=at_farm",
        "https://www.autotrader.co.uk/plant-search?postcode=E1%207DJ&category=ATTACHMENTS&include-delivery-option=on&advertising-location=at_plants",
        "https://www.autotrader.co.uk/car-details/202306299089853",
        "https://www.autotrader.co.uk/car-details/202304266675832?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_cars&include-delivery-option=on&make=Audi&model=A6%20Saloon&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/van-details/202306148523378?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_vans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/bike-details/202303074975713?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_bikes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/motorhome-details/202212162575381?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_motorhomes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/caravan-details/202306138460879?advertising-location=at_caravans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/truck-details/202306128433310?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_trucks&include-delivery-option=on&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/plant-machinery-details/202304276732947?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_plants&include-delivery-option=on&postcode=E1%207DJ&fromsra",
        "https://www.autotrader.co.uk/farm-machinery-details/202305107209361?journey=YOU_MAY_ALSO_LIKE_JOURNEY&advertising-location=at_farm&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    ],
    "maxItems": 20,
    "endPage": 1,
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/autotradercouk-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 '{
  "startUrls": [
    "https://www.autotrader.co.uk/car-search?page=2&postcode=E1%207DJ&sort=relevance",
    "https://www.autotrader.co.uk/motorhome-search?postcode=E1%207DJ&berth=2&include-delivery-option=on&advertising-location=at_motorhomes&page=1",
    "https://www.autotrader.co.uk/caravan-search?postcode=E1%207DJ&include-delivery-option=on&advertising-location=at_caravans&page=1",
    "https://www.autotrader.co.uk/truck-search?postcode=E1%207DJ&make=DAF&include-delivery-option=on&advertising-location=at_trucks",
    "https://www.autotrader.co.uk/farm-search?postcode=E1%207DJ&category=ATVS&include-delivery-option=on&advertising-location=at_farm",
    "https://www.autotrader.co.uk/plant-search?postcode=E1%207DJ&category=ATTACHMENTS&include-delivery-option=on&advertising-location=at_plants",
    "https://www.autotrader.co.uk/car-details/202306299089853",
    "https://www.autotrader.co.uk/car-details/202304266675832?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_cars&include-delivery-option=on&make=Audi&model=A6%20Saloon&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/van-details/202306148523378?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_vans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/bike-details/202303074975713?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_bikes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/motorhome-details/202212162575381?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_motorhomes&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/caravan-details/202306138460879?advertising-location=at_caravans&include-delivery-option=on&page=1&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/truck-details/202306128433310?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_trucks&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/plant-machinery-details/202304276732947?journey=FEATURED_LISTING_JOURNEY&advertising-location=at_plants&include-delivery-option=on&postcode=E1%207DJ&fromsra",
    "https://www.autotrader.co.uk/farm-machinery-details/202305107209361?journey=YOU_MAY_ALSO_LIKE_JOURNEY&advertising-location=at_farm&include-delivery-option=on&postcode=E1%207DJ&fromsra"
  ],
  "maxItems": 20,
  "endPage": 1,
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call epctex/autotradercouk-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/GbK3z11rwDwPKrMNY/builds/EUklgot3bEy3BVVCI/openapi.json
