# Copart API — salvage & insurance auto-auction scraper: search live Copart lots by make, model, year, damage, title type, odometer and location, then pull full lot detail (VIN, damage, title, odometer, estimated value, current bid, sale date) and hi-res auction photos. Largest US salvage / total-loss car auction. No API key, no login required.

> Search live Copart auction lots by free-text `query` and/or structured filters (make, model, year or year_min/year_max, title_type, vehicle_type, damage, condition, source, odometer_min/max, yard_number). Sortable + paginated. Returns rich lot cards with damage, title, odometer, estimated value, current bid, sale date, location and thumbnail.
> ReefAPI engine `copart` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/copart/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /copart/v1/search — 1 credit
Search live Copart auction lots by free-text `query` and/or structured filters (make, model, year or year_min/year_max, title_type, vehicle_type, damage, condition, source, odometer_min/max, yard_number). Sortable + paginated. Returns rich lot cards with damage, title, odometer, estimated value, current bid, sale date, location and thumbnail.

**Parameters:**
- `query` (string, optional) — Free-text keyword to search lots (make, model, VIN fragment, anything). Leave empty to browse all lots and rely on filters.
- `make` (string, optional) — Vehicle make to filter by (e.g. HONDA, FORD, BMW). Case-insensitive.
- `model` (string, optional) — Vehicle model to filter by (e.g. CIVIC, F-150). Pair with `make`.
- `year` (integer, optional) — Exact model year. For a range use year_min / year_max instead.
- `year_min` (integer, optional) — Minimum model year (inclusive). Combine with year_max.
- `year_max` (integer, optional) — Maximum model year (inclusive). Combine with year_min.
- `title_type` (enum, optional) — Filter by title brand. [one of: clean, salvage, non_repairable]
- `vehicle_type` (enum, optional) — Filter by vehicle category. [one of: automobile, motorcycle, atv, boat, bus, construction, trailer, heavy_truck, rv]
- `damage` (enum, optional) — Filter by primary damage type. [one of: front_end, rear_end, side, all_over, rollover, top_roof, undercarriage, water_flood, hail, burn, burn_engine, burn_interior, vandalism, mechanical, normal_wear, minor_dents, stripped, biohazard, damage_history]
- `condition` (enum, optional) — Filter by lot condition / sale type. [one of: run_and_drive, enhanced, engine_start, buy_it_now, used]
- `source` (enum, optional) — Filter by lot source / seller type. [one of: donations, impound, repossessions]
- `odometer_min` (integer, optional) — Minimum odometer reading (miles).
- `odometer_max` (integer, optional) — Maximum odometer reading (miles).
- `yard_number` (string, optional) — Restrict to one Copart yard/location by its yard number.
- `location` (string, optional) — Restrict to one Copart yard/location by name (e.g. 'TX - DALLAS', 'CA - VAN NUYS'). Get the exact names + lot counts from the `yards` action.
- `sort` (enum, optional, default "newest_listed") — Result ordering. [one of: newest_listed, sale_date_asc, sale_date_desc, year_desc, year_asc, odometer_asc, odometer_desc, make_az]
- `page` (integer, optional, default 1) — Page number (1-based; 1, 2, 3 …).
- `size` (integer, optional, default 20) — Results per page (1–100). Defaults to 20.

**Returns:** lots[]{lot_number, vin(masked), year, make, model, trim, title, body_style, color, engine, cylinders, fuel_type, transmission, drive, primary_damage, secondary_damage, title_type, title_group, title_state, keys_available, highlights[], loss_type, odometer, odometer_brand, estimated_retail_value, current_bid, high_bid, buy_it_now_price, repair_cost, sale_status, currency, sale_date, sale_time, yard_name, yard_number, location_city, location_state, location_country, zip, latitude, longitude, thumbnail, vehicle_type, url} + meta{total_results, pagination}

**Example request body:**
```json
{
  "make": "HONDA",
  "size": 20
}
```

### POST /copart/v1/lot_detail — 1 credit
Full detail for one lot by `lot_number`: VIN (publicly masked by Copart), make, model, trim, year, primary/secondary damage, title type & group, odometer, color, engine, fuel, drive, transmission, estimated retail value, current/high bid, sale date & time, yard location (city/state/zip/lat/long) and keys availability.

**Parameters:**
- `lot_number` (string, required) — Copart lot number — the digits in a copart.com/lot/ URL or a search result's lot_number.

**Returns:** lot{lot_number, vin(masked), year, make, model, trim, title, body_style, color, engine, cylinders, fuel_type, transmission, drive, primary_damage, secondary_damage, title_type, title_group, title_state, keys_available, highlights[], loss_type, odometer, odometer_brand, estimated_retail_value, current_bid, high_bid, buy_it_now_price, repair_cost, sale_status, currency, sale_date, sale_time, yard_name, yard_number, location_city, location_state, location_country, zip, latitude, longitude, thumbnail, vehicle_type, url}

### POST /copart/v1/lot_images — 1 credit
All auction photos for one lot by `lot_number`: ordered full-size, hi-res and thumbnail image URLs for the vehicle (exterior, interior, damage, VIN plate, odometer).

**Parameters:**
- `lot_number` (string, required) — Copart lot number to fetch photos for.

**Returns:** images[]{sequence, full_url, high_res_url, thumbnail_url, type}

### POST /copart/v1/yards — 1 credit
Live list of Copart yards / locations you can filter `search` by, each with its yard_number and current lot count. Lifted from the live search facet taxonomy — use a yard_number with search's `yard_number` filter to scope to one location.

**Parameters:**
- `query` (string, optional) — Optional name filter (case-insensitive substring) to find a yard, e.g. 'dallas', 'ca -', 'houston'.

**Returns:** yards[]{name, location, lot_count}

## More
- Try it live, no code: https://reefapi.com/playground?engine=copart
- Human docs page: https://reefapi.com/docs/copart
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
