utilities

Side-by-side specs for 2–4 variants

Ids are decoded strictly: one unreadable token fails the whole call with 400, rather than quietly comparing the cars that did parse.

Available in the demo tier, for cars inside the 40. Paid with x402, the price is flat for the call, however many of the 2–4 cars you compare.

get/compare

Request

  • Base URL: https://api.cars-data.com/v1
  • URL: https://api.cars-data.com/v1/compare
  • Auth: one of:
    • API key in header X-Api-Key
    • HTTP bearer
    • none

Query parameters

idsstring required
Example:v_1a2b3c4d,v_5e6f7a8b

2–4 opaque variant tokens, comma-separated.

locale'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fr' | 'hr' | 'hu' | 'it' | 'no' | 'pl' | 'pt' | 'ro' | 'sk' | 'sr' | 'sv' | 'tr'

One of the 20 published languages. Anything else — including a language the site does not publish — falls back to en silently.

Headers

PAYMENT-SIGNATUREstring

x402 v2 payment proof, base64 JSON, built by an x402 client from the PAYMENT-REQUIRED header of a previous 402. Only on the two paid routes, and only without a key — a request with a key ignores it.

Response

OK. Paid with x402, it also carries PAYMENT-RESPONSE.

Example response

{
  "data": [
    {
      "variant_id": "v_1a2b3c4d"
    }
  ]
}

Changes

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