CarMax API: Search used cars
Searches CarMax used cars by make and model with optional ZIP, distance, year, price and mileage filters, keeping CarMax's order. Pages expose only the first 48 cars; distance is CarMax's distance from the selected local store, and larger limits or narrow distance filters may return fewer matches.
Unofficial. Not affiliated with or endorsed by CarMax.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Car, required
car Make and model to search, for example Toyota RAV4.
Honda Civic
- Max Year optional
max_year Latest model year, for example 2024.
2024
Whole number from 1900 to 2100.
- Min Year optional
min_year Earliest model year, for example 2020.
2021
Whole number from 1900 to 2100.
- Zip Code optional
zip_code US ZIP code for local car ordering, for example 10001.
90210
Exactly 5 characters.
- Max Price optional
max_price Maximum price in USD, for example 30000.
25000
Number 0 or more.
- Max Mileage optional
max_mileage Maximum odometer mileage, for example 50000.
50000
Whole number 0 or more.
- Max Results optional
max_results Maximum number of cars, for example 24. Public pages show at most 48 cars.
8
Whole number from 1 to 100. Default
24.- Radius (miles) optional
radius_miles Maximum listed distance in miles from your ZIP, for example 75; 0 means nationwide.
500
Whole number 0 or more. Default
0.
Input as JSON
{ "car": "Honda Civic", "max_year": 2024, "min_year": 2021, "zip_code": "90210", "max_price": 25000, "max_mileage": 50000, "max_results": 8, "radius_miles": 500}Output
{ "cars": [ { "vin": "2HGFE2F24PH553046", "make": "Honda", "trim": "LX", "year": 2023, "model": "Civic", "price": 24998, "mileage": 16963, "car_link": "https://www.carmax.com/car/29048140" , "photo_link": "https://img2.carmax.com/assets/29048140/hero.jpg?width=400" , "store_name": "Burbank", "store_state": "California", "fuel_economy": "30 city / 37 highway MPG", "stock_number": "29048140", "transfer_fee": null, "currency_code": "USD", "distance_miles": 0, "exterior_colour": "White", "highlighted_features": [ "Rear View Camera", "Auxiliary Audio Input", "Overhead Airbags" ] }, { "vin": "19XFL2H51RE041593", "make": "Honda", "trim": "LX", "year": 2024, "model": "Civic", "price": 21998, "mileage": 37208, "car_link": "https://www.carmax.com/car/29098442" , "photo_link": "https://img2.carmax.com/assets/29098442/hero.jpg?width=400" , "store_name": "Torrance", "store_state": "California", "fuel_economy": "30 city / 38 highway MPG", "stock_number": "29098442", "transfer_fee": null, "currency_code": "USD", "distance_miles": 21.3, "exterior_colour": "White", "highlighted_features": [ "Rear View Camera", "Auxiliary Audio Input", "Alloy Wheels" ] }, { "vin": "2HGFE2F54NH558111", "make": "Honda", "trim": "Sport", "year": 2022, "model": "Civic", "price": 24998, "mileage": 43914, "car_link": "https://www.carmax.com/car/70229480" , "photo_link": "https://img2.carmax.com/assets/70229480/hero.jpg?width=400" , "store_name": "Canoga Park", "store_state": "California", "fuel_economy": "30 city / 37 highway MPG", "stock_number": "70229480", "transfer_fee": null, "currency_code": "USD", "distance_miles": 17.1, "exterior_colour": "Blue", "highlighted_features": [ "Rear View Camera", "Auxiliary Audio Input", "Alloy Wheels" ] } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"carmax.com/search_cars","input":{"car":"Honda Civic","max_year":2024,"min_year":2021,"zip_code":"90210","max_price":25000,"max_mileage":50000,"max_results":8,"radius_miles":500}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "carmax.com/search_cars" , "input": { "car": "Honda Civic", "max_year": 2024, "min_year": 2021, "zip_code": "90210", "max_price": 25000, "max_mileage": 50000, "max_results": 8, "radius_miles": 500 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "carmax.com/search_cars" , "input": { "car": "Honda Civic", "max_year": 2024, "min_year": 2021, "zip_code": "90210", "max_price": 25000, "max_mileage": 50000, "max_results": 8, "radius_miles": 500 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run carmax.com/search_cars# with {"car":"Honda Civic","max_year":2024,"min_year":2021,"zip_code":"90210","max_price":25000,"max_mileage":50000,"max_results":8,"radius_miles":500}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "car" ], "properties": { "car": { "type": "string", "description": "Make and model to search, for example Toyota RAV4." }, "max_year": { "type": "integer", "maximum": 2100, "minimum": 1900, "description": "Latest model year, for example 2024." }, "min_year": { "type": "integer", "maximum": 2100, "minimum": 1900, "description": "Earliest model year, for example 2020." }, "zip_code": { "type": "string", "maxLength": 5, "minLength": 5, "description": "US ZIP code for local car ordering, for example 10001." }, "max_price": { "type": "number", "minimum": 0, "description": "Maximum price in USD, for example 30000." }, "max_mileage": { "type": "integer", "minimum": 0, "description": "Maximum odometer mileage, for example 50000." }, "max_results": { "type": "integer", "default": 24, "maximum": 100, "minimum": 1, "description": "Maximum number of cars, for example 24. Public pages show at most 48 cars." }, "radius_miles": { "type": "integer", "default": 0, "minimum": 0, "description": "Maximum listed distance in miles from your ZIP, for example 75; 0 means nationwide." } }}Output schema
{ "type": "object", "required": [ "cars" ], "properties": { "cars": { "type": "array", "items": { "type": "object", "required": [ "year", "make", "model", "trim", "price", "currency_code", "mileage", "exterior_colour", "store_name", "store_state", "distance_miles", "transfer_fee", "highlighted_features", "fuel_economy", "photo_link", "car_link", "stock_number", "vin" ], "properties": { "vin": { "type": [ "string", "null" ] }, "make": { "type": [ "string", "null" ] }, "trim": { "type": [ "string", "null" ] }, "year": { "type": [ "integer", "null" ] }, "model": { "type": [ "string", "null" ] }, "price": { "type": [ "number", "null" ], "description": "Price in US dollars." }, "mileage": { "type": [ "integer", "null" ], "description": "Miles." }, "car_link": { "type": "string" }, "photo_link": { "type": [ "string", "null" ] }, "store_name": { "type": [ "string", "null" ] }, "store_state": { "type": [ "string", "null" ] }, "fuel_economy": { "type": [ "string", "null" ] }, "stock_number": { "type": [ "string", "null" ] }, "transfer_fee": { "type": [ "string", "null" ], "description": "Shipping or transfer fee text when shown." }, "currency_code": { "type": "string", "description": "USD." }, "distance_miles": { "type": [ "number", "null" ], "description": "CarMax listing distance from its selected local store, if a ZIP is given." }, "exterior_colour": { "type": [ "string", "null" ] }, "highlighted_features": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
carmax.com/search_cars- Returns
- year, make, model, trim, price, mileage, colour, store, distance, transfer fee, highlighted features, fuel economy, photo, link, stock number, VIN
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method carmax.com/search_cars with the inputs above.
Ask your agent
- Find used Honda CR-V listings from 2019 to 2022 under $27,000 with less than 45,000 miles near ZIP 30318
- Show me Ford F-150 trucks on CarMax within 50 miles of 75201, priced at most $35,000
- I'm looking for a used Subaru Outback, 2020 or newer, under 60k miles — list about 20 options near 98103 with VINs and transfer fees
- What used Tesla Model 3 cars are available nationwide for under $30,000? Include mileage, color, and store location
- Pull up to 40 CarMax Toyota Camry listings from 2018–2021 near ZIP 60614 within 100 miles, with price, trim, and stock numbers
See more
Searches CARFAX used-car listings for a make and model near a US ZIP code, in CARFAX order, with listing details and free vehicle-history highlights. Paid full history reports are not included.
carfax.com/search_carsSearches Cars.com car listings for a make and model around a US ZIP code within a radius, optionally by condition (new, used or certified pre-owned) and maximum price, in Cars.com search order.
cars.com/search_carsSearches Carvana's used-car inventory by make and model, with optional price, year, mileage and ZIP filters, and returns each car's price, estimated monthly payment, mileage and delivery or pickup estimate for the ZIP.
carvana.com/search_carsSearches new and used cars for sale near a US ZIP code for a make and model, with prices, dealer details and CarGurus deal ratings. Used cars come first, then new cars, each in CarGurus order; market difference is positive below market and negative above.
cargurus.com/search_carsSearches Autotrader car listings near a US ZIP code by make and model, with condition, price, year and distance filters. Returns up to 100 listings in site order.
autotrader.com/search_carsSearches mobile.de car listings by make and model, with optional registration year, price, mileage, fuel, condition and sorting. Returns up to 50 listings in marketplace order; fields not shown on a listing are null.
mobile.de/search_carsFinds AutoZone parts listed for a vehicle (year, make, model, optional engine), with prices, warranties and fit notes. Listings are filtered by year, make and model; engine fit often needs further confirmation.
autozone.com/search_partsGets the current average used asking price, the CarGurus price range and the 12-month price history for a model year (all trims), from CarGurus price trends.
cargurus.com/get_market_value