---
title: "Side-by-side specs for 2–4 variants"
method: GET
path: "/compare"
tags: ["utilities"]
---

# Side-by-side specs for 2–4 variants

`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

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.

## Query parameters

- `ids` string, required
- `locale` 'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fr' | 'hr' | 'hu' | 'it' | 'no' | 'pl' | 'pt' | 'ro' | 'sk' | 'sr' | 'sv' | 'tr'

## Headers

- `PAYMENT-SIGNATURE` string

## Response `200`

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

- CompareEnvelope
  - `data` VariantSpecs[]
    - `accel_0_100_s` number, nullable
    - `battery_kwh` number, nullable
    - `brand_slug` string
    - `display_name` string
    - `locale` string
    - `model_slug` string
    - `power_hp` integer, nullable
    - `price_new_eur` integer, nullable: Null când sursa poartă 0, ceea ce înseamnă „necunoscut", nu „gratis".
    - `specs` object
    - `top_speed_kmh` integer, nullable
    - `torque_nm` integer, nullable
    - `variant_id` string
    - `year_from` integer, nullable
    - `year_to` integer, nullable
  - `meta` Meta
    - `last_synced_at` string, date-time, required
    - `locale` string
    - `units` 'metric' | 'imperial'

## Other responses

- `400`: RFC 9457 problem document.
- `401`: No key, or a key we do not know. `WWW-Authenticate: Bearer` on the MCP surface. The MCP server needs no key at all; a REST demo key is one click away. On the two x402 routes a request with no key gets `402` instead, with the price.
- `402`: No key and no valid payment. The price and how to pay are in the `PAYMENT-REQUIRED` header; the body says the same in words. A request that sent a key never gets this — it gets `401`/`403` instead.
- `403`: RFC 9457 problem document.
- `404`: Not found. A token that does not decode gets this too.

---

[API](https://skmtc.dev/cars-data/apis/cars-data-com-api.md) · [All operations](https://skmtc.dev/cars-data/apis/cars-data-com-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cars-data/apis/cars-data-com-api/revisions/4aeb6b2b5c5f?raw)
