Наблюдение на автомобили
Saved vehicle searches matched against every auction source your key can use and, if it has classifieds, the European classifieds — scanned every 10 minutes, with new matches delivered by polling or a signed webhook. Scope: watches. Granted per contract — not on a new key by default. Up to 10 criteria per watch and 25 active watches per key.
Справочникът на ендпойнтите е на английски, както и самият API.
From a watch to a match
- 1Create the watch with POST /api/watches and keep the webhook_secret from the response — it is shown only here and when rotated.
- 2The first scan records what already matches, flagged initial: true. Later scans add only cars listed since.
- 3Either poll GET /api/watches/{watch_id}/matches with after_id set to the last next_after_id you saw, or receive each batch of new matches on your webhook_url.
- 4Verify every webhook delivery: X-Watch-Signature is sha256=<hex HMAC-SHA256 of "<X-Watch-Timestamp>.<raw body>"> under your webhook_secret.
The calling key’s watches, with their match counts.
Изисква обхвата watches scope.
Example request
GET https://api.thecarapi.com/api/watchesПримерен отговор
{
"success": true,
"watches": [
{
"id": 7,
"name": "Diesel 3 Series under 20k",
"criteria": [
{
"make": "BMW",
"model": "3 Series",
"fuel": "Diesel",
"year_from": 2018,
"max_price": 20000
}
],
"include_classifieds": true,
"webhook_url": "https://example.com/hooks/watch",
"webhook_enabled": true,
"active": true,
"match_count": 132
}
],
"contract_version": "2026-10-05"
}Save a vehicle configuration to keep searching for.
Изисква обхвата watches scope.
Параметри
criteriaobject | object[] · JSON bodyзадължителенOne criterion or a list of up to 10; a car matching any of them matches the watch. Each needs make, and may give model, fuel, gearbox, country (ISO or europe), year_from / year_to, kilometers_from / kilometers_to, horsepower_from / horsepower_to (auctions only) and price_from / max_price.
Пример {"make": "BMW", "model": "3 Series", "fuel": "Diesel", "year_from": 2018, "max_price": 20000}·Откъде идва стойността /api/brands, /api/models, /api/fuels, /api/gearboxes
namestring · JSON bodyFree text.
Пример Diesel 3 Series under 20k·Откъде идва стойността Your label.
include_classifiedsboolean · JSON bodyDefault true. Also scan the European classifieds — only when the key has the classifieds scope.
Пример true·Откъде идва стойността Your choice.
webhook_urlstring · JSON bodyhttps on a public address. Each batch of new matches is POSTed here, signed.
Пример https://example.com/hooks/watch·Откъде идва стойността Your receiver.
Example request
POST https://api.thecarapi.com/api/watches
{"name": "Diesel 3 Series under 20k", "criteria": [{"make": "BMW", "model": "3 Series", "fuel": "Diesel", "year_from": 2018, "max_price": 20000}], "webhook_url": "https://example.com/hooks/watch"}Примерен отговор
{
"success": true,
"watch": {
"id": 7,
"name": "Diesel 3 Series under 20k",
"criteria": [
{
"make": "BMW",
"model": "3 Series",
"fuel": "Diesel",
"year_from": 2018,
"max_price": 20000
}
],
"include_classifieds": true,
"webhook_url": "https://example.com/hooks/watch",
"webhook_enabled": true,
"webhook_secret": "3f9c…",
"active": true
},
"contract_version": "2026-10-05"
}One watch.
Изисква обхвата watches scope.
Параметри
watch_idinteger · in the URL pathзадължителенThe watch id.
Пример 7·Откъде идва стойността /api/watches -> watches[].id
Example request
GET https://api.thecarapi.com/api/watches/7Примерен отговор
{
"success": true,
"watch": {
"id": 7,
"name": "Diesel 3 Series under 20k",
"active": true,
"match_count": 132
},
"contract_version": "2026-10-05"
}Change a watch.
Изисква обхвата watches scope.
Параметри
watch_idinteger · in the URL pathзадължителенThe watch id.
Пример 7·Откъде идва стойността /api/watches -> watches[].id
name / criteria / include_classifiedsstring | object[] | boolean · JSON bodyNew criteria restart the baseline: the next scan records what matches then as initial.
Пример criteria·Откъде идва стойността As on create.
webhook_url / webhook_enabledstring | boolean · JSON bodyAn empty webhook_url removes it.
Пример ""·Откъде идва стойността Your receiver.
activeboolean · JSON bodyPause or resume scanning.
Пример false·Откъде идва стойността Your choice.
rotate_secretboolean · JSON bodytrue issues a new webhook_secret, returned in this response only.
Пример true·Откъде идва стойността Your choice.
Example requests
PATCH https://api.thecarapi.com/api/watches/7
{"active": false}PATCH https://api.thecarapi.com/api/watches/7
{"rotate_secret": true}Примерен отговор
{
"success": true,
"watch": {
"id": 7,
"active": false
},
"contract_version": "2026-10-05"
}Delete a watch and its matches.
Изисква обхвата watches scope.
Параметри
watch_idinteger · in the URL pathзадължителенThe watch id.
Пример 7·Откъде идва стойността /api/watches -> watches[].id
Example request
DELETE https://api.thecarapi.com/api/watches/7Примерен отговор
{
"success": true,
"contract_version": "2026-10-05"
}Matches found for a watch, in the order they were found.
Изисква обхвата watches scope.
Параметри
watch_idinteger · in the URL pathзадължителенThe watch id.
Пример 7·Откъде идва стойността /api/watches -> watches[].id
after_idinteger · query stringStable cursor, so nothing is missed or repeated. Default 0.
Пример 0·Откъде идва стойността The last next_after_id you received.
include_initialboolean · query stringDefault true. false skips what already matched when the watch was created.
Пример false·Откъде идва стойността Your choice.
sourceenum · query stringOnly matches from one side.
Пример auction·Откъде идва стойността auction or classified.
limitinteger · query stringDefault 100, maximum 500.
Пример 100·Откъде идва стойността Page size.
Example requests
GET https://api.thecarapi.com/api/watches/7/matches?after_id=0GET https://api.thecarapi.com/api/watches/7/matches?after_id=1880&include_initial=falseПримерен отговор
{
"success": true,
"matches": [
{
"id": 1881,
"source": "auction",
"initial": false,
"matched_at": "2026-10-18T09:20:00Z",
"vehicle": {
"site": "openlane",
"auction_id": 11409652,
"title": "BMW 320d Touring",
"price_eur": 16900,
"landed_price_eur": 18450,
"api_url": "/api/auction/openlane/11409652"
}
}
],
"next_after_id": 1881,
"has_more": false,
"contract_version": "2026-10-05"
}Какво получавате
matches[].vehicleobjectThe car as it looked when found, with api_url (auctions) or url (classifieds, the original ad) to read it now.
next_after_id / has_moreinteger / booleanSend next_after_id as after_id next time; has_more says whether to ask again straight away.