contract 2026-10-05
Endpoints

Historical inventory

Ended listings moved into the archive, separate from ended rows still in the live table. Requires the archive scope. A last observed price is not a confirmed sale price.

GET

/api/archive/auction/{site_slug}/{auction_id}

One archived auction in full

Requires the archive scope.

Parameters

site_slugstring · in the URL pathrequired

Example openlane·Where the value comes from Current API reference

auction_idinteger · in the URL pathrequired

The source's auction id, as published on the search card.

Example 38112900·Where the value comes from Current API reference

Example request

Request
GET https://api.thecarapi.com/api/archive/auction/encar/38112900

Example response

json
{
  "success": true,
  "auction": {
    "site_name": "encar",
    "auction_id": 38112900,
    "auction_id_str": "38112900",
    "archived": true,
    "archived_at": "2026-09-01T12:00:00",
    "final_price": null
  },
  "contract_version": "2026-10-05"
}
GET

/api/archive/facets

Counts of finished lots per filter value.

Requires the archive scope.

Parameters

site / site_excludestring · query string

Comma-separated source slugs to include or leave out. An unknown slug is a 400 naming the offender.

Example openlane·Where the value comes from /api/sites -> sites[].name

brand / modelstring · query string

Brand name, slug or brand_id, and model name or slug, matched exactly as on /api/archive/search. Giving brand adds a model facet.

Example bmw / 320d·Where the value comes from /api/brands -> brands[].slug, /api/models?brand=bmw -> models[].slug

countrystring · query string

ISO country code or europe.

Example DE·Where the value comes from /api/countries -> country_details[].code

fuel / gearboxstring · query string

Canonical fuel and gearbox groups.

Example Diesel·Where the value comes from /api/fuels -> fuels[], /api/gearboxes -> gearboxes[]

year_from / year_tointeger · query string

Registration-year range, inclusive.

Example 2018 / 2024·Where the value comes from Year bounds chosen by your user.

production_year_from / production_year_tointeger · query string

Production-year range. Falls back to registration year where the source publishes no build year.

Example 2018 / 2024·Where the value comes from Year bounds chosen by your user.

kilometers_from / kilometers_tointeger · query string

Mileage range in kilometres.

Example 0 / 150000·Where the value comes from Mileage bounds chosen by your user.

price_from / price_tointeger · query string

Public EUR price range.

Example 1000 / 30000·Where the value comes from EUR budget chosen by your user.

horsepower_from / horsepower_tointeger · query string

Power range in HP.

Example 150 / 300·Where the value comes from Power bounds chosen by your user.

engine_from / engine_tonumber · query string

Engine size in litres. 1.6 matches from 1550 cc; 2.0 matches up to 2049 cc.

Example 1.6 / 2.0·Where the value comes from Engine sizes chosen by your user.

damagedboolean · query string

true keeps only damaged or broken vehicles, false only undamaged ones.

Example false·Where the value comes from Your filter choice.

archived_from / archived_tostring · query string

Lots that ended on or after / on or before this date (YYYY-MM-DD).

Example 2026-07-01 / 2026-09-30·Where the value comes from Date range chosen by your user.

vinstring · query string

Exact full-VIN filter.

Example WBA8E9G50GNU12345·Where the value comes from A VIN you already have.

limitinteger · query string

Values per facet. Default 100, maximum 500.

Example 100·Where the value comes from How many values your control can hold.

Example requests

Request
GET https://api.thecarapi.com/api/archive/facets?brand=bmw&year_from=2018
GET https://api.thecarapi.com/api/archive/facets?site=copart&archived_from=2026-07-01

Example response

json
{
  "success": true,
  "total": 48210,
  "facets": {
    "site": [
      {
        "value": "openlane",
        "count": 18220
      }
    ],
    "brand": [
      {
        "value": "BMW",
        "count": 48210
      }
    ],
    "model": [
      {
        "value": "320d",
        "count": 3120
      }
    ],
    "country": [
      {
        "value": "DE",
        "count": 11840
      }
    ],
    "fuel": [
      {
        "value": "Diesel",
        "count": 30110
      }
    ],
    "gearbox": [
      {
        "value": "Automatic",
        "count": 35020
      }
    ],
    "year": [
      {
        "value": 2019,
        "count": 6120
      }
    ],
    "condition": [
      {
        "value": "normal",
        "count": 44090
      }
    ]
  }
}

What you get back

totalinteger

Finished lots matching the filters.

facets.<dimension>{value, count}[]

site, brand, country, fuel, gearbox, year and condition, plus model when brand is given — the values present under the other filters, biggest first.

GET

/api/archive/statistics

Closing-price statistics of finished lots, grouped by one dimension.

Requires the archive scope.

Parameters

group_byenum · query string

The dimension to group by. Default month.

Example month·Where the value comes from site, country, brand, model, year, fuel, gearbox, condition, month or week.

site / site_excludestring · query string

Comma-separated source slugs to include or leave out. An unknown slug is a 400 naming the offender.

Example openlane·Where the value comes from /api/sites -> sites[].name

brand / modelstring · query string

Brand name, slug or brand_id, and model name or slug, matched exactly as on /api/archive/search. Giving brand adds a model facet.

Example bmw / 320d·Where the value comes from /api/brands -> brands[].slug, /api/models?brand=bmw -> models[].slug

countrystring · query string

ISO country code or europe.

Example DE·Where the value comes from /api/countries -> country_details[].code

fuel / gearboxstring · query string

Canonical fuel and gearbox groups.

Example Diesel·Where the value comes from /api/fuels -> fuels[], /api/gearboxes -> gearboxes[]

year_from / year_tointeger · query string

Registration-year range, inclusive.

Example 2018 / 2024·Where the value comes from Year bounds chosen by your user.

production_year_from / production_year_tointeger · query string

Production-year range. Falls back to registration year where the source publishes no build year.

Example 2018 / 2024·Where the value comes from Year bounds chosen by your user.

kilometers_from / kilometers_tointeger · query string

Mileage range in kilometres.

Example 0 / 150000·Where the value comes from Mileage bounds chosen by your user.

price_from / price_tointeger · query string

Public EUR price range.

Example 1000 / 30000·Where the value comes from EUR budget chosen by your user.

horsepower_from / horsepower_tointeger · query string

Power range in HP.

Example 150 / 300·Where the value comes from Power bounds chosen by your user.

engine_from / engine_tonumber · query string

Engine size in litres. 1.6 matches from 1550 cc; 2.0 matches up to 2049 cc.

Example 1.6 / 2.0·Where the value comes from Engine sizes chosen by your user.

damagedboolean · query string

true keeps only damaged or broken vehicles, false only undamaged ones.

Example false·Where the value comes from Your filter choice.

archived_from / archived_tostring · query string

Lots that ended on or after / on or before this date (YYYY-MM-DD).

Example 2026-07-01 / 2026-09-30·Where the value comes from Date range chosen by your user.

vinstring · query string

Exact full-VIN filter.

Example WBA8E9G50GNU12345·Where the value comes from A VIN you already have.

limitinteger · query string

Groups returned. Default 100, maximum 500.

Example 24·Where the value comes from How many groups you will show.

Example requests

Request
GET https://api.thecarapi.com/api/archive/statistics?brand=bmw&model=320d&group_by=month
GET https://api.thecarapi.com/api/archive/statistics?group_by=country&year_from=2019

Example response

json
{
  "success": true,
  "group_by": "month",
  "groups": [
    {
      "month": "2026-09",
      "count": 412,
      "priced_count": 401,
      "result_count": 140,
      "buy_now_count": 37,
      "close_median_eur": 18400,
      "close_p25_eur": 14200,
      "close_p75_eur": 22900,
      "close_mean_eur": 18950,
      "buy_now_median_eur": 21900,
      "mean_mileage_km": 98000,
      "mean_hp": 184,
      "damaged_share": 0.08
    }
  ],
  "notes": {
    "close_price": "the source's published result where it has one (result_count), else the last bid seen - not proof of a sale",
    "coverage": "archived lots plus lots that ended and are not archived yet"
  }
}

What you get back

groups[]object[]

Each group is keyed by its dimension (month: "2026-09", site: "openlane", ...) and carries count, priced_count, result_count (lots whose source published a result), buy_now_count, close_median_eur, close_p25_eur, close_p75_eur, close_mean_eur, buy_now_median_eur, mean_mileage_km, mean_hp and damaged_share (0–1). EUR and mean figures are whole numbers, null where nothing in the group had a value. month, week and year groups come back in chronological order, every other grouping biggest first.

notesobject

Plain-language caveats: what close_price means and which lots are covered.

GET

/api/archive/stats

Archive coverage per source

Requires the archive scope.

Example request

Request
GET https://api.thecarapi.com/api/archive/stats

Example response

json
{
  "success": true,
  "total": 0,
  "archived_from": null,
  "archived_to": null,
  "sources": [],
  "contract_version": "2026-10-05"
}