Typeahead search over variant names
Trigram matching on brand, model and display name. In the demo tier this is a substring match over the 40 rows, in the Worker — there is no catalogue behind it to walk.
Request
- Base URL: https://api.cars-data.com/v1
- URL: https://api.cars-data.com/v1/search
- Auth: one of:
- API key in header X-Api-Key
- HTTP bearer
- none
Query parameters
The search phrase.
One of the 20 published languages. Anything else — including a language the site does not publish — falls back to en silently.
Opaque pagination token — hand back the links.next value from the previous page. Omit it for the first page. A token that cannot be read restarts from the first page rather than failing, so a client holding a stale cursor pages again instead of breaking.
Page size, 1–50. Values above 50 are clamped to 50.
Headers
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": [
{
"generation_id": "g_1a2b3c4d",
"variant_id": "v_1a2b3c4d"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.