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

Scrape used cars from carmax.com. Filter by make, model, price, year, mileage, and the other listing filters, or paste a CarMax URL.

- **URL**: https://apify.com/dadhalfdev/carmax-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/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

## 🚗 CarMax Scraper

Want [CarMax](https://www.carmax.com/) used cars in a spreadsheet? This scraper makes it easy.

Use **structured filters** — better for AI agents — **or** paste an **`input_url`**. When `input_url` is set it overrides the filters.

CarMax lists tens of thousands of used cars nationwide. This actor returns up to 2000 rows per run, using the same make, model, price, year, mileage, and sort choices as the site.

### 💡 Perfect for...

- **Shopping:** Export Honda, Toyota, or any other make with price and mileage.
- **Dashboards:** Track nationwide asking prices without paging the site.
- **Market research:** Slice body type, fuel, color, year, and price band.
- **Data analysts:** Export structured rows with the public car URL and photo.
- **🤖 AI Agents:** Power Claude, Cursor, Codex, the Hermes Agent, and OpenClaw workflows with live CarMax results.
- **📚 RAG Systems:** Feed titles, prices, and store cities into retrieval pipelines.
- **🔗 AI Workflows:** Plug into LangChain, AutoGPT, CrewAI, and similar stacks.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a CarMax listing URL, or type the same filters as the site. `input_url` always wins when set.
- 🎯 **Website-Matched Filters:** Make, model, body, color, fuel, drivetrain, year, price, mileage, distance, and sort.
- 🌐 **Car rows:** Title, price, mileage, store, colors, engine, photo, and equipment.

### 📦 What's inside the data?

`title`, `year`, `make`, `model`, `trim`, `price`, `currency` (USD), `mileage`, `store`, `city`, `state`, `exterior_color`, `interior_color`, `transmission`, `drivetrain`, `engine`, `url`, `image`

### 🚀 Quick start

**Option A:** paste `https://www.carmax.com/cars/honda/civic`.
**Option B:** type a make and model and set `max_results`.

**Input Example (filters):**

```json
{
  "make": "Honda",
  "model": "Civic",
  "sort": "Lowest price",
  "max_results": 100
}
```

**Input Example (URL):**

```json
{
  "input_url": "https://www.carmax.com/cars/honda/civic",
  "max_results": 100
}
```

**Output Example:**

```json
{
  "id": "00000000",
  "url": "https://www.carmax.com/car/00000000",
  "title": "Honda Civic",
  "year": 2020,
  "make": "Honda",
  "model": "Civic",
  "price": 19998,
  "currency": "USD",
  "mileage": 40000
}
```

**Output fields:**

| Field | Description |
|-------|-------------|
| `id` | Stock number. |
| `url` | Public car page. |
| `title` | Year, make, model, and trim. |
| `vin` | Vehicle identification number. |
| `year` | Model year. |
| `make` | Make. |
| `model` | Model. |
| `trim` | Trim. |
| `series` | Series, when the listing shows one. |
| `body` | Body style. |
| `price` | Asking price in US dollars. |
| `original_price` | Earlier price when the car has a price drop. |
| `currency` | USD. |
| `mileage` | Odometer miles. |
| `store` | Store name. |
| `city` | Store city. |
| `state` | Store state. |
| `exterior_color` | Exterior color. |
| `interior_color` | Interior color. |
| `transmission` | Automatic or manual. |
| `drivetrain` | Drivetrain. |
| `engine` | Gas, hybrid, electric, or the listed engine type. |
| `engine_size` | Engine size when the listing shows one. |
| `cylinders` | Cylinder count when the listing shows one. |
| `horsepower` | Horsepower when the listing shows one. |
| `mpg_city` | City miles per gallon when shown. |
| `mpg_highway` | Highway miles per gallon when shown. |
| `battery_range_miles` | Electric range when shown. |
| `vehicle_size` | Compact, midsize, large, or very large. |
| `vehicle_types` | Body groups such as SUVs or sedans. |
| `features` | Equipment list. |
| `highlights` | Short callouts such as low miles. |
| `rating` | Average review score. |
| `review_count` | Number of reviews. |
| `new_arrival` | Yes or no. |
| `price_drop` | Yes or no. |
| `image` | Photo. |
| `listed_at` | When the car became available. |

### 📋 Input reference

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `input_url` | string | No | — | CarMax listing URL. Overrides every filter. |
| `make` | string | No | — | Make, such as Honda. |
| `model` | string | No | — | Model, such as Civic. |
| `body` | string | No | — | Body type, such as SUVs or Sedans. |
| `exterior_color` | string | No | — | Exterior color, such as Black. |
| `interior_color` | string | No | — | Interior color, such as Black. |
| `fuel` | string | No | — | Gas, Hybrid, Plug-In Hybrid, Electric, or Diesel. |
| `drivetrain` | string | No | — | All Wheel Drive, Front Wheel Drive, Rear Wheel Drive, or Four Wheel Drive. |
| `transmission` | string | No | — | Automatic or Manual. |
| `doors` | string | No | — | 2 Doors, 3 Doors, or 4 Doors. |
| `car_size` | string | No | — | Compact, Midsize, Large, or Very Large. |
| `cylinders` | string | No | — | Cylinder count, such as 4 or 6. |
| `feature` | string | No | — | A listed feature, such as Navigation System. |
| `year_min` | integer | No | — | Oldest model year. |
| `year_max` | integer | No | — | Newest model year. |
| `price_min` | integer | No | — | Lowest price in US dollars. |
| `price_max` | integer | No | — | Highest price in US dollars. |
| `mileage_min` | integer | No | — | Lowest mileage. |
| `mileage_max` | integer | No | — | Highest mileage. |
| `distance` | string | No | Nationwide | Nationwide, or 5, 25, 50, 75, 100, 250, or 500 miles. |
| `sort` | string | No | Best match | Best match, Lowest price, Highest price, Lowest mileage, Highest mileage, Newest year, Oldest year, Nearest distance, or New match. |
| `price_drop` | string | No | — | Yes to keep cars with a recent price drop. |
| `max_results` | integer | No | `50` | How many cars to return (1–2000). |

### 🔧 Custom scrapers and agents

If you need a custom web scraper, or custom AI agents and workflows, contact me through [tuik.ai](https://www.tuik.ai). We help businesses cut costs and time by up to 10x.

# Actor input Schema

## `input_url` (type: `string`):

Paste a CarMax listing URL. Overrides every filter when set.

## `make` (type: `string`):

Make as shown on the site, for example Honda or Toyota.

## `model` (type: `string`):

Model as shown on the site, for example Civic.

## `body` (type: `string`):

Body type, for example SUVs, Sedans, or Pickup Trucks.

## `exterior_color` (type: `string`):

Exterior color, for example Black or Blue.

## `interior_color` (type: `string`):

Interior color, for example Black or Tan.

## `fuel` (type: `string`):

Gas, Hybrid, Plug-In Hybrid, Electric, or Diesel.

## `drivetrain` (type: `string`):

All Wheel Drive, Front Wheel Drive, Rear Wheel Drive, or Four Wheel Drive.

## `transmission` (type: `string`):

Automatic or Manual.

## `doors` (type: `string`):

2 Doors, 3 Doors, or 4 Doors.

## `car_size` (type: `string`):

Compact, Midsize, Large, or Very Large.

## `cylinders` (type: `string`):

Cylinder count as shown on the site, for example 4 or 6.

## `feature` (type: `string`):

A listed feature, for example Sunroof(s) or Navigation System.

## `year_min` (type: `integer`):

Oldest model year to include.

## `year_max` (type: `integer`):

Newest model year to include.

## `price_min` (type: `integer`):

Lowest price in US dollars.

## `price_max` (type: `integer`):

Highest price in US dollars.

## `mileage_min` (type: `integer`):

Lowest mileage.

## `mileage_max` (type: `integer`):

Highest mileage.

## `distance` (type: `string`):

Nationwide, or a distance such as 50 miles, 100 miles, or 250 miles.

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

Best match, Lowest price, Highest price, Lowest mileage, Highest mileage, Newest year, Oldest year, Nearest distance, or New match.

## `price_drop` (type: `string`):

Yes to keep cars with a recent price drop.

## `max_results` (type: `integer`):

How many cars to return (1-2000).

## Actor input object example

```json
{
  "distance": "Nationwide",
  "sort": "Best match",
  "max_results": 50
}
```

# Actor output Schema

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

Table view of scraped cars using the dataset overview view.

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

All scraped cars from the default dataset without view transformation.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/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 '{}' |
apify call dadhalfdev/carmax-scraper --silent --output-dataset

```

## MCP server setup

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