# Autotrader US - Cars, Prices, Dealers & VINs (`abotapi/autotrader-com-scraper`) Actor

Scrape US car listings from Autotrader by make, model, ZIP, price, year, body style, filters, or listing URLs. Returns VIN, price, KBB deal rating, mileage, colors, MPG, drivetrain, dealer name, phone, location, history flags, photos, and 60+ fields.

- **URL**: https://apify.com/abotapi/autotrader-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Categories:** E-commerce, Developer tools, Travel
- **Stats:** 9 total users, 3 monthly users, 95.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 listing 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

## AutoTrader Scraper: US Vehicle Listings, Pricing and Dealer Contacts

AutoTrader Scraper turns AutoTrader.com, the large US vehicle marketplace, into clean structured data. Get VIN, price, mileage, dealer contact details, vehicle history flags, and the site's own deal rating and KBB fair-purchase price for every result. Search by make, model, ZIP code, price, year, body style, fuel type, drivetrain, and color, or paste AutoTrader search and listing links directly, then export to JSON, CSV or Excel, or pull the dataset straight into your app through the API.

### Why This Scraper?

- **60+ fields per listing**, including VIN, full dealer contact, and the site's own deal rating.
- **KBB fair-purchase price range** and how each listing compares, when the site provides it.
- **Vehicle history flags**: no accidents reported, no salvage title, no frame damage, no flood damage, single owner, and free history report availability.
- **Two ways to search**: build a query from filters, or paste any AutoTrader search or listing URL.
- **Forward pagination that walks a whole result set by default**, bounded only by the total listings cap you set, so runs stay predictable.
- **Optional per-listing detail enrichment** for full options, extended specs, and complete vehicle history.
- **Optional export of results** into Notion, Linear, Airtable, or Apify through MCP connectors.

### Use Cases

- **Car shoppers and price researchers**: compare listings across dealers by price, mileage, and the site's own deal rating.
- **Dealership and inventory teams**: track competitor pricing and days-on-market within a search area.
- **Vehicle history and valuation tools**: pull VINs, KBB fair-purchase price ranges, and history flags to feed valuation models.
- **Lead generation and CRM pipelines**: capture current listings and dealer contact details for a make or model.
- **Market analysts and data scientists**: build historical pricing datasets across ZIP codes, makes, and body styles.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live listing.

| Field | Example |
| --- | --- |
| `id` | `"000000001"` |
| `vin` | `"1XXXX00000X000000"` |
| `url` | `"https://www.autotrader.com/cars-for-sale/vehicle/000000001"` |
| `year` | `2023` |
| `make` | `"Sample Make"` |
| `model` | `"Sample Model"` |
| `trim` | `"Sample Trim"` |
| `bodyStyle` | `"SUV"` |
| `price` | `22000` |
| `dealIndicator` | `"Great"` |
| `kbbFairPurchasePrice` | `22500` |
| `mileage` | `30000` |
| `exteriorColor` | `"White"` |
| `interiorColor` | `"Black"` |
| `fuelType` | `"Gasoline"` |
| `transmission` | `"Automatic"` |
| `driveType` | `"Front Wheel Drive"` |
| `mpgCity` / `mpgHighway` | `30` / `38` |
| `sellerName` | `"Sample Motors"` |
| `sellerPhone` | `"+10000000000"` |
| `sellerCity` / `sellerState` | `"Sample City"` / `"CA"` |
| `distanceFromSearch` | `12` |
| `images` | `["https://images.autotrader.com/000000000.jpg"]` |

Every record also carries `vehicleHistory` (a set of flags: no accidents reported, no salvage title, no frame damage, no flood damage, single owner, free report available), the full `dealer` object (name, phone, address, and distance, never trimmed down), `specifications`, `warranties`, `pricingDetail` (the raw pricing block `price` and `dealIndicator` are read from), `description`, `doors`, `isReducedPrice`, `hasSpecialOffer`, `isNewlyListed`, `isHot`, `daysOnSite`, `stockId`, `kbbVehicleId`, `styleId`, `kbbPriceLow`, `kbbPriceHigh`, `kbbPriceDelta`, `imageCount`, and `scrapedAt`. When "Fetch full detail per listing" is on, or always for a pasted individual listing URL in URL mode, the record also gets `enriched: true` and a `detailFields` object holding whatever extra fields the fuller per-vehicle page carries beyond the fields already listed above.

### How to Use

1. Pick a mode: `search` (build a query from filters) or `url` (paste AutoTrader search or listing links).
2. In search mode, set a ZIP code and any filters you need (make, model, price, year, body style, fuel type, drivetrain, color, vehicle history, deal rating, seller type). In URL mode, paste one or more links.
3. Turn on "Fetch full detail per listing" if you want full options, extended specs, and complete vehicle history per vehicle. It adds one extra request per listing. A pasted individual listing URL in URL mode always fetches this detail page, regardless of the toggle.
4. Set Max listings to control run size and cost, then click Start. Download the dataset as JSON, CSV, or Excel, or read it through the API.

**Search by make and model near a ZIP code:**

```json
{
  "mode": "search",
  "zip": "90012",
  "make": ["HONDA"],
  "model": ["CIVIC"],
  "searchRadius": 50,
  "maxListings": 50
}
```

**Search with filters:**

```json
{
  "mode": "search",
  "zip": "10001",
  "bodyStyle": ["suv"],
  "fuelType": ["hybrid"],
  "driveType": ["awd-4wd"],
  "minPrice": 20000,
  "maxPrice": 40000,
  "minYear": 2021,
  "sortBy": "price-asc",
  "maxListings": 100
}
```

**Paste one or more AutoTrader URLs:**

```json
{
  "mode": "url",
  "urls": [
    "https://www.autotrader.com/cars-for-sale/all-cars/honda/civic/los-angeles-ca",
    "https://www.autotrader.com/cars-for-sale/vehicle/000000001"
  ],
  "maxListings": 60
}
```

**Enrich every listing with the full detail page:**

```json
{
  "mode": "search",
  "zip": "90012",
  "make": ["TOYOTA"],
  "fetchDetails": true,
  "maxListings": 25
}
```

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("abotapi/autotrader-com-scraper").call(run_input={
    "mode": "search",
    "zip": "90012",
    "make": ["HONDA"],
    "maxListings": 50,
})
for listing in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(listing["year"], listing["make"], listing["model"], listing["price"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('abotapi/autotrader-com-scraper').call({
  mode: 'search',
  zip: '90012',
  make: ['HONDA'],
  maxListings: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Or connect it to Make, Zapier, n8n, Google Sheets, or webhooks from the **Integrations** tab.

#### How maxPages and maxListings interact

`maxListings` is the only cap most runs need: it stops the whole run once that many listings have been collected, and `0` means unlimited. `maxPages` defaults to `0` (unlimited) and exists only as a safety bound on how many result pages one search or URL walks; the walk already stops on its own once a page comes back empty or repeats listings already collected, or as soon as `maxListings` is reached, whichever comes first. Set `maxPages` to a specific number only when you want an explicit page cap below that natural stop.

#### Resume a large pull

For a very large walk-all pull, use `resumeFromRunId` in a follow-up run instead of starting over: paste the ID of a previous run (or its dataset), and this run loads the listings it already saved, skips them, and appends only new listings to a fresh dataset. Leave it empty for a normal run. This is a manual continuation of one pull, not a recurring update mechanism; see the FAQ below for scheduled runs.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step after the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable summary of each record, not the full JSON. Each item becomes one entry with a title and its key fields flattened to plain text. The complete record always stays in the Apify dataset.

1. Authorize a connector once under **Apify, Settings, Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field. If the picker is empty, you have not authorized a connector yet.
3. For **Notion**, also set `notionParentPageUrl` to the page where item pages should be created; it is required to enable the Notion export, and ignored by other connectors.

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | `search` to build a query from filters, or `url` to paste AutoTrader search or listing links. |
| `zip` | string | none (prefill: `90012`) | US ZIP code the search is centred on. Required in search mode. |
| `searchRadius` | integer | `50` | Search radius in miles (10 to 500). |
| `make` | array | none (prefill: `["HONDA"]`) | Vehicle make codes, e.g. HONDA, TOYOTA. Empty for all makes. |
| `model` | array | none | Vehicle model codes, e.g. CIVIC, CAMRY. Empty for all models of the selected make(s). |
| `minYear` | integer | none | Oldest model year to include. |
| `maxYear` | integer | none | Newest model year to include. |
| `minPrice` | integer | none | Lowest listing price to include, in USD. |
| `maxPrice` | integer | none | Highest listing price to include, in USD. |
| `maxMileage` | integer | none | Highest odometer reading to include. |
| `condition` | array | none | New, Used, Manufacturer Certified, or Third-Party Certified. Empty for all. |
| `bodyStyle` | array | none | Sedan, SUV/Crossover, Truck, Coupe, Convertible, Hatchback, Van/Minivan, or Wagon. |
| `fuelType` | array | none | Gasoline, Hybrid, Electric, Diesel, Plug-in Hybrid, or Hydrogen. |
| `driveType` | array | none | AWD/4WD, Front Wheel Drive, or Rear Wheel Drive. |
| `transmission` | array | none | Automatic or Manual. |
| `exteriorColor` | array | none | Simplified exterior color, e.g. BLACK, WHITE, RED, BLUE, GRAY. |
| `vehicleHistory` | array | none | Clean Title, No Accidents, No Frame Damage, Single Owner, or Free Report. |
| `dealType` | array | none | Good Price or Great Price, per the site's own price rating. |
| `sellerType` | string | `any` | Restrict to `dealer` or `private` sellers, or leave as `any`. |
| `sortBy` | string | `relevance` | Relevance, price, mileage, year, distance, or newest listed. |
| `urls` | array | none (prefill: one sample search URL) | AutoTrader search or listing URLs. URL mode only; the filter fields above are ignored. |
| `fetchDetails` | boolean | `false` | Enrich each listing with the fuller per-vehicle page (full options, extended specs, complete history). Adds one extra request per listing. |
| `maxListings` | integer | `20` | The sole soft cap on the run, applied across the whole run, not per page or per search. `0` means unlimited. |
| `maxPages` | integer | `0` | Safety bound on result pages walked per search or URL. `0` means unlimited: the walk stops on its own once a page comes back empty or repeats listings already collected, or sooner once `maxListings` is reached. |
| `resumeFromRunId` | string | none | Paste a previous run ID or dataset ID to continue a large pull: listings already saved there are skipped, so this run only appends new ones. |
| `proxy` | object | Apify Proxy, Residential group | Connection settings. Leave the country unset. Requires a plan that includes the Residential proxy group. |
| `sessionCookie` | string | none | Optional, advanced. Only needed if a run reports it could not retrieve results. Paste the cookie header from a signed-in session on autotrader.com; the actor then uses it for every request. The cookie is short-lived (about 15 to 30 minutes), so capture a fresh one right before the run. Leave blank for normal use. |
| `mcpConnectors` | array | none | Optionally send results into apps you already use via MCP connectors (Notion, Linear, Airtable, Apify). Leave empty to skip; never changes the dataset output. |
| `notionParentPageUrl` | string | none | Notion connector only: page under which item pages are created. Required to enable the Notion export; ignored by other connectors. |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run (1 to 1000). Does not affect the dataset. |

### Output Example

> Sample shape: values are illustrative placeholders, not from a live listing.

```json
{
  "id": "000000001",
  "vin": "1XXXX00000X000000",
  "url": "https://www.autotrader.com/cars-for-sale/vehicle/000000001",
  "title": "Used 2023 Sample Make Sample Model",
  "year": 2023,
  "make": "Sample Make",
  "model": "Sample Model",
  "trim": "Sample Trim",
  "price": 22000,
  "displayPrice": 22000,
  "dealIndicator": "Great",
  "kbbFairPurchasePrice": 22500,
  "kbbPriceLow": 21000,
  "kbbPriceHigh": 23500,
  "mileage": 30000,
  "exteriorColor": "White",
  "interiorColor": "Black",
  "fuelType": "Gasoline",
  "transmission": "Automatic",
  "driveType": "Front Wheel Drive",
  "mpgCity": 30,
  "mpgHighway": 38,
  "sellerName": "Sample Motors",
  "sellerType": "dealer",
  "isPrivateSeller": false,
  "sellerPhone": "+10000000000",
  "sellerCity": "Sample City",
  "sellerState": "CA",
  "sellerZip": "00000",
  "vehicleHistory": {
    "noAccidentsReported": true,
    "noSalvageTitle": true,
    "noFrameDamage": true,
    "noFloodDamage": true,
    "singleOwner": true,
    "freeHistoryReport": false
  },
  "images": ["https://images.autotrader.com/000000000.jpg"],
  "dealer": {
    "name": "Sample Motors",
    "phone": { "value": "0000000000" },
    "location": { "address": { "city": "Sample City", "state": "CA", "zip": "00000" } }
  }
}
```

### Plan Requirement

This actor requires an Apify Proxy plan that includes the Residential group (Starter plan or higher); the default connection setting already selects it. Leave the country unset: AutoTrader returns the same US listings to any residential exit, since the results follow the ZIP code you search, not the visitor's location. The actor automatically tries a different connection when one is refused, but without a Residential-capable plan most runs will not retrieve any results at all.

### FAQ

#### How much does it cost?

You pay per event: a small charge when the run starts, a charge for each listing returned in the dataset, and an additional charge per listing when "Fetch full detail per listing" is switched on, or always for a pasted individual listing URL in URL mode regardless of that setting. The **Pricing** tab shows the current rates. Use **Max listings** to cap the cost of any run.

#### Is it legal to scrape AutoTrader?

This actor collects only publicly available vehicle listing data. You are responsible for how you use it: follow AutoTrader's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Listing facts such as price and mileage are generally not protected, but photos and dealer-supplied content may be subject to third-party rights, and seller contact details should be handled carefully.

#### Can I run this on a schedule to catch new listings?

Yes, schedule it from the **Schedules** tab. There is no built-in incremental mode though: each scheduled run is independent and simply returns whatever currently matches your search, with no automatic new-versus-already-seen comparison across separate runs. If you are working through one very large result set over several runs, use `resumeFromRunId` to continue it, but that is a one-time continuation of a single pull, not a recurring diff.

#### What is the difference between maxListings and maxPages?

`maxListings` is the cap almost everyone wants: it stops the whole run once that many listings are collected. `maxPages` only bounds how many result pages a single search or URL walks before giving up, and its default of `0` already lets the walk stop naturally on its own. Leave `maxPages` at `0` unless you specifically want a lower, explicit page limit.

#### Why did my run fail instead of returning an empty dataset?

If every attempt to load a search is turned away before any results come back, the run stops with a clear failure message so "no vehicles match this search" is never confused with "nothing could be read." Run it again in a few minutes, and make sure Apify Proxy is set to the Residential group with no country pinned. If a search legitimately matches nothing, the run still succeeds and simply returns an empty dataset with a status message saying so.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear, or Airtable.

### 🔗 Want more Autotrader data?

Pair this actor with these related scrapers from the same team:

<table>
<tr><td>🚗 <a href="https://apify.com/abotapi/autotrader"><b>AutoTrader UK Scraper</b></a><br>Pull structured vehicle listings from autotrader.co.uk at scale. Search by filters or use...</td><td>🚗 <a href="https://apify.com/abotapi/easyauto123-cars-scraper"><b>EasyAuto123 Scraper</b></a><br>Scrape EasyAuto123 vehicle listings into clean structured data. Extract prices, VINs...</td></tr>
<tr><td>🚗 <a href="https://apify.com/abotapi/cars-com-scraper"><b>Cars.com Scraper</b></a><br>Scrape cars.com listings by make, ZIP and radius. 90+ fields per car: price, MSRP...</td><td>🚗 <a href="https://apify.com/abotapi/mobile-de-scraper"><b>mobile.de</b></a><br>From $0.8/1K. Scrape mobile.de vehicle listings with 30+ structured fields including...</td></tr>
<tr><td>🚗 <a href="https://apify.com/abotapi/carsales-au-scraper"><b>Carsales.com.au Scraper</b></a><br>Scrape structured vehicle listings from Carsales.com.au from $1 per 1K results. Built to...</td><td>🚗 <a href="https://apify.com/abotapi/turo-scraper"><b>Turo Scraper</b></a><br>Collect Turo vehicles by location and trip dates or listing URLs. Get make, model, year...</td></tr>
</table>

👉 [Browse all abotapi scrapers](https://apify.com/abotapi)

### 💬 Support & custom scrapers

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/autotrader-com-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <abotapi@proton.me> or message [Telegram @abotapi](https://t.me/abotapi).
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to build a query from filters below, or 'url' to paste Autotrader search or listing links.

## `zip` (type: `string`):

US ZIP code the search is centred on. Required in search mode.

## `searchRadius` (type: `integer`):

Distance from the ZIP code to search. Use a large value for a wider area.

## `make` (type: `array`):

Vehicle make codes, e.g. HONDA, TOYOTA, FORD. Leave empty for all makes.

## `model` (type: `array`):

Vehicle model codes, e.g. CIVIC, CAMRY. Leave empty for all models of the selected make(s).

## `minYear` (type: `integer`):

Oldest model year to include.

## `maxYear` (type: `integer`):

Newest model year to include.

## `minPrice` (type: `integer`):

Lowest listing price to include.

## `maxPrice` (type: `integer`):

Highest listing price to include.

## `maxMileage` (type: `integer`):

Highest odometer reading to include.

## `condition` (type: `array`):

New, Used, Certified, or Third-party certified. Leave empty for all.

## `bodyStyle` (type: `array`):

Filter by one or more body styles.

## `fuelType` (type: `array`):

Filter by fuel type.

## `driveType` (type: `array`):

Filter by drivetrain.

## `transmission` (type: `array`):

Filter by transmission.

## `exteriorColor` (type: `array`):

Filter by simplified exterior color, e.g. BLACK, WHITE, RED, BLUE, GRAY.

## `vehicleHistory` (type: `array`):

Restrict to vehicles matching history criteria.

## `dealType` (type: `array`):

Restrict to Good Price or Great Price listings (per the site's price rating).

## `sellerType` (type: `string`):

Restrict to dealers or private sellers.

## `sortBy` (type: `string`):

Ordering of the results.

## `urls` (type: `array`):

Paste Autotrader search result pages or individual listing pages. Multiple URLs supported. In URL mode the filter fields above are ignored.

## `fetchDetails` (type: `boolean`):

When on, each listing is enriched with the richer per-vehicle page (full options, extended specs, complete history). Adds an extra request per listing.

## `maxListings` (type: `integer`):

The sole soft cap on the run, applied across the whole run (not per page or per search). Default 20. Set 0 for unlimited.

## `maxPages` (type: `integer`):

Safety bound on how many result pages to walk per search or URL. 0 (default) means unlimited — the walk stops naturally once a page comes back empty or keeps repeating listings already collected, or sooner once Max listings is reached. Set a number only for an explicit page cap below that natural stop.

## `resumeFromRunId` (type: `string`):

Optional. Paste a previous run ID or dataset ID to continue a large walk-all pull: listings already saved by that run are loaded before scraping starts and skipped, so this run only appends new listings. Leave empty for a normal fresh run.

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

Autotrader serves the same US listings to any residential exit (results are driven by the ZIP code, not the visitor's location). Leave the country unset so the actor can work through its own ordered pool of residential exits — it starts with the exits the site currently accepts and falls back to the rest. Requires an Apify Proxy plan that includes the Residential group (Starter or higher).

## `sessionCookie` (type: `string`):

Optional. Paste a full cookie header from a logged-in browser on autotrader.com (must include a cleared `_abck` plus `bm_sz`/`ak_bmsc`). When supplied, the run replays it over fast HTTP and skips the browser entirely — far cheaper and more reliable. The cookie is short-lived (~15–30 min); refresh it before each run. Leave blank to use the default browser mode.

## `mcpConnectors` (type: `array`):

Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write. Leave empty to skip; never changes the dataset output. Supported: Notion, Linear, Airtable, Apify.

## `notionParentPageUrl` (type: `string`):

URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on items written to each connector per run. Does not affect the dataset.

## Actor input object example

```json
{
  "mode": "search",
  "zip": "90012",
  "searchRadius": 50,
  "make": [
    "HONDA"
  ],
  "sellerType": "any",
  "sortBy": "relevance",
  "urls": [
    "https://www.autotrader.com/cars-for-sale/all-cars/honda/civic/los-angeles-ca"
  ],
  "fetchDetails": false,
  "maxListings": 20,
  "maxPages": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxNotifyListings": 50
}
```

# Actor output Schema

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

No description

## `dealer` (type: `string`):

No description

## `value` (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 = {
    "mode": "search",
    "zip": "90012",
    "make": [
        "HONDA"
    ],
    "urls": [
        "https://www.autotrader.com/cars-for-sale/all-cars/honda/civic/los-angeles-ca"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/autotrader-com-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 = {
    "mode": "search",
    "zip": "90012",
    "make": ["HONDA"],
    "urls": ["https://www.autotrader.com/cars-for-sale/all-cars/honda/civic/los-angeles-ca"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/autotrader-com-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 '{
  "mode": "search",
  "zip": "90012",
  "make": [
    "HONDA"
  ],
  "urls": [
    "https://www.autotrader.com/cars-for-sale/all-cars/honda/civic/los-angeles-ca"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call abotapi/autotrader-com-scraper --silent --output-dataset

```

## MCP server setup

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