Getting started
What the API serves, the two datasets it exposes, the shape of a request, and a first call you can paste into a terminal.
A REST API over normalized auction inventory from Auto1, OpenLane, Schadeautos, Copart Germany, eCarsTrade, Encar and the Japanese auction houses, plus a European retail classifieds network. Every response is JSON, every read is a GET, and the only required credential is an API key in a header.
This reference covers the stable customer integration surface and nothing else. Website-only helpers and internal publishing operations exist but are not public, are not versioned for you, and are not documented here.
The mental model
A vehicle is addressed by the pair site_name + auction_id — for example encar/38112900. That pair is stable for the life of the listing and is the only identifier you need to persist. Everything else in the API is either a way of finding that pair (search, facets, catalog, top offers) or a way of expanding it (detail, images, price history, VIN history).
- 1Discover.
/api/searchwith filters, or/api/facetsto populate the filter controls themselves. You get result cards carryingsite_nameandauction_id. - 2Expand.
/api/auction/{site}/{id}returns the full record for one card — specification, condition, the normalizedvehicle_detailsblock, and the image gallery embedded asvault_gallery. - 3Enrich. Price history, VIN history, market reference prices and the landed-cost calculator all take the same pair, or figures from the detail response.
Base URL
https://api.thecarapi.comHTTPS is required; plain HTTP is refused rather than redirected. Send JSON request bodies with Content-Type: application/json. There is no URL version prefix — the schema contract is carried in the contract_version field of every response and declared in full by /api/contract.
Your first request
curl -sS \
-H "X-API-Key: $API_KEY" \
-H "Accept-Encoding: gzip" \
--compressed \
"https://api.thecarapi.com/api/search?brand=bmw&fuel=Diesel&year_from=2018&sort=price_low&limit=24"--compressed is worth having from the first call — see Responses & pagination.A successful response carries success: true, the payload under a route-specific key, and the correlation fields described in Responses & pagination. Store request_id — it is the only thing that lets support trace a specific call.
Anatomy of a request
| Header | Value | Why |
|---|---|---|
X-API-Key | Your key | Required. One auth method per request. |
Accept-Encoding | gzip | Responses over 2 KB come back gzipped — roughly an eighth of the bytes on a full search page. |
If-None-Match | A previously received ETag | Unchanged pages answer 304 with no body. |
Content-Type | application/json | Only for the routes that accept a POST body. |
| Response header | Meaning |
|---|---|
X-Request-ID | Correlation id, mirrored in the body as request_id. Log it. |
ETag | Weak validator for conditional requests. |
X-Cache | HIT, MISS or STALE. |
X-RateLimit-Limit / -Remaining / -Reset | Quota state for the current window. |
Retry-After | Sent with 429. Wait this long, do not guess. |
X-Live-Price | pending when a bid refresh missed the request budget. |
X-Details-Fetch | Set while /api/car-details is still fetching upstream. |
What this API is not
- Not a bidding interface. It observes auction prices; it never places, raises or withdraws a bid, and it grants no purchase rights on any source platform.
- Not a fee quote. Auction fees, transport and delivery figures are quoted to our buyer account and our address, so they are stripped at the response boundary. Use the import calculator for landed cost on your own route.
- Not a file host for source paperwork. Inspection reports and documents are returned as links to the auction house; they are never proxied or stored, and upstream links expire.
Read these before you render anything
Three pages answer the questions that cause the most rework, and all three are about what the data means rather than how to request it.
| Page | The question it answers |
|---|---|
| Fields by source | Which of the seven sources actually publishes damages, service history, documents and equipment — and which do not. Read this before you promise a feature. |
| CO2 & emissions | Why there are two CO2 fields, why an estimate always ships with a test standard attached, and why a 2019 figure is not comparable with a 2022 one. |
| Live prices | Every source is priced live. How the continuous feed works, the extra at-request bid re-read on open-bidding auctions, and why an absent live_price block never means a stale price. |