# Autotrader Scraper (`epctex/autotrader-scraper`) Actor

Uncover valuable car listing data on Autotrader.com with our Autotrader Scraper. Scrape and extract descriptions, images, prices, mileage, addresses, names, engine information, the transmission of the car, contact details, and more without any limitations. Filter by any field to find your ideal car.

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

## Pricing

from $1.10 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Actor - Autotrader Scraper

### Autotrader scraper

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

The Autotrader data scraper supports the following features:

- Search any search results - Get any search results. New or used cars with brand and model information.

- Filter by anything without any limits - Filter your search results by brand, price, and any other options that the website provides. No limits!

- Scrape any listing details - Retrieve information about the cars. Brand, model, price, mileage, fuel type, transmission, interior colors, exterior colors, and many other features.

**🇬🇧 If you are looking into scraping Autotrader.co.uk instead of the UK store, please check our** [Autotrader Scraper](https://apify.com/epctex/autotradercouk-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/autotrader-scraper/issues).

### Input Parameters

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

- `startUrls`: (Required) (Array) List of Autotrader URLs. It should be search, list, or listing detail URL.

- `includeReviews`: (Optional) (Boolean) This will add all the reviews that Autotrader provides into the detail objects. Please keep in mind that the time and resources the actor uses will increase proportionally by the number of reviews.

- `endPage`: (Optional) (Number) Final number of page that you want to scrape. The default is `Infinite`. This applies to all `search` requests 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 the object with executing the function.

This solution requires the use of **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 as 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.15-0.25 compute units.

#### Autotrader Scraper Input example

```json
{
  "startUrls":[
    "https://www.autotrader.com/cars-for-sale/all-cars/harrisburg-pa-17101",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675520329&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675490538&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675749094&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/marketplace/buy/chevrolet/malibu/2012/1G1ZC5E02CF229746?listingId=700269607",
  ],
  "endPage": 3,
  "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 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 actor.

### Scraped Autotrader Output

The structure of each item in Autotrader looks like this:

```json
{
	"id": "741701758",
	"url": "https://www.autotrader.com/cars-for-sale/vehicle/741701758?allListingType=all-cars&city=Harrisburg&makeCode=TOYOTA&modelCode=TACOMA&startYear=2021&state=PA&clickType=listing",
	"title": "Certified 2021 Toyota Tacoma TRD Pro",
	"brand": "Toyota",
	"model": "Tacoma",
	"stockNumber": "TP9154",
	"vin": "5TFCZ5AN8MX278393",
	"year": 2021,
	"price": 43999,
	"features": {
		"exterior": [
			"Alloy wheels",
			"Auto High-beam Headlights",
			"Black Overfenders",
			"Black Wheel Locks",
			"Bumpers: body-color",
			"Front fog lights",
			"Fully automatic headlights",
			"Heated door mirrors",
			"Mesh Front Grille",
			"Power door mirrors",
			"Projector-Beam Headlights",
			"Rear step bumper",
			"Rigid Industries LED Fog Lights",
			"TRD Pro Cat-Back Exhaust",
			"TRD Pro Exterior Badging",
			"Turn signal indicator mirrors"
		],
		"interior": [
			"Air Conditioning",
			"Anti-whiplash front head restraints",
			"Auto-dimming Rear-View mirror",
			"Driver door bin",
			"Dual Zone Automatic Climate Control",
			"Front Bucket Seats",
			"Front Center Armrest",
			"Front Heated Seats",
			"Front dual zone A/C",
			"Front reading lights",
			"Heated Front Seats",
			"Heated front seats",
			"Leather Shift Knob",
			"Overhead console",
			"Passenger door bin",
			"Power Sliding Rear Window w/Privacy Glass",
			"Power driver seat",
			"Power moonroof",
			"Power windows",
			"Split folding rear seat",
			"Steering wheel mounted audio controls",
			"TRD Floor Mats",
			"TRD Pro Shift Knob",
			"Tachometer",
			"Telescoping steering wheel",
			"Tilt steering wheel",
			"Trip computer",
			"Variably intermittent wipers"
		],
		"safety": [
			"ABS brakes",
			"Blind Spot Monitor w/Rear Cross Traffic Alert",
			"Brake assist",
			"Dual front impact airbags",
			"Dual front side impact airbags",
			"Electronic Stability Control",
			"Knee airbag",
			"Lane Change Assist",
			"Low tire pressure warning",
			"Occupant sensing airbag",
			"Overhead airbag",
			"Panic alarm",
			"Security system",
			"Traction control"
		],
		"mechanical": [
			"Front wheel independent suspension",
			"Power steering",
			"Speed-sensing steering"
		],
		"technology": [
			"**Bluetooth Hands-Free Calling!**",
			"**Navigation!**",
			"**Rear View Back-Up Camera!**",
			"AM/FM radio: SiriusXM",
			"Automatic temperature control",
			"Engine Immobilizer",
			"Garage door transmitter: HomeLink",
			"Rear Parking Assist Sonar",
			"Rear Parking Sensors",
			"Remote keyless entry",
			"Speed control"
		],
		"other": [
			"**Aftermarket Tonneau Cover Will Be Removed Prior To Sale**",
			"**Android Auto!**",
			"**Apple CarPlay!**",
			"**Back Up Warning Sensors!**",
			"**Blind Spot Technology - Never Worry When Changing Lanes Again!!**",
			"120V/400W Deck Mounted AC Power",
			"Apple CarPlay/Android Auto",
			"Auto-Dimming Rearview Mirror w/HomeLink",
			"Emergency communication system: Safety Connect with 1-year trial",
			"Front anti-roll bar",
			"Hood Graphics",
			"Illuminated entry",
			"Outside temperature display",
			"TRD Pro Leather Seat Trim",
			"TRD Pro Package",
			"TRD-Tuned Off-Road Suspension (TR)",
			"Toyota Gold Certified",
			"Wheels: 16\" x 7J TRD Pro Black Alloy"
		]
	},
	"daysOnSite": 95,
	"mileage": "39,919",
	"engine": {
		"code": "6CLDR",
		"name": "6-Cylinder"
	},
	"fuelType": {
		"code": "G",
		"group": "Gas",
		"name": "Gasoline"
	},
	"specifications": {
		"driveType": "4 wheel drive",
		"exterior": "Magnetic Gray Metallic",
		"interiorSeats": "Black Leather Seats",
		"transmission": "6-Speed Automatic",
		"truckBedSizeDescription": "Medium"
	},
	"images": [
		"https://images.autotrader.com/hn/c/8b430fe1e4214d9fa04a714f3944e972.jpg",
		"https://images.autotrader.com/hn/c/8d327e6755b646ef8569a47277e6d9a2.jpg",
		"https://images.autotrader.com/hn/c/e5c01ecca79d444e88ce4f296f8f7e64.jpg",
		"https://images.autotrader.com/hn/c/06370f5705874707a0577f580b58866d.jpg",
		"https://images.autotrader.com/hn/c/6b89998749ab46e1bd3c93f7465338c7.jpg",
		"https://images.autotrader.com/hn/c/a102daa14d85452d85a121c9f95d5488.jpg",
		"https://images.autotrader.com/hn/c/b82fee8b0d6d4aa1bd12dbed8c97ee04.jpg",
		"https://images.autotrader.com/hn/c/e96cb6c6e6c44d459768e75bdd9ab6fa.jpg",
		"https://images.autotrader.com/hn/c/04b9bd9ec6f94e4393e5f0b6df1d30ec.jpg",
		"https://images.autotrader.com/hn/c/74baf7fad8d84b2f89f286b2842a8d32.jpg",
		"https://images.autotrader.com/hn/c/8ed4bad1bf8241778cb464174907e7d0.jpg",
		"https://images.autotrader.com/hn/c/0d3bb961bfc743e0bc15451f5920cdbe.jpg",
		"https://images.autotrader.com/hn/c/122934e1f0a14b2a9e9b7a5965ec77e4.jpg",
		"https://images.autotrader.com/hn/c/5cd56ff58ed546b5887b5894e9355bba.jpg",
		"https://images.autotrader.com/hn/c/c98fea99d9ad415da1f06f2d42a487f0.jpg",
		"https://images.autotrader.com/hn/c/4df576ad7fe1416ea069583da0a3927a.jpg",
		"https://images.autotrader.com/hn/c/24f33ff57a0f4a2b8e39f599fd473517.jpg",
		"https://images.autotrader.com/hn/c/722ccd0fb7134acba1748f3cb91bdbd1.jpg",
		"https://images.autotrader.com/hn/c/c958dd15036b487a86622fc542856be1.jpg",
		"https://images.autotrader.com/hn/c/80b0b604ef074f92a3289d3e685a21c6.jpg",
		"https://images.autotrader.com/hn/c/f180e3d088bd4309ba54eec7ec2d5d19.jpg",
		"https://images.autotrader.com/hn/c/ca56a8c5c24348ea9b322f0f87e02ce4.jpg",
		"https://images.autotrader.com/hn/c/82ed5a9c9ff94915b270b52bab40cf27.jpg",
		"https://images.autotrader.com/hn/c/0760027a9837410a957864d44f96a9ef.jpg",
		"https://images.autotrader.com/hn/c/f52da8e085e24dcfb74f12e2f783946d.jpg",
		"https://images.autotrader.com/hn/c/19817d0d632944719aa889b9cd11a3bf.jpg",
		"https://images.autotrader.com/hn/c/620aa2df5f2d457cb21dd8f66e6bcf52.jpg",
		"https://images.autotrader.com/hn/c/1d6e540e1f8c45a58d879fffeb8f2fc3.jpg",
		"https://images.autotrader.com/hn/c/0bb78b2c14a443c69c19a575217742fd.jpg",
		"https://images.autotrader.com/hn/c/f4854fc7a0b643fe877d606500f3cde6.jpg",
		"https://images.autotrader.com/hn/c/efa39b5a10a843d5814b859a8dc455b9.jpg",
		"https://images.autotrader.com/hn/c/0901e1a06df64ef6b41fbc830ecc8683.jpg",
		"https://images.autotrader.com/hn/c/cce76c4099854f1697f7bedb48e5b3fc.jpg",
		"https://images.autotrader.com/hn/c/8e1adaaa59384f58ae56e097ca6c5872.jpg",
		"https://images.autotrader.com/hn/c/19f3a188d797412ba4214446e204dda5.jpg",
		"https://images.autotrader.com/hn/c/ea914a47fa674729835102fece39497f.jpg",
		"https://images.autotrader.com/hn/c/29d5e2f009864dfd825a99342c73a886.jpg",
		"https://images.autotrader.com/hn/c/ad5334e36d304b9d81434d094864a763.jpg",
		"https://images.autotrader.com/hn/c/f782fbbd898c458f89f150a5d5a4d59d.jpg",
		"https://images.autotrader.com/hn/c/a5bcc128421d4b65b6ebb712b0ebbf28.jpg",
		"https://images.autotrader.com/hn/c/38494c18276b47078e6bd579a76803a4.jpg",
		"https://images.autotrader.com/hn/c/4c454e98a16743808e1d8be9ae2c77a9.jpg",
		"https://images.autotrader.com/hn/c/354ed433b7bb44f582d92b69435a7ec9.jpg",
		"https://images.autotrader.com/hn/c/ab67aebf2a344917a86e66918d0e30ab.jpg",
		"https://images.autotrader.com/hn/c/2bcadf0413374def980321118e46ddbe.jpg",
		"https://images.autotrader.com/hn/c/73e0ad6cec864af99ea2436ac8b276e4.jpg",
		"https://images.autotrader.com/hn/c/fee7bd43177e445f94ff3bd2ac7336a7.jpg",
		"https://images.autotrader.com/hn/c/afb0cbff3621445fb2c87158e7afb717.jpg",
		"https://images.autotrader.com/hn/c/13d0da0ff705413888089d68f75f6b8b.jpg"
	],
	"ownerTitle": "Bobby Rahal Toyota",
	"ownerRating": 4.8,
	"ownerRatingCount": 1636,
	"ownerPhone": "7175166207"
}
```

### 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 search, list, or listing detail URL.

## `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.

## `extendOutputFunction` (type: `string`):

Function that takes a JQuery handle ($) as argument and returns data that will be merged with the default output

## `customMapFunction` (type: `string`):

Function that takes each of the objects as argument and returns data that will be mapped by the function itself.

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

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.autotrader.com/marketplace/buy/chevrolet/malibu/2012/1G1ZC5E02CF229746?listingId=700269607",
    "https://www.autotrader.com/cars-for-sale/all-cars/harrisburg-pa-17101",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675520329&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675490538&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675749094&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing"
  ],
  "maxItems": 20,
  "endPage": 1,
  "extendOutputFunction": "($) => { return {} }",
  "customMapFunction": "(object) => { return {...object} }",
  "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.com/marketplace/buy/chevrolet/malibu/2012/1G1ZC5E02CF229746?listingId=700269607",
        "https://www.autotrader.com/cars-for-sale/all-cars/harrisburg-pa-17101",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675520329&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675490538&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675749094&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing"
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": ($) => { return {} },
    "customMapFunction": (object) => { return {...object} },
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/autotrader-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.com/marketplace/buy/chevrolet/malibu/2012/1G1ZC5E02CF229746?listingId=700269607",
        "https://www.autotrader.com/cars-for-sale/all-cars/harrisburg-pa-17101",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675520329&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675490538&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
        "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675749094&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": "($) => { return {} }",
    "customMapFunction": "(object) => { return {...object} }",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/autotrader-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 '{
  "startUrls": [
    "https://www.autotrader.com/marketplace/buy/chevrolet/malibu/2012/1G1ZC5E02CF229746?listingId=700269607",
    "https://www.autotrader.com/cars-for-sale/all-cars/harrisburg-pa-17101",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675520329&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675490538&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing",
    "https://www.autotrader.com/cars-for-sale/vehicledetails.xhtml?0=vehicledetails.xhtml&listingId=675749094&allListingType=all-cars&city=Harrisburg&state=PA&zip=17101&searchRadius=50&=&isNewSearch=false&referrer=%2Fcars-for-sale%2Fall-cars%2Fharrisburg-pa-17101%3F0%3Dvehicledetails.xhtml%26listingId%3D651889249%26searchRadius%3D50%26&clickType=listing"
  ],
  "maxItems": 20,
  "endPage": 1,
  "extendOutputFunction": "($) => { return {} }",
  "customMapFunction": "(object) => { return {...object} }",
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call epctex/autotrader-scraper --silent --output-dataset

```

## MCP server setup

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