# CarMax Inventory Price & Mileage Scraper (`nimbryxo-studio/carmax-inventory-price-and-mileage-scraper`) Actor

Search CarMax.com's used-car inventory by keyword or manufacturer, filtered by price, model year and mileage, with VIN, trim, color, transmission, fuel type and photos per vehicle.

- **URL**: https://apify.com/nimbryxo-studio/carmax-inventory-price-and-mileage-scraper.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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

Learn more: https://docs.apify.com/actors/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 Inventory Price & Mileage Scraper

Scrape used car listings from [CarMax](https://www.carmax.com) — America's largest used-car retailer. Search inventory by keyword or browse by manufacturer, and get price, mileage, model year, trim, color, transmission, fuel type, drivetrain, and photos for every vehicle. No login and no browser required — results come back in seconds.

### What this actor does

- **Search by keyword** — free-text search across CarMax's nationwide inventory (e.g. `toyota camry`, `suv`, `pickup truck`)
- **Browse by manufacturer** — pick any of CarMax's 35 supported brands, optionally narrowed to a specific model
- **Location-aware** — supply a US ZIP code to center results on a specific CarMax store's local inventory
- **Built-in filters** — price range, model-year range, and maximum mileage
- **Rich vehicle data** — VIN, trim, drivetrain, horsepower, city/highway MPG, exterior/interior color, and top vehicle features
- **Clean output** — every field is real data pulled straight from CarMax; empty fields are simply omitted, never left blank or null

### Output per vehicle

- `vehicleId`, `vin`
- `make`, `model`, `year`, `trim`
- `price` (USD), `mileage`
- `exteriorColor`, `interiorColor`
- `transmission`, `fuelType`, `driveTrain`, `bodyType`
- `horsepower`, `mpgCity`, `mpgHighway`
- `location` (store city + state), `storeName`
- `features[]` — top equipment highlights
- `imageUrl` — vehicle photo
- `vehicleUrl` — direct link to the CarMax listing
- `isNewArrival` — whether CarMax flags the vehicle as a new arrival (boolean)
- `sourceUrl`, `scrapedAt`, `recordType`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search` (keyword) or `byMake` (browse by manufacturer) |
| `searchQuery` | string | `toyota` | Free-text search (mode=search) |
| `make` | string | `Toyota` | Manufacturer to browse (mode=byMake) |
| `model` | string | – | Narrow `byMake` browsing, or filter `search` results, to a specific model |
| `zipCode` | string | – | US ZIP code to center results on a local store |
| `minPrice` / `maxPrice` | int | – | Price range in USD |
| `minYear` / `maxYear` | int | – | Model-year range |
| `maxMileage` | int | – | Drop vehicles with more miles than this |
| `maxItems` | int | `24` | Hard cap on emitted records |

#### Example: keyword search with filters

```json
{
  "mode": "search",
  "searchQuery": "toyota",
  "maxPrice": 30000,
  "minYear": 2020,
  "maxMileage": 40000
}
```

#### Example: browse by manufacturer

```json
{
  "mode": "byMake",
  "make": "Honda",
  "model": "Civic"
}
```

### Use cases

- **Used-car shopping** — scan nationwide or local inventory for a model within your budget and mileage limit
- **Price tracking** — monitor how prices move on a specific make/model over time
- **Dealer competitive research** — compare CarMax pricing and mileage against other used-car sources for the same model
- **Local market snapshots** — pull inventory near a specific ZIP code to see what's available at a nearby store
- **Fleet remarketing research** — survey available trims, colors, and mileage bands for a model before buying in bulk

### FAQ

**Is this affiliated with CarMax?**
No. This is an independent third-party actor that reads CarMax's own publicly available inventory pages.

**Do I need a CarMax account or cookies?**
No. This actor reads CarMax's public inventory pages directly — no login, no API key, no cookies.

**How many vehicles does one run return?**
CarMax renders a single results page per unique search/manufacturer/ZIP combination, typically up to ~24 vehicles. Run different searches (by model, price range, or ZIP code) to explore more of the nationwide inventory.

**Why are some vehicle fields missing?**
Only fields CarMax actually publishes for a given vehicle are included — for example, not every listing has a documented trim level or interior color. Fields are never filled with placeholder or guessed values.

**Can I filter by price or mileage?**
Yes — `minPrice`, `maxPrice`, `minYear`, `maxYear`, and `maxMileage` are all supported and applied to every result.

**Is this actor region-specific?**
CarMax operates across the United States. Use the `zipCode` input to see inventory near a specific location.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

## `searchQuery` (type: `string`):

Free-text search, e.g. `toyota camry`, `suv`, `honda civic`.

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

Browse CarMax inventory for a specific manufacturer.

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

Narrow `byMake` browsing to a specific model (e.g. `Camry`), or filter `search` results whose model contains this text.

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

US ZIP code to center results on a specific CarMax store's local inventory (defaults to CarMax's own IP-based location).

## `minPrice` (type: `integer`):

Drop vehicles priced below this amount.

## `maxPrice` (type: `integer`):

Drop vehicles priced above this amount.

## `minYear` (type: `integer`):

Drop vehicles older than this model year.

## `maxYear` (type: `integer`):

Drop vehicles newer than this model year.

## `maxMileage` (type: `integer`):

Drop vehicles with more miles than this.

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

Hard cap on emitted records. CarMax renders a single results page per search/make combination (typically up to ~24 vehicles); use ZIP code, model, or price/year/mileage filters to explore additional inventory.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "toyota",
  "make": "Toyota",
  "maxItems": 24
}
```

# Actor output Schema

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

Dataset containing all scraped CarMax vehicle 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 = {
    "mode": "search",
    "searchQuery": "toyota",
    "make": "Toyota",
    "maxItems": 24
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/carmax-inventory-price-and-mileage-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 = {
    "mode": "search",
    "searchQuery": "toyota",
    "make": "Toyota",
    "maxItems": 24,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/carmax-inventory-price-and-mileage-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 '{
  "mode": "search",
  "searchQuery": "toyota",
  "make": "Toyota",
  "maxItems": 24
}' |
apify call nimbryxo-studio/carmax-inventory-price-and-mileage-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/carmax-inventory-price-and-mileage-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/K9VSkzsrBYfraREea/builds/KprvzJBXdzrwwjWcc/openapi.json
