# Cars.com Scraper (`datascrapers/cars-scraper`) Actor

Scrape Cars.com vehicle listings from search result URLs. Returns pricing, specs, images, dealer info, and features for each vehicle with pay-per-event charging.

- **URL**: https://apify.com/datascrapers/cars-scraper.md
- **Developed by:** [Farhan Ali](https://apify.com/datascrapers) (community)
- **Categories:** Travel, E-commerce, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 cars

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/platform/actors/running/actors-in-store#pay-per-event

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

**Cars.com Scraper** creates a structured dataset of vehicle listings collected from [Cars.com](https://www.cars.com), the US automotive marketplace. Each dataset item represents one vehicle and can include price, year, make, model, trim, VIN, mileage, transmission, engine, dealer details, and image URLs. Query the source by pasting Cars.com search-result URLs, control the result limit with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, or another supported format.

### Dataset at a glance

| Property | Value |
|---|---|
| Source | cars.com (US automotive marketplace) |
| Record unit | One vehicle listing |
| Input methods | Cars.com search-result URLs (`searchUrls`) |
| Main identifiers | `listingId`, `listingUrl`, `vin` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, HTML (Apify dataset exports) |
| Update model | Fresh records per Actor run |
| Pricing | $1.00 per 1,000 vehicles |

### Coverage and available records

The Actor collects vehicles from public Cars.com search-result pages using a URL entry point:

- **URL-based**: Pass one or more Cars.com search-result URLs in `searchUrls` (for example `https://www.cars.com/shopping/results/?stock_type=new&zip=72076&maximum_distance=all`). Filters encoded in the URL query string — zip, maximum distance, stock type, makes, models, and price/year/mileage ranges — are applied during collection.
- **Detail enrichment**: Each vehicle in the search results is visited to collect its detail-page fields (specs, dealer information, images, and financing calculator values).

Record types and limits:

- **Listing records** are always collected: `listingId`, `listingUrl`, `title`, `year`, `make`, `model`, `trim`, `exteriorColor`, and `imageUrls`.
- **Detail fields** are conditional: `price`, `mileage`, `vin`, `transmission`, `engine`, `fuelType`, `drivetrain`, `bodystyle`, `interiorColor`, `dealerName`, dealer location, and seller/stock information are returned when the vehicle's detail page is available.
- **Financing fields** (`calc_*` and `listPrice`) appear only when the listing publishes a calculator breakdown.
- **Result cap**: `maxItems` limits the number of vehicles collected (`0` means unlimited, the default).

Known exclusions: MPG is not collected; content Cars.com only shows behind login is not collected; each run captures page state at run time (no historical snapshots).

### Data dictionary

Field names below match dataset record JSON properties exactly. Fields marked *conditional* appear only when the vehicle's detail page is available.

| Field | Type | Nullable | Description | Example |
|---|---:|---|---|---|
| `listingId` | string | No | Cars.com vehicle identifier; best stable deduplication key | `926ec45f-5f2e-4758-9869-4496095498db` |
| `listingUrl` | string | No | Vehicle detail page URL | `https://www.cars.com/vehicledetail/926ec45f-.../` |
| `title` | string | No | Full listing title | `2026 Lotus Emira V6 SE` |
| `year` | integer | No | Model year | `2026` |
| `make` | string | No | Manufacturer | `Lotus` |
| `model` | string | No | Model name | `Emira` |
| `trim` | string | Yes | Trim level | `V6 SE` |
| `price` | number | Yes | Listed sale price (USD) | `124200.0` |
| `msrp` | number | Yes | Manufacturer's suggested retail price when published | `null` |
| `mileage` | integer | Yes | Odometer reading | `5` |
| `vin` | string | Yes | Vehicle identification number | `SCCLEJAX1THB10627` |
| `exteriorColor` | string | Yes | Exterior color | `Magma Red` |
| `interiorColor` | string | Yes | Interior color | `Black` |
| `transmission` | string | Yes | Transmission type | `6-Speed Manual` |
| `engine` | string | Yes | Engine specification | `3.5L V6 24V MPFI DOHC Supercharged` |
| `fuelType` | string | Yes | Fuel type | `Gasoline` |
| `drivetrain` | string | Yes | Drivetrain configuration | `Rear-wheel Drive` |
| `bodystyle` | string | Yes | Body style | `Coupe` |
| `stockType` | string | Yes | New or used | `New` |
| `certifiedPreowned` | boolean | No | Certified pre-owned flag | `false` |
| `sellerType` | string | Yes | Seller type (`dealership` or private) | `dealership` |
| `dealerName` | string | Yes | Selling dealer name | `Star Motor Cars` |
| `dealerCity` | string | Yes | Dealer city | `Houston` |
| `dealerState` | string | Yes | Dealer state abbreviation | `TX` |
| `dealerZip` | string | Yes | Dealer ZIP code | `77024` |
| `imageUrl` | string | Yes | Primary listing image URL | `https://platform.cstatic-images.com/...jpg` |
| `imageUrls` | string\[] | Yes | All listing image URLs | `["https://...jpg", ...]` |
| `listPrice` | string | Yes | Rendered list price with currency symbol | `$124,200` |
| `searchUrl` | string | No | Search-result URL the vehicle was found on | `https://www.cars.com/shopping/results/?...` |

Financing calculator fields (`calc_car_price`, `calc_down_payment`, `calc_net_tradein_value`, `calc_estimated_sales_tax_(0.0%)`, `calc_total_loan_amount`, `calc_total_interest_paid`, `calc_total_loan_&_interest_paid`) are all `string` values produced from the listing's calculator output and are conditional on that output being present.

### Example dataset record

Real record produced from a Cars.com search for new Honda Accords (`searchUrls` with `makes[]=honda&models[]=accord`, `maxItems: 3`). The `imageUrls` array is truncated to two items for readability.

```json
{
  "listingId": "926ec45f-5f2e-4758-9869-4496095498db",
  "listingUrl": "https://www.cars.com/vehicledetail/926ec45f-5f2e-4758-9869-4496095498db/",
  "title": "2026 Lotus Emira V6 SE",
  "year": 2026,
  "make": "Lotus",
  "model": "Emira",
  "trim": "V6 SE",
  "price": 124200.0,
  "msrp": null,
  "mileage": 5,
  "vin": "SCCLEJAX1THB10627",
  "exteriorColor": "Magma Red",
  "interiorColor": "Black",
  "transmission": "6-Speed Manual",
  "engine": "3.5L V6 24V MPFI DOHC Supercharged",
  "fuelType": "Gasoline",
  "drivetrain": "Rear-wheel Drive",
  "bodystyle": "Coupe",
  "stockType": "New",
  "certifiedPreowned": false,
  "sellerType": "dealership",
  "dealerName": "Star Motor Cars",
  "dealerCity": "Houston",
  "dealerState": "TX",
  "dealerZip": "77024",
  "imageUrl": "https://platform.cstatic-images.com/xlarge/in/v2/stock_photos/926ec45f-.../1.jpg",
  "imageUrls": [
    "https://platform.cstatic-images.com/xlarge/in/v2/stock_photos/926ec45f-.../1.jpg",
    "https://platform.cstatic-images.com/xlarge/in/v2/stock_photos/926ec45f-.../2.jpg"
  ],
  "listPrice": "$124,200",
  "searchUrl": "https://www.cars.com/shopping/results/?stock_type=new&zip=72076&maximum_distance=all"
}
```

The record above was produced with this input:

```json
{
  "searchUrls": [
    { "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=honda&models[]=accord&zip=72076&maximum_distance=all" }
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
| `searchUrls` | array (requestListSources) | Yes | — | Cars.com search-result URLs | URL-based entry point. Filters are read from the URL query string |
| `maxItems` | integer | No | `0` | `0` or any positive integer | Maximum vehicles to collect; `0` = unlimited |
| `proxyConfiguration` | object | No | Apify proxy, `RESIDENTIAL` group | Apify proxy groups or custom proxies | Residential proxies are recommended; datacenter IPs are frequently rate-limited |

Minimal request:

```json
{
  "searchUrls": [
    { "url": "https://www.cars.com/shopping/results/?stock_type=new&zip=72076&maximum_distance=all" }
  ]
}
```

Advanced request with a result cap:

```json
{
  "searchUrls": [
    { "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=toyota&models[]=rav4&zip=10001&maximum_distance=50" }
  ],
  "maxItems": 500,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Retrieve the data through the API

The Actor runs on the Apify platform, so there is no server to host and no crawling infrastructure to maintain.

1. Start the Actor with a JSON input (console or API).
2. Wait for the run to finish, or use a synchronous endpoint if you want the response inline.
3. Retrieve items from the run's default dataset.
4. Paginate or export the dataset.

Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR-APIFY-TOKEN")

run_input = {
    "searchUrls": [
        {"url": "https://www.cars.com/shopping/results/?stock_type=new&zip=72076&maximum_distance=all"}
    ],
    "maxItems": 20,
}

run = client.actor("datascrapers/cars-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["listingId"], item["year"], item["make"], item["model"], item["price"])
```

Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.

### Data quality and record handling

- **Conditional fields**: detail fields are present only when the vehicle's detail page is available. A fallback record contains the listing-only fields when the detail page cannot be read.
- **Source changes**: Cars.com page structure and values can change; unreadable fields are returned as null rather than fabricated.
- **Deduplication**: each run appends fresh records; the Actor does not deduplicate vehicles across runs. Use `listingId` as the stable key and filter repeated runs against previously stored IDs.
- **Overlapping searches**: the same vehicle may appear under multiple search URLs and will be emitted once per matching URL.
- **Rate limits**: Cars.com rate-limits automated traffic. Residential proxies are recommended for consistent coverage.

### Export and pipeline examples

| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API poll or webhook consumer | Store inventory alongside market-trend tables |
| Google Sheets | Apify Google Sheets integration | Share vehicle shortlists with buyers |
| CRM / lead pipeline | Webhook on run completion | Push new listings into outreach workflows |
| S3 / cloud storage | Scheduled export via Apify scheduler + integration | Archival of inventory snapshots |

### Pricing and cost examples

The Actor uses pay-per-event pricing with one chargeable result event, billed per vehicle:

| Event | Trigger | Rate (per 1,000 vehicles) |
|---|---|---|
| Vehicle result | Every vehicle record pushed to the dataset | $1.00 |

Example costs:

| Records | Estimated base cost |
|---:|---:|
| 1,000 | $1.00 |
| 10,000 | $10.00 |
| 100,000 | $100.00 |

Apify paid plans reduce the per-1,000 rate (for example $0.80 per 1,000 vehicles at the Gold tier). Compute units consumed by the run are billed by your Apify plan. Estimates depend on the verified pricing model and the options selected for the run.

### Limitations and responsible data use

- The Actor collects publicly accessible data from Cars.com pages only.
- MPG is not collected; financing calculator fields appear only when the listing publishes them.
- Field availability depends on what Cars.com renders at run time; some values can be null or missing, and site changes can alter fields.
- The Actor does not provide historical snapshots unless you store them yourself.
- Large runs require residential proxies; without them, coverage may degrade due to rate limiting.
- You are responsible for compliance with Cars.com's terms of service, applicable privacy law, and any contractual obligations before using the data.

### Dataset questions

#### What does one dataset item represent?

One vehicle listing from Cars.com search results, enriched with its detail-page data when available.

#### Which field should I use as a unique identifier?

`listingId` is the stable Cars.com identifier and is the recommended deduplication key. The `listingUrl` and `vin` are reasonable secondary keys.

#### Are fields nullable or conditional?

Yes. Detail fields (price, mileage, vin, transmission, engine, dealer details) exist only when the vehicle's detail page is read; financing `calc_*` fields exist only when the listing publishes a calculator breakdown. Fields the listing does not render are returned as null.

#### Can I retrieve the records as CSV or JSON?

Yes. The dataset can be exported as JSON, CSV, Excel, XML, or HTML from the Apify Console, and queried through the Dataset API.

#### Does the Actor return historical data?

No. Each run captures the state of the listings at run time. To track price or inventory changes, schedule repeated runs and store the outputs yourself.

#### What counts as a billable result?

One pay-per-event charge applies for every vehicle record pushed to the dataset ($1.00 per 1,000 vehicles).

### Related datasets from Data Scrapers

- **[Apartments.com Scraper](https://apify.com/datascrapers/apartments-scraper)** — Rental property listings with optional detail enrichment, useful alongside vehicle data for location-based market research.
- **[Redfin Scraper](https://apify.com/datascrapers/redfin-scraper)** — Property listings and price signals for asset-market research.
- **[Glassdoor Jobs Scraper](https://apify.com/datascrapers/glassdoor-jobs-scraper)** — Job listings and labor-market signals that complement vehicle pricing in regional economic analysis.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

## `searchUrls` (type: `array`):

Cars.com search result URLs to scrape (e.g. https://www.cars.com/shopping/results/?stock\_type=new\&zip=72076\&maximum\_distance=all)

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

Maximum number of listings to scrape (0 = unlimited)

## `proxyConfiguration` (type: `object`):

Proxy settings for anti-bot protection

## Actor input object example

```json
{
  "searchUrls": [
    {
      "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=honda&models[]=accord&zip=72076&maximum_distance=all"
    }
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped car listings

# 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 = {
    "searchUrls": [
        {
            "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=honda&models[]=accord&zip=72076&maximum_distance=all"
        }
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/cars-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 = {
    "searchUrls": [{ "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=honda&models[]=accord&zip=72076&maximum_distance=all" }],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/cars-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 '{
  "searchUrls": [
    {
      "url": "https://www.cars.com/shopping/results/?stock_type=new&makes[]=honda&models[]=accord&zip=72076&maximum_distance=all"
    }
  ],
  "maxItems": 20
}' |
apify call datascrapers/cars-scraper --silent --output-dataset

```

## MCP server setup

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