archive

Search ended auctions

The historical counterpart to /api/search. It reads auctions_archive, which holds lots that ended, stayed inactive for the retention window, and were moved out of the live table with an archived_at stamp. Nothing here is buyable.

This is not a sold-price index. public_price_eur is the last public price observed. final_price may be absent or have an unverified result basis; it is not proof of a completed sale. Call /api/archive/stats for the per-source coverage before building anything on a particular field.

No free-text search parameter. The archive carries no trigram index, and a substring scan across it costs seconds. brand and model match exactly (case- and slug-insensitive), as they do on /api/search.

Default ordering is newest-archived first. The general offset cap (pagination.max_offset, 5000 by default) applies — there is no unfiltered deep-paging path here.

get/api/archive/search

Request

  • Base URL: https://api.thecarapi.com
  • URL: https://api.thecarapi.com/api/archive/search
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer
    • API key in query parameter api_key

Query parameters

sitestring
Example:openlane,ecarstrade

Comma-separated source slugs from /api/sites, OR within the parameter. Case-insensitive; padding and empty members are ignored. An unknown slug is a 400 naming the offender.

site_excludestring
Example:copart

Comma-separated source slugs to leave out. Same rules as site.

brandstring
Example:bmw

Brand display name, slug (from /api/brands), or numeric brand_id.

modelstring
Example:320d

Model name or slug.

countrystring
Example:DE

ISO country code from /api/countries, or the pseudo-country europe. Accepted and ignored by /api/sites and /load-models.

fuelstring
Example:Diesel

Canonical fuel group from /api/fuels.

gearboxstring
Example:Automatic

Canonical gearbox group from /api/gearboxes.

year_frominteger
Example:2018

Lower bound on registration year, inclusive.

year_tointeger
Example:2024

Upper bound on registration year, inclusive.

production_year_frominteger
Example:2018

Lower bound on production year, inclusive. production_year falls back to the registration year where the source publishes no build year, with registration-year fallback when build-year evidence is absent.

production_year_tointeger
Example:2024

Upper bound on production year, inclusive.

kilometers_frominteger

Lower bound on mileage in kilometres.

kilometers_tointeger

Upper bound on mileage in kilometres.

price_frominteger

Lower bound on the public EUR price.

price_tointeger

Upper bound on the public EUR price.

archived_fromstring date
Example:2026-07-01

Only lots archived on or after this date (YYYY-MM-DD). Anything else is a 400.

archived_tostring date
Example:2026-08-31

Only lots archived on or before this date (YYYY-MM-DD). Inclusive of the whole day named.

vinstring
Example:WBA8E9G50GNU12345

Exact full-VIN filter. Punctuation and case are ignored. A value that is not a valid 17-character VIN is a 400. Only about 4% of archived rows carry a VIN at all.

sort'archived_desc' | 'archived_asc' | 'price_low' | 'price_high' | 'mileage_low' | 'mileage_high' | 'year_new' | 'year_old'

archived_desc (the default) is newest-archived first. Sorting by price, mileage or year puts rows missing that value last, whichever direction you ask for.

Result ordering.

limitinteger

Page size. Capped at pagination.max_limit from GET /api/contract (100 by default); larger values are clamped down rather than rejected. Do not combine with page_size — that is a 400.

offsetinteger

0-based row offset. Do not combine with page — that is a 400. Bounded by pagination.max_offset (5000 by default) on archive, catalog, top-offers and classifieds; /api/search and /api/listVehicles have no offset cap.

pageinteger

1-based page number; maps to offset = (page - 1) * limit. Do not combine with offset.

page_sizeinteger

Alias for limit. Do not combine with limit.

include_totalboolean

false returns total: null and skips the count, which is faster.

Headers

If-None-Matchstring
Example:W/"6f1c0a9d8e"

Echo back the ETag from your last response for this URL. An unchanged page answers 304 Not Modified with no body. ETags are weak, so the tag stays valid whether or not the body came back compressed.

Response

Matching archived auctions.

successboolean required
contract_versionstring

Matches info.version of this document.

request_idstring

Also returned as the X-Request-ID header.

server_timestring date-time

UTC ISO-8601 timestamp of the response.

data_updated_atstring date-time

Route-supplied data timestamp, falling back to server_time. Not a guaranteed source refresh time; inspect listing observation timestamps and live_price.fetched_at where available.

totalinteger nullable

null when totals are suppressed or could not be computed.

limitinteger
offsetinteger
pageinteger
page_sizeinteger
total_pagesinteger nullable

null when total is null.

max_pageinteger nullable

Deepest page reachable under the offset policy.

sort'archived_desc' | 'archived_asc' | 'price_low' | 'price_high' | 'mileage_low' | 'mileage_high' | 'year_new' | 'year_old'

archived_desc (the default) is newest-archived first. Sorting by price, mileage or year puts rows missing that value last, whichever direction you ask for.

Example response

{
  "success": true,
  "contract_version": "2026-09-03",
  "results": [
    {
      "auction_id": 38112900,
      "site_name": "openlane",
      "clean_make": "BMW",
      "clean_model": "320d",
      "model_display": "320d M Sport",
      "registration_year": 2020,
      "production_year": 2019,
      "production_month": 11,
      "mileage": 45000,
      "fuel_group": "Diesel",
      "gearbox_group": "Automatic",
      "steering": "left",
      "public_price_eur": 21500,
      "auction_end_at": "2026-08-20T10:00:00Z",
      "country_code": "DE",
      "auction_id_str": "38112900"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.