договор 2026-10-05
Ендпойнти

Исторически инвентар

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.

Справочникът на ендпойнтите е на английски, както и самият API.

GET

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

One archived auction in full

Изисква обхвата archive scope.

Параметри

site_slugstring · in the URL pathзадължителен

Пример openlane·Откъде идва стойността Current API reference

auction_idinteger · in the URL pathзадължителен

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

Пример 38112900·Откъде идва стойността Current API reference

Example request

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

Примерен отговор

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.

Изисква обхвата archive scope.

Параметри

site / site_excludestring · query string

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

Пример openlane·Откъде идва стойността /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.

Пример bmw / 320d·Откъде идва стойността /api/brands -> brands[].slug, /api/models?brand=bmw -> models[].slug

countrystring · query string

ISO country code or europe.

Пример DE·Откъде идва стойността /api/countries -> country_details[].code

fuel / gearboxstring · query string

Canonical fuel and gearbox groups.

Пример Diesel·Откъде идва стойността /api/fuels -> fuels[], /api/gearboxes -> gearboxes[]

year_from / year_tointeger · query string

Registration-year range, inclusive.

Пример 2018 / 2024·Откъде идва стойността 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.

Пример 2018 / 2024·Откъде идва стойността Year bounds chosen by your user.

kilometers_from / kilometers_tointeger · query string

Mileage range in kilometres.

Пример 0 / 150000·Откъде идва стойността Mileage bounds chosen by your user.

price_from / price_tointeger · query string

Public EUR price range.

Пример 1000 / 30000·Откъде идва стойността EUR budget chosen by your user.

horsepower_from / horsepower_tointeger · query string

Power range in HP.

Пример 150 / 300·Откъде идва стойността 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.

Пример 1.6 / 2.0·Откъде идва стойността Engine sizes chosen by your user.

damagedboolean · query string

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

Пример false·Откъде идва стойността Your filter choice.

archived_from / archived_tostring · query string

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

Пример 2026-07-01 / 2026-09-30·Откъде идва стойността Date range chosen by your user.

vinstring · query string

Exact full-VIN filter.

Пример WBA8E9G50GNU12345·Откъде идва стойността A VIN you already have.

limitinteger · query string

Values per facet. Default 100, maximum 500.

Пример 100·Откъде идва стойността 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

Примерен отговор

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
      }
    ]
  }
}

Какво получавате

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.

Изисква обхвата archive scope.

Параметри

group_byenum · query string

The dimension to group by. Default month.

Пример month·Откъде идва стойността 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.

Пример openlane·Откъде идва стойността /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.

Пример bmw / 320d·Откъде идва стойността /api/brands -> brands[].slug, /api/models?brand=bmw -> models[].slug

countrystring · query string

ISO country code or europe.

Пример DE·Откъде идва стойността /api/countries -> country_details[].code

fuel / gearboxstring · query string

Canonical fuel and gearbox groups.

Пример Diesel·Откъде идва стойността /api/fuels -> fuels[], /api/gearboxes -> gearboxes[]

year_from / year_tointeger · query string

Registration-year range, inclusive.

Пример 2018 / 2024·Откъде идва стойността 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.

Пример 2018 / 2024·Откъде идва стойността Year bounds chosen by your user.

kilometers_from / kilometers_tointeger · query string

Mileage range in kilometres.

Пример 0 / 150000·Откъде идва стойността Mileage bounds chosen by your user.

price_from / price_tointeger · query string

Public EUR price range.

Пример 1000 / 30000·Откъде идва стойността EUR budget chosen by your user.

horsepower_from / horsepower_tointeger · query string

Power range in HP.

Пример 150 / 300·Откъде идва стойността 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.

Пример 1.6 / 2.0·Откъде идва стойността Engine sizes chosen by your user.

damagedboolean · query string

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

Пример false·Откъде идва стойността Your filter choice.

archived_from / archived_tostring · query string

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

Пример 2026-07-01 / 2026-09-30·Откъде идва стойността Date range chosen by your user.

vinstring · query string

Exact full-VIN filter.

Пример WBA8E9G50GNU12345·Откъде идва стойността A VIN you already have.

limitinteger · query string

Groups returned. Default 100, maximum 500.

Пример 24·Откъде идва стойността 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

Примерен отговор

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"
  }
}

Какво получавате

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

Изисква обхвата archive scope.

Example request

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

Примерен отговор

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