# CarMax Scraper (`scraptivo/carmax-scraper`) Actor

Collects used car listings from CarMax.com using search URLs and an optional zip code. Returns vehicle specs, pricing, store location, and transfer details.

- **URL**: https://apify.com/scraptivo/carmax-scraper.md
- **Developed by:** [Scraptivo](https://apify.com/scraptivo) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.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/actors/running/actors-in-store.md#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

**CarMax Scraper** collects used car listings from [CarMax.com](https://www.carmax.com) and turns them into structured inventory data for market research, price monitoring, and dealership analysis. Provide a CarMax search URL, optionally set a zip code, run the Actor, and export year, make, model, VIN, price, mileage, store location, and transfer details to JSON, CSV, Excel, or your preferred integration. Use it to compare local inventory, watch price drops, and automate recurring CarMax collection. Pricing is **$1.00 per 1,000 cars**, plus a small Actor-start fee.

### What can you automate with CarMax Scraper?

- **Collect filtered inventory** — Paste a CarMax search URL with make, model, body type, or other site filters already applied.
- **Target a local market** — Set a zip code to analyze nearby store inventory, or leave it empty for a nationwide search.
- **Export full vehicle specs** — Collect year, trim, mileage, engine, drivetrain, fuel type, MPG, colors, features, and VIN.
- **Track price movement** — Capture current `basePrice`, `originalPrice`, and `hasPriceDrop` for deal spotting.
- **Map store availability** — Export store name, city, state, distance, ratings, and transfer fees.
- **Schedule recurring snapshots** — Run weekly or daily and keep a history of CarMax inventory for the same search URL.

### Who is this scraper for?

| Team | Workflow |
|---|---|
| Automotive market researchers | Comparing used-car pricing, trims, and mileage across CarMax inventory. |
| Dealership analysts | Watching competitor stock, transfer fees, and local availability. |
| Price-monitoring teams | Tracking price drops and original vs current asking prices. |
| Inventory aggregators | Feeding structured CarMax listings into a catalog or spreadsheet. |

### What data can you collect from CarMax?

| Data group | Example fields | How it helps |
|---|---|---|
| Vehicle identity | Stock number, VIN, listing URL, year, make, model, trim, body | Identify the exact car and deduplicate by VIN or stock number. |
| Pricing | `basePrice`, `originalPrice`, `hasPriceDrop` | Spot reductions and compare asking prices. |
| Specs | Mileage, colors, transmission, drivetrain, engine, horsepower, MPG, fuel type, EV range | Filter inventory by mechanical and efficiency attributes. |
| Features | Features, highlighted features, packages, highlights | Compare equipment across similar cars. |
| Store and transfer | Store name, city, state, distance, transfer fee, estimated transfer days | Plan pickup or transfer before contacting a store. |
| Status | New arrival, saleable, reserved, coming soon, EV tax credit, prior use | Skip unavailable cars and note fleet or rental history. |

Some status, finance, and transfer fields are present only when CarMax exposes them on that listing.

### How to use CarMax Scraper

1. Open the [CarMax Scraper](https://apify.com/scraptivo/carmax-scraper) on Apify.
2. Paste a CarMax search URL such as `https://www.carmax.com/cars/suvs/audi`, or use `https://www.carmax.com/cars` for broader inventory.
3. Optionally set a zip code and a `maxItems` limit.
4. Run the Actor and wait for car records to appear in the dataset.
5. Export JSON, CSV, or Excel, or connect the dataset to your workflow.

```json
{
    "searchUrl": "https://www.carmax.com/cars",
    "zipCode": "",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

### Example workflow

#### Build a weekly Audi SUV price sheet

1. Schedule a Monday run with `searchUrl` = `https://www.carmax.com/cars/suvs/audi` and your target `zipCode`.
2. Keep cars that match your mileage and price range using `mileage` and `basePrice` after the run.
3. Send new records to Google Sheets through a webhook.
4. Deduplicate user-side against `vin` or `stockNumber`.

### Automate and integrate your results

- **Schedules** — Used-car prices and stock change often. Run **weekly** for market research or **daily** when you watch a tight make/model search.
- **Webhooks** — Push completed datasets into Sheets, Slack, or a database when the run finishes.
- **Exports and API** — Download from the Apify Console or start a run from the API:

```shell
curl "https://api.apify.com/v2/acts/scraptivo~carmax-scraper/runs?token=YOUR-APIFY-TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchUrl": "https://www.carmax.com/cars/suvs/audi",
    "zipCode": "90210",
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
  }'
```

- **Deduplication** — The Actor appends results on every run. Use `vin` or `stockNumber` as the stable key when merging datasets.

### Input reference

| Field | Type | Required | Default | What it controls |
|---|---|---:|---|---|
| `searchUrl` | String | No | — | Full CarMax search URL. Filters in the URL are applied. Prefill is `https://www.carmax.com/cars`. |
| `searchUrls` | Array of URLs | No | — | Multiple search URLs. Overrides `searchUrl` when set. |
| `zipCode` | String | No | `20760` | Zip code for inventory filtering. Leave empty for a nationwide search. |
| `maxItems` | Integer | No | `0` | Maximum cars to collect (`0` = unlimited). |
| `proxyConfiguration` | Proxy object | No | Apify proxy, RESIDENTIAL | Residential proxies are recommended. |

#### Does searchUrls override searchUrl?

Yes. When `searchUrls` is set, the Actor uses that list and ignores `searchUrl`. Use `searchUrl` for a single query and `searchUrls` when you want several CarMax searches in one run.

### Output example

Each dataset item is one car:

```json
{
    "heroImageUrl": "https://img2.carmax.com/assets/28735752/hero.jpg?width=400&height=300",
    "url": "https://www.carmax.com/car/28735752",
    "stockNumber": 28735752,
    "vin": "4S4BTALCXR3155366",
    "year": 2024,
    "make": "Subaru",
    "model": "Outback",
    "body": "4D Sport Utility",
    "trim": "Onyx Edition",
    "basePrice": 25998.0,
    "mileage": 56484,
    "exteriorColor": "Black",
    "transmission": "Automatic",
    "driveTrain": "All Wheel Drive",
    "engineSize": "2.5L",
    "horsepower": 182,
    "mpgCity": 26,
    "mpgHighway": 32,
    "storeName": "Greenwood",
    "storeCity": "Indianapolis",
    "state": "Indiana"
}
```

### How much does it cost to scrape CarMax?

The Actor uses pay-per-event pricing:

- **$1.00 / 1,000 cars** — one `car` event for every listing pushed to the default dataset.
- **$0.00005 Actor start** — charged when the run starts (scaled by memory).

A 100-car run costs about **$0.10** in event charges; 1,000 cars cost **$1.00**. Platform compute for this Actor is billed to your Apify plan in addition to the event charges. When your event spending limit is reached, the run stops.

### Reliability and responsible use

- **Proxy requirement** — The default input uses Apify residential proxies. Residential IPs are recommended for consistent CarMax access.
- **Conditional fields** — Transfer, finance, EV, and prior-use fields are present only when CarMax publishes them for that vehicle.
- **Public listings** — The Actor collects publicly visible CarMax inventory data.
- **Responsible use** — Only use the data in ways that comply with CarMax terms and applicable law.

### Frequently asked questions

#### Can I scrape CarMax inventory by make, model, or body type?

Yes. Build the search on CarMax.com (for example SUVs from Audi) and paste that URL into `searchUrl`. The Actor applies the filters already present in the link.

#### Can I schedule CarMax Scraper to run automatically?

Yes. Use the **Scheduler** tab in Apify Console. Weekly works for market snapshots; daily works for price-drop monitoring on a fixed search URL.

#### What counts as one result?

Each car record pushed to the default dataset counts as one result at **$1.00 per 1,000**. The Actor-start event is charged once per run.

#### Why is zipCode defaulting to 20760?

The input schema defaults `zipCode` to `20760`. Set it to your market, or pass an empty string for a nationwide search.

#### How do I avoid duplicate records?

The Actor does not deduplicate across runs. Merge on `vin` (preferred) or `stockNumber`. Use `maxItems` to cap a single run.

#### Do I need a proxy?

Residential proxies are recommended and are the default. If a run returns unusually few cars, confirm the proxy group is RESIDENTIAL.

### Related Scraptivo automations

- [Cars.com Scraper](https://apify.com/scraptivo/cars-scraper) — vehicle listings from Cars.com.
- [Autotrader Scraper](https://apify.com/scraptivo/autotrader-scraper) — classified vehicle listings from Autotrader.
- [AutoScout24 Scraper](https://apify.com/scraptivo/autoscout24-scraper) — European vehicle listings from AutoScout24.

### Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, sample URL, required fields, and expected volume so we can assess the request.

# Actor input Schema

## `searchUrl` (type: `string`):

Full CarMax search URL, e.g. https://www.carmax.com/cars/suvs/audi. All filters from the URL are automatically applied.

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

Multiple search URLs to scrape (overrides searchUrl if set).

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

Target zip code for inventory filtering. Leave empty for nationwide search.

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

Maximum number of cars to scrape (0 = unlimited).

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

Proxy settings for anti-bot protection.

## Actor input object example

```json
{
  "searchUrl": "https://www.carmax.com/cars",
  "zipCode": "20760",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped CarMax 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 = {
    "searchUrl": "https://www.carmax.com/cars",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraptivo/carmax-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 = {
    "searchUrl": "https://www.carmax.com/cars",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("scraptivo/carmax-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 '{
  "searchUrl": "https://www.carmax.com/cars",
  "maxItems": 20
}' |
apify call scraptivo/carmax-scraper --silent --output-dataset

```

## MCP server setup

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