# Cars Com Extractor (`kawsar/cars-com-extractor`) Actor

Cars.com Extractor pulls vehicle listings from any Cars.com search, so you get price, MSRP, mileage, VIN, trim, dealer and photos in one clean table for pricing research and lead lists.

- **URL**: https://apify.com/kawsar/cars-com-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Automation, E-commerce, Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/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 Extractor

Turn any Cars.com search into clean, structured vehicle data. Give the actor a search (by ZIP and make, or a full Cars.com URL) and it returns one row per listing with price, MSRP, mileage, VIN, year, make, model, trim, dealer, and photos. Export to JSON, CSV, or Excel, or pipe it straight into a spreadsheet, a pricing model, or a CRM.

Cars.com lists millions of new and used vehicles across thousands of dealers. Reading that inventory by hand is slow and does not scale. This actor walks the search results for you, reads every listing card, and hands back a flat table you can actually work with.

### Why use this actor

- **Full listing detail per row.** Price, MSRP, mileage, VIN, trim, drivetrain, fuel type, color, dealer, and photo URLs, all in one record.
- **Two ways to search.** Paste exact Cars.com search URLs, or just enter a ZIP and make and let the actor build the search.
- **Filters that match the site.** New, used, or certified pre-owned, distance radius, and sort order.
- **Handles pagination for you.** The actor pages through results until it hits your item cap, deduplicating by listing ID as it goes.
- **Clean, predictable schema.** Every field is typed and documented. Numbers come back as numbers, not strings.
- **Ready for automation.** Run on a schedule, connect to Google Sheets or a webhook, or call it through the Apify API.

### Use cases

- **Competitor and market pricing.** Track how a make or model is priced across a region and how prices shift over time.
- **Inventory monitoring.** Watch how long specific trims sit on the lot and when new stock appears.
- **Dealer lead generation.** Build a list of dealers carrying the inventory you care about, with names and ZIP codes.
- **Valuation and analytics.** Feed real listing data into a pricing model, a dashboard, or a market report.
- **Deal alerts.** Schedule a search and get notified when a matching car is listed or a price drops.

### Input

Run a search one of two ways. Provide one or more full Cars.com search URLs, or fill in a ZIP code (optionally with makes) and let the actor construct the search. If both are given, the URLs are used.

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `searchUrls` | array | No\* | `[]` | Full Cars.com shopping result URLs. Use when you already have the exact search link. |
| `zipCode` | string | No\* | `60606` | ZIP the search is centered on. Required if no search URLs are given. |
| `makes` | array | No | `["audi"]` | Makes to filter by, for example `toyota`, `ford`. Leave empty for all makes. |
| `maximumDistance` | integer | No | `50` | Search radius in miles from the ZIP (10 to 500). |
| `stockType` | select | No | `all` | Condition filter: `all`, `new`, `used`, or `cpo`. |
| `sort` | select | No | `best_match_desc` | Result order: best match, price, mileage, year, best deal, or distance. |
| `maxItems` | integer | No | `20` | Cap on listings collected per run (1 to 1000). |
| `requestTimeoutSecs` | integer | No | `30` | Per-request timeout in seconds (5 to 120). |

\*Provide either `searchUrls`, or a `zipCode`. One of the two is required.

#### Example: search by ZIP and make

```json
{
    "zipCode": "60606",
    "makes": ["audi"],
    "maximumDistance": 50,
    "stockType": "all",
    "sort": "best_match_desc",
    "maxItems": 20
}
```

#### Example: search by URL

```json
{
    "searchUrls": [
        "https://www.cars.com/shopping/results/?makes[]=audi&zip=60606&maximum_distance=50&sort=best_match_desc"
    ],
    "maxItems": 200
}
```

### Output

Each vehicle listing becomes one dataset record. Results are available as JSON, CSV, Excel, or through the Apify API.

| Field | Type | Description |
|-------|------|-------------|
| `listingId` | string | Cars.com listing identifier |
| `vin` | string | Vehicle identification number |
| `stockType` | string | New, Used, or certified |
| `year` | integer | Model year |
| `make` | string | Manufacturer |
| `model` | string | Model name |
| `trim` | string | Trim level |
| `bodyStyle` | string | Body type, for example SUV or Sedan |
| `drivetrain` | string | Drivetrain, for example All-wheel Drive |
| `fuelType` | string | Fuel type |
| `exteriorColor` | string | Exterior color |
| `price` | integer | Listed price in USD |
| `msrp` | integer | Manufacturer suggested price when shown |
| `mileage` | integer | Odometer reading |
| `cpo` | boolean | Certified pre-owned flag |
| `dealerName` | string | Selling dealer |
| `dealerZip` | string | Dealer ZIP code |
| `primaryImage` | string | Main listing photo URL |
| `listingImages` | array | All photo URLs on the card |
| `imageCount` | integer | Number of photos captured |
| `detailUrl` | string | Link to the full listing page |
| `searchUrl` | string | The search this listing came from |
| `rankingPosition` | integer | Position in the collected results |
| `scrapedAt` | string | UTC timestamp of the run (ISO 8601) |

#### Example output record

```json
{
    "listingId": "107ec708-5b14-41af-a1f7-bcff77627403",
    "vin": "WA15AAGU7T2048258",
    "stockType": "New",
    "year": 2026,
    "make": "Audi",
    "model": "Q5",
    "trim": "Premium Plus",
    "bodyStyle": "SUV",
    "drivetrain": "All-wheel Drive",
    "fuelType": "Gasoline",
    "exteriorColor": "green",
    "price": 57815,
    "msrp": 60425,
    "mileage": 10,
    "cpo": false,
    "dealerName": "The Audi Exchange Highland Park",
    "dealerZip": "60035",
    "primaryImage": "https://platform.cstatic-images.com/in/v2/.../6Ayd029p3xVD1S5YnPc7Y5HTzWU.jpg",
    "listingImages": [
        "https://platform.cstatic-images.com/large/in/v2/.../6Ayd029p3xVD1S5YnPc7Y5HTzWU.jpg",
        "https://platform.cstatic-images.com/large/in/v2/.../BB1wyloUtnPIeM_H3uYuJZLhRl4.jpg"
    ],
    "imageCount": 6,
    "detailUrl": "https://www.cars.com/vehicledetail/107ec708-5b14-41af-a1f7-bcff77627403/",
    "searchUrl": "https://www.cars.com/shopping/results/?makes[]=audi&zip=60606&maximum_distance=50&sort=best_match_desc",
    "rankingPosition": 1,
    "scrapedAt": "2026-08-13T12:00:00+00:00"
}
```

### How to run

#### From Apify Console

1. Open the actor in Apify Console.
2. Enter a ZIP and make, or paste one or more Cars.com search URLs.
3. Set `maxItems` to how many listings you want.
4. Click **Start**. When the run finishes, open the **Dataset** tab and export as JSON, CSV, or Excel.

#### On a schedule

Attach a schedule in Apify to run the search every hour, day, or week. Combine it with a webhook or a Google Sheets integration to keep a live inventory feed without touching the actor again.

### How it works

The actor sends each search page through built-in bypass infrastructure, so you do not manage proxies or headers. It reads the structured listing data embedded in each result card, normalizes the fields, and pages through the results until it reaches your `maxItems` cap. Listings are deduplicated by their Cars.com listing ID, so the same car never lands in your dataset twice.

### Tips

- Start small. Run with `maxItems: 20` to check the output shape, then raise the cap for a full pull.
- To compare several makes or regions in one run, add multiple entries to `searchUrls`.
- Sort by `list_price_asc` to surface the cheapest inventory first, or `mileage_asc` for the lowest-mileage cars.
- Some fields depend on what Cars.com shows for a listing. MSRP, for example, is common on new cars and often absent on used ones.

### FAQ

**Do I need a Cars.com account or login?**
No. The actor reads only public search-result pages. It does not log in or submit any forms.

**Can I scrape used and certified pre-owned cars?**
Yes. Set `stockType` to `used` or `cpo`, or leave it on `all` to include everything.

**How many listings can I collect per run?**
Up to 1000, set with `maxItems`. The default is 20.

**What format is the data?**
JSON, CSV, or Excel from the Dataset tab, or JSON through the API.

**Why is a field empty on some records?**
Cars.com does not show every field on every listing. When a value is not present on the card, that field is left null rather than guessed.

### Legal

Use this actor for public data collection in line with Cars.com terms and applicable law. You are responsible for how you use the data you collect. This actor reads publicly visible listing pages only.

# Actor input Schema

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

Full Cars.com shopping result URLs to extract from. Use this when you already have the exact search links. Leave empty to build a search from the fields below.

## `zipCode` (type: `string`):

ZIP code the search is centered on. Used with the make, distance and sort fields to build a search when no search URLs are provided.

## `makes` (type: `array`):

Vehicle makes to filter by, for example audi, toyota, ford. Leave empty to include every make.

## `maximumDistance` (type: `integer`):

Search radius in miles from the ZIP code.

## `stockType` (type: `string`):

Condition filter for the listings.

## `sort` (type: `string`):

Order the results are returned in.

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

Maximum number of vehicle listings to collect per run across all searches.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.cars.com/shopping/results/?makes[]=audi&zip=60606&maximum_distance=50&sort=best_match_desc"
  ],
  "zipCode": "10019",
  "makes": [
    "toyota",
    "honda"
  ],
  "maximumDistance": 50,
  "stockType": "all",
  "sort": "best_match_desc",
  "maxItems": 20,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `vehicles` (type: `string`):

All extracted Cars.com vehicle listings, one row per vehicle.

# 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": [],
    "zipCode": "60606",
    "makes": [
        "audi"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/cars-com-extractor").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": [],
    "zipCode": "60606",
    "makes": ["audi"],
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/cars-com-extractor").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": [],
  "zipCode": "60606",
  "makes": [
    "audi"
  ]
}' |
apify call kawsar/cars-com-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kawsar/cars-com-extractor"
        }
    }
}

```

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/c5nyzAfOLfgqXoWXy/builds/ilM0ijMlRi0QVWhM8/openapi.json
