# CarMax Used Car Listings Scraper (`codingfrontend/carmax-scraper`) Actor

Extract live public CarMax used vehicle listings with pricing, mileage, specifications, colors, features, location, and images; independent and not endorsed by CarMax.

- **URL**: https://apify.com/codingfrontend/carmax-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Used Car Listings Scraper

Extract live used-vehicle inventory from public CarMax search pages. Use filtered CarMax URLs, plain keyword searches, manufacturer slugs, or a combination.

The Actor uses server-rendered public inventory data with a consistent anonymous HTTP session. It does not sign in, reserve vehicles, submit financing forms, or access saved-car and customer-account data.

### What it extracts

Each dataset item can include:

- Stock number, VIN, year, make, model, trim, body, size, and vehicle types
- Current and original prices, price-drop status, mileage, and currency
- Exterior/interior colors, transmission, fuel and engine types
- Engine size, cylinders, drivetrain, horsepower, torque, and MPG
- Model rating and review count
- Features, packages, listing highlights, and published prior-use disclosures
- Store name, city/state, distance, transfer eligibility, and transfer fee
- Availability, coming-soon/reserved state, EV tax-credit eligibility
- Hero image, canonical listing URL, source search URL, and scrape timestamp

Unavailable optional values are omitted. Required identity, price, mileage, year, make, and model values must be real and non-empty before a record is saved.

### Use an existing CarMax search URL

```json
{
    "searchUrls": [
        "https://www.carmax.com/cars/toyota/camry?location=dallas+tx"
    ],
    "maxResults": 10
}
```

Open CarMax, apply the manufacturer, model, year, price, location, or other public inventory filters you need, then copy the resulting `/cars` URL.

### Search by keyword or manufacturer

```json
{
    "searchUrls": [],
    "keywords": ["Camry"],
    "makeSlugs": ["honda"],
    "maxResults": 20
}
```

Keywords use CarMax's public `?search=` route. Manufacturer values are lowercase public URL slugs such as `toyota`, `honda`, `ford`, or `mercedes-benz`.

### Output example

```json
{
    "recordId": "70099782",
    "stockNumber": 70099782,
    "vin": "4T1B11HK9KU724813",
    "year": 2019,
    "make": "Toyota",
    "model": "Camry",
    "trim": "SE",
    "price": 18998,
    "currency": "USD",
    "mileage": 123707,
    "mileageUnit": "miles",
    "transmission": "Automatic",
    "engineType": "Gas",
    "imageUrl": "https://img2.carmax.com/assets/70099782/hero.jpg?width=400&height=300",
    "listingUrl": "https://www.carmax.com/car/70099782"
}
```

The example shows the record shape. Production results always come from the requested live CarMax search pages and inventory changes frequently.

### Limits and responsible use

- The global result cap is 100 records.
- Each server-rendered search response currently publishes up to 24 cards. Submit multiple distinct filtered search URLs when you need broader coverage.
- Concurrency is capped at 3, with at least 1 second between requests.
- Requests use an anonymous cookie jar, realistic consistent headers, and at most three attempts with backoff.
- The actor-side deadline is below five minutes.
- Duplicate vehicles are removed by CarMax stock number.
- Direct public access is the default; optional Apify Proxy configuration is supported.

Prices exclude taxes and may exclude title, registration, documentary, transport, or other fees. Inventory, price, location, vehicle history, eligibility, and availability can change without notice. Confirm details on the live listing and with CarMax before making a purchase or financial decision.

This Actor is independent and not endorsed by CarMax. You are responsible for complying with CarMax's terms, robots directives, and applicable law.

### Dataset access

Results are written to the default Apify dataset and can be exported through the Console or dataset API as JSON, CSV, Excel, XML, and other supported formats.

### Support

Include the public search URL, run ID, input without secrets, and expected field when reporting an issue.

# Actor input Schema

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

Public CarMax inventory URLs under carmax.com/cars. Location and filter query parameters are preserved.

## `keywords` (type: `array`):

Optional keywords converted to public CarMax /cars?search=... URLs.

## `makeSlugs` (type: `array`):

Optional manufacturer URL slugs such as toyota, honda, or ford.

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

Global cap across all submitted searches. Each public search response currently contains at most 24 inventory cards.

## `maxConcurrency` (type: `integer`):

Responsible concurrency cap for public CarMax search pages.

## `requestDelayMillis` (type: `integer`):

Minimum pacing delay between CarMax requests.

## `maxRetries` (type: `integer`):

Bounded attempts with exponential backoff and a consistent anonymous cookie session.

## `maxPageMbytes` (type: `integer`):

Reject unexpectedly large search responses.

## `maxRunMillis` (type: `integer`):

Actor-side deadline capped below five minutes.

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

Optional Apify Proxy. Direct public access is used by default.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.carmax.com/cars/toyota/camry"
  ],
  "keywords": [],
  "makeSlugs": [],
  "maxResults": 10,
  "maxConcurrency": 1,
  "requestDelayMillis": 1500,
  "maxRetries": 3,
  "maxPageMbytes": 5,
  "maxRunMillis": 240000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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("codingfrontend/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("codingfrontend/carmax-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 codingfrontend/carmax-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=codingfrontend/carmax-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/KAAVDY18eb0meZDue/builds/X3XjyRfZg72ddkjGd/openapi.json
