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.
Explore TheCarAPI with Postman
Explore all TheCarAPI endpoints using our public Postman collection. View it online or import the collection directly into your workspace.
Import the collection manually
- Download the collection JSON.
- Open Postman and select Import.
- Upload the downloaded JSON file, or select Link and paste:
https://thecarapi.com/thecarapi.postman_collection.json - Select Import.
- Open Collection → Variables and enter your API key as the local value of
apiKey. - Send a request.
A REST API over normalized auction inventory from Auto1, OpenLane, Schadeautos, Copart Germany, eCarsTrade, Encar, KB ChaChaCha and the Japanese auction houses, plus a European retail classifieds network of some 680 portals. Data responses are JSON, and reads use 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_str — 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_str. - 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 most responses (see Responses & pagination for the handful that omit it) 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, unless you send Authorization instead. One auth method per request. |
Authorization | Bearer <your key> | Equivalent to X-API-Key; use whichever your HTTP client makes easier. |
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-Cache-Age | Age in seconds of a cached /api/car-details payload. Sent only on a cache hit there. |
X-Data-Source | Where a /api/car-details body came from: auctions (our stored record), car_details_cache, or scraped (fetched from the source during your request). |
X-RateLimit-Limit / -Remaining / -Reset | Quota state for the current window. Sent only for keys that carry a quota — a key with no configured limit gets no rate-limit headers at all. |
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. |
Responses may also carry X-Perf-* and X-Local-Source headers. Those are diagnostic, are not part of this contract, and may change or disappear without notice — do not branch on them.
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.
- Report files are served through the API. Normalized document and report URLs use /report-vault paths. Files are fetched and cached; unsupported hosts or non-file pages can redirect to the source.
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 |
|---|---|
| Live prices | Which prices are read at the moment you ask and which reflect the latest successful refresh — and why a detail page can legitimately show a higher price than the card it was opened from. |
| Fields by source | Which of the eight 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. |