contract 2026-08-19
Integration

Agents & machine formats

Every page of this reference as Markdown, plain text, JSON and OpenAPI 3.1 — and how to point a coding agent at it.

This documentation is generated from structured data, so it can be served in whatever shape reads it. If you are integrating with a coding agent or an LLM, take one of the files below rather than parsing these HTML pages.

Formats

FormatURLUse it for
Markdown, one pagehttps://thecarapi.com/docs/<section>.mdPasting a single section into a prompt or a repo.
Markdown, everythinghttps://thecarapi.com/docs/thecarapi-api-reference.mdThe entire reference as one file, front matter included.
Plain text, everythinghttps://thecarapi.com/docs/thecarapi-api-reference.txtContext windows and tools that choke on Markdown tables.
JSONhttps://thecarapi.com/docs/thecarapi-api-reference.jsonProgrammatic access to sections, endpoints, parameters and response fields.
OpenAPI 3.1https://thecarapi.com/openapi.jsonClient generation, Postman/Insomnia import, agent tool definitions.
Postman collectionhttps://thecarapi.com/thecarapi.postman_collection.jsonImport straight into Postman — every endpoint, grouped and described.
llms.txthttps://thecarapi.com/llms.txtThe site index in the llms.txt convention.
Docs index for agentshttps://thecarapi.com/docs/llms.txtJust the documentation tree, with a one-line summary per section.

Every docs page also advertises its Markdown twin in the head as <link rel="alternate" type="text/markdown">, and the Copy and Download controls at the top of each page produce exactly these files client-side.

Fetching them

bash
# One section
curl -sS https://thecarapi.com/docs/live-prices.md

# The whole reference, as Markdown
curl -sS https://thecarapi.com/docs/thecarapi-api-reference.md

# The endpoint surface, as OpenAPI 3.1
curl -sS https://thecarapi.com/openapi.json | jq '.paths | keys'
These are static files. No API key is needed to read the documentation.

Giving an agent the right context

The full reference is large. For most tasks an agent needs three things: the conventions, the data dictionary, and the one endpoint group it is calling. Fetching those three sections is cheaper and more accurate than dropping the whole document into a context window.

text
You are integrating with TheCarApi.

Read these first:
  https://thecarapi.com/docs/conventions.md     — envelope, ETags, pagination, rate limits
  https://thecarapi.com/docs/errors.md          — status codes and what is worth retrying
  https://thecarapi.com/docs/<group>.md         — the endpoint group you are calling
  https://thecarapi.com/openapi.json            — machine-readable parameter and response shapes

Rules that are not obvious from the schema:
  - A vehicle is addressed by site_name + auction_id, e.g. encar/38112900.
  - Prices are JSON numbers, never strings.
  - An absent live_price block is normal, not an error.
  - Never hardcode the source list; read /api/sites and /api/contract at startup.
  - Retry 429/503 honouring Retry-After. Never retry 400/401/403/404.
A starting prompt. Swap <group> for search, auctions, car-details and so on.

Crawling policy

robots.txt allows search and AI citation crawlers and disallows bulk training harvesters. The documentation is public and unauthenticated; the API behind it is not. Nothing in these files is a credential, and no endpoint here will answer without a key.