# CarGurus Scraper: Used Car Prices, Deal Ratings, VIN (`deepurple/cargurus-listings-scraper`) Actor

Scrape CarGurus used car listings by ZIP code and radius: price, deal rating, savings vs market in $ and %, VIN, mileage, days on market, accident and owner history, photos, plus dealer name, rating and business phone for lead lists. Pay per listing, no monthly fee.

- **URL**: https://apify.com/deepurple/cargurus-listings-scraper.md
- **Developed by:** [Misha Ershov](https://apify.com/deepurple) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 car listings

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

## CarGurus Listings Scraper: Used Car Prices, Deal Ratings and VIN Data

Collect used and new car listings from CarGurus by ZIP code or search URL, and get clean, structured rows ready for a spreadsheet, a database or a pricing model. Every row includes the VIN, price, CarGurus market price, deal rating, **savings versus market**, days on market, mileage, dealer details and photos.

You only need an Apify account. No API key, no login, no extra proxy subscription: residential US proxies are built in and selected by default.

### What you can do with it

- **Used car price monitoring.** Track asking prices for a make and model across several metro areas and see how they move week to week.
- **Dealer inventory research.** Pull every listing around a ZIP code and group it by dealer, make, trim or deal rating.
- **Deal hunting and flipping.** Sort by best deal, keep only `GREAT_PRICE` listings, and rank them by `marketSavings` and `marketSavingsPercent`.
- **Market analysis and valuation.** Build price-versus-mileage-versus-year datasets for any model, with `milesPerYear` and `vehicleAgeYears` already computed.
- **Lead lists for auto businesses.** Published dealer business names, cities and listed business phone lines.

### Input

| Field | What it does |
|---|---|
| `zipCodes` | US ZIP codes to search around (default `90210`). |
| `searchUrls` | Optional: paste cargurus.com results links. ZIP, radius, year, price and mileage in the link are honored. |
| `radiusMiles` | 10 to 500 miles, or `nationwide`. |
| `makes`, `models` | Keep only these makes / models, for example `Toyota` and `Camry`. |
| `entityIds` | Advanced: CarGurus make or model IDs (such as `m191`, `d2103`) to narrow the search at the source and read fewer pages. |
| `yearFrom`, `yearTo` | Model year range. |
| `priceMin`, `priceMax` | Asking price range in USD. |
| `mileageMin`, `mileageMax` | Odometer range. |
| `dealRatings` | Keep only chosen ratings: `GREAT_PRICE`, `GOOD_PRICE`, `FAIR_PRICE`, `HIGH_PRICE`, `OVERPRICED`, `NA`. |
| `sortBy` | Best deal, lowest or highest price, lowest or highest mileage. |
| `maxResults` | Total listings to return (default 50). You pay per returned listing, so this is your budget cap. |
| `maxPagesPerSearch` | Safety cap on result pages read per ZIP code. |
| `proxyConfiguration` | Defaults to Apify Residential, US. Leave it as is. |

#### Example input

```json
{
  "zipCodes": ["90210", "10001"],
  "radiusMiles": "50",
  "makes": ["Toyota"],
  "models": ["Camry"],
  "yearFrom": 2020,
  "priceMax": 30000,
  "dealRatings": ["GREAT_PRICE", "GOOD_PRICE"],
  "sortBy": "BEST_DEAL",
  "maxResults": 200
}
```

Make, model, year, price, mileage and deal-rating filters are applied to every row, so the output always respects them. A vehicle that appears in several searches is returned once (matched by VIN) and billed once.

### Output

One row per vehicle. Main fields:

| Group | Fields |
|---|---|
| Identity | `listingId`, `vin`, `stockNumber`, `listingTitle`, `detailUrl` |
| Vehicle | `make`, `model`, `year`, `trim`, `bodyType`, `transmission`, `engine`, `fuelType`, `doors`, `exteriorColor`, `interiorColor`, `options`, `description`, `cityMpg`, `highwayMpg`, `combinedMpg`, `safetyRatings` |
| Price and deal | `price`, `priceText`, `expectedPrice`, `priceDifferential`, `dealScore`, `dealRating`, `mileage`, `daysOnMarket`, `salesStatus` |
| History | `accidentCount`, `ownerCount`, `vehicleHistory` |
| Dealer | `dealerName`, `dealerId`, `sellerType`, `dealerCity`, `dealerState`, `dealerPostalCode`, `isFranchiseDealer`, `franchiseMake`, `dealerPhone`, `dealerPhoneText`, `dealerSmsNumber`, `supportsSms`, `howToShop`, `financingLenders` |
| Location and media | `distanceText`, `distanceMiles`, `imageUrl`, `imageUrls`, `imageCount`, `searchPosition` |
| **Added by this Actor** | `marketSavings`, `marketSavingsPercent`, `isBelowMarket`, `listedOnDate`, `vehicleAgeYears`, `milesPerYear`, `priceDropAmount`, `priceHistory` |
| Run context | `searchZip`, `searchRadiusMiles`, `scrapedAt` |

`marketSavings` is the CarGurus expected market price minus the asking price: positive means the car is listed below market. `listedOnDate` is the scrape date minus `daysOnMarket`. `priceDropAmount` and `priceHistory` are filled when CarGurus exposes a previous or original price for the listing; otherwise they stay empty. Dealer phone numbers are business lines published on the listing, and are only returned for dealer sellers.

#### Example row (shortened)

```json
{
  "vin": "3C63R3RL3NG140071",
  "year": 2022,
  "make": "RAM",
  "model": "3500",
  "trim": "Limited Crew Cab LB 4WD",
  "price": 66188,
  "expectedPrice": 67539,
  "marketSavings": 1351,
  "marketSavingsPercent": 2.0,
  "dealRating": "GOOD_PRICE",
  "mileage": 20186,
  "daysOnMarket": 93,
  "dealerName": "STG Auto Group of Bellflower",
  "dealerCity": "Bellflower, CA",
  "distanceMiles": 22.02
}
```

### Pricing

Pay per event: you are charged one `car-listing` event for every listing saved to your dataset. Empty result pages, duplicate vehicles, listings removed by your filters and failed pages are never charged. Set `maxResults` to cap your spend.

### Tips

- Start with `maxResults: 20` to preview the data, then scale up.
- Targeting one model? Add its `entityIds` so the search is narrowed at the source and fewer pages are needed.
- For a national view, use several ZIP codes in different regions with a 100 to 250 mile radius instead of one `nationwide` search.
- Schedule the Actor daily or weekly and compare `price`, `priceDropAmount` and `daysOnMarket` over time.

### FAQ

**Which countries are supported?** The United States (5-digit ZIP codes).

**Do I need a proxy or an account on CarGurus?** No. The Actor uses Apify Residential proxies and works without logging in.

**Why did I get fewer rows than `maxResults`?** Your filters matched fewer vehicles, duplicates were removed, or the search area ran out of listings. You are only billed for rows you receive.

**Is the data public?** The Actor collects information shown on public CarGurus search pages. Use it in line with applicable laws and the site's terms, and do not use dealer contact data for unsolicited marketing where that is restricted in your jurisdiction.

**Something looks wrong or a field is empty.** Open an issue on the Actor page with your input and a run link. Site layouts change over time, and reports help us keep the Actor current.

# Actor input Schema

## `zipCodes` (type: `array`):

US ZIP codes to search around (5 digits). Each ZIP is searched separately; duplicate vehicles are returned once.

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

Alternative to ZIP codes: paste cargurus.com search-result URLs. ZIP, radius, year, price and mileage filters in the URL are honored.

## `radiusMiles` (type: `string`):

Distance around each ZIP code.

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

Only keep these makes, for example Toyota, Honda, Ford. Leave empty for all makes.

## `models` (type: `array`):

Only keep these models, for example Camry, Civic, F-150. Leave empty for all models.

## `entityIds` (type: `array`):

Optional CarGurus entity IDs such as m191 (make) or d2103 (model). They narrow the search on the CarGurus side, which saves pages when you target one model.

## `yearFrom` (type: `integer`):

Oldest model year.

## `yearTo` (type: `integer`):

Newest model year.

## `priceMin` (type: `integer`):

Skip listings priced below this amount in US dollars. Leave empty for no lower limit.

## `priceMax` (type: `integer`):

Skip listings priced above this amount in US dollars. Leave empty for no upper limit.

## `mileageMin` (type: `integer`):

Skip vehicles with fewer miles than this. Leave empty for no lower limit.

## `mileageMax` (type: `integer`):

Skip vehicles with more miles than this. Leave empty for no upper limit.

## `dealRatings` (type: `array`):

Only keep listings with these CarGurus deal ratings.

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

Order in which CarGurus returns listings.

## `maxResults` (type: `integer`):

Total number of listings to return across all searches. Billing is per returned listing.

## `maxPagesPerSearch` (type: `integer`):

Safety cap on how many result pages are read for one ZIP code (about 15 listings per page).

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

Residential US proxies are used by default and recommended.

## Actor input object example

```json
{
  "zipCodes": [
    "90210"
  ],
  "radiusMiles": "50",
  "sortBy": "BEST_DEAL",
  "maxResults": 50,
  "maxPagesPerSearch": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

Dataset with the 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 = {
    "zipCodes": [
        "90210"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepurple/cargurus-listings-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 = {
    "zipCodes": ["90210"],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("deepurple/cargurus-listings-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 '{
  "zipCodes": [
    "90210"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call deepurple/cargurus-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepurple/cargurus-listings-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/E94mbsE0qEI9RjIL4/builds/bXiMFqnNFWi4ve6aJ/openapi.json
