# Cardog API v2 documentation

VIN identity, canonical specs, live market data, and recalls — one key.

**The ref is the API.** Every parameter is an entity ref (`make:tesla`, `model-year:honda/cr-v/2026`) or a VIN; every response carries refs plus `links` to adjacent resources. Free text is accepted in exactly one place — `GET /v2/entities/resolve` — and returns refs with confidence, never silently fuzzed results.

**Errors are instructions.** Every non-2xx body is the ErrorEnvelope: `code`, `message`, `hint`, `docs_url`, the offending `refs` named, and nearest-ref `suggestions` where computable.

**Price is machine-readable.** `GET /v2/pricing` is the live rate card; every metered response carries `X-Credits-*` headers.

- Base URL: `https://api.cardog.app`
- Contract version: 2026-10-26
- Auth: API key via `x-api-key` or `Authorization: Bearer`. Create one at https://cardog.app/login?next=/account/api
- Machine-readable spec: `GET https://api.cardog.app/v2/openapi.json`
- Live route groups today: `vin`, `chassis`, `entities`, `specs`, `listings`, `instruments`, `quotes`, `tape`, `recalls`, `safety`, `charging`, `fuel`, `locations`, `feedback`, `parts`, `history`, `carriers`, `platform` (the rest are frozen contract, not yet mounted)
- Every docs page has a markdown twin: append `.md`, or send `Accept: text/markdown`

---

# Quickstart

Get a key, save it in your shell, and decode a VIN. Base URL: `https://api.cardog.app`.

1. **Get an API key**

   [Create a key](https://cardog.app/login?next=/account/api). Sign in with your phone or a passkey, then
   create a key. It is shown once, so copy it before you close the dialog.

2. **Save it in your shell**

   ```bash
   export CARDOG_API_KEY="crdg_..."
   ```

3. **Decode a VIN**

   ```bash
   curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
     -H "x-api-key: $CARDOG_API_KEY" \
     -H "Cardog-Version: 2026-10-26"
   ```

   ```typescript
   // npm install @cardog/api
   import { CardogClient } from "@cardog/api";

   const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

   const result = await client.v2.vin.getByVin("2T3R1RFV7MW180266");
   ```

   ```python
   # pip install cardog
   import os

   from cardog import Cardog

   client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

   result = client.v2.vin.get_by_vin("2T3R1RFV7MW180266")
   ```

   You get one identity card back. A decode costs 2 credits; the response headers say
   what is left:

   ```http
   X-Credits-Rate: 2
   X-Credits-Remaining: 48
   ```

   ```json
   {
     "vin": "2T3R1RFV7MW180266",
     "valid": true,
     "year": 2021,
     "make": "Toyota",
     "model": "RAV4",
     "trim": "XLE HV",
     "refs": {
       "make": "make:toyota",
       "model": "model:toyota/rav4",
       "modelYear": "model-year:toyota/rav4/2021"
     },
     "links": {
       "instrument": "/v2/vin/2T3R1RFV7MW180266/instrument",
       "recalls": "/v2/vin/2T3R1RFV7MW180266/recalls",
       "listings": "/v2/vin/2T3R1RFV7MW180266/listings"
     }
   }
   ```

## Next steps

- [Resolve free text to refs](https://cardog.app/docs/entity-resolution): turn "2021 civic" into refs every endpoint takes.
- [Recalls by VIN](https://cardog.app/docs/recalls): open campaigns for the car you just decoded.
- [MCP server](https://cardog.app/docs/mcp): give an agent the same calls as tools.
- [Authentication](https://cardog.app/docs/authentication): both headers, plans and key hygiene.

---

# Authentication

Every `/v2/*` request needs a credential. For developers that credential is
an **API key**.

## Creating a key

Create a key from [Account → API](https://cardog.app/login?next=/account/api); the [Quickstart](https://cardog.app/docs/quickstart) walks through it.

## Sending the key

Two headers are accepted, and they are equivalent:

```bash
# x-api-key header
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# Authorization bearer
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "Authorization: Bearer $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

## Plans

Monthly request allowances per plan, rendered from the platform's own plan
definitions. See [/pricing](https://cardog.app/pricing) for current prices.

| Plan | Credits / month |
| --- | --- |
| Free | 50 |
| Starter | 1,000 |
| Pro | 5,000 |
| Business | 25,000 |
| Enterprise | 100,000 |

A VIN decode is 2 credits; a recall check by VIN is 5. See [Credits](https://cardog.app/docs/credits).

Metered responses carry `X-Credits-*` headers, and `GET /v2/pricing` returns
the machine-readable rate card without auth.

## When auth fails

Failures use the standard [error envelope](https://cardog.app/docs/errors):

- `401 unauthorized`: no valid key, session, or internal credential
- `403 forbidden`: the credential lacks the scope for this route group
- `402 insufficient_credits`: free-tier hard stop (paid tiers bill overage instead)
- `429 rate_limited`: per-minute rate limit exceeded

## Key hygiene

- Never commit keys to version control. Use environment variables.
- Use separate keys for development and production.
- Rotate keys periodically and revoke unused keys in the dashboard.
- Monitor usage under [Account → API](https://cardog.app/login?next=/account/api).

---

# The Vehicle Graph


Every Cardog endpoint is a view onto one structure: a graph of automotive
entities, each with a permanent identifier, each linked to what the platform
knows about it. Understand the graph and the API stops being a list of routes
— every response tells you where you can go next.

## Nodes: entities and their refs

An entity is a node in the graph — a make, a model, a model year, a body
style, a fuel type. Every entity has exactly one **ref**: a permanent,
human-readable identifier of the form `{domain}:{key}`.

```
make:honda
model:honda/civic
model-year:honda/civic/2021
fuel-type:electric
recall:tc/2024-123
```

Refs are all-lowercase, with `/` separating the segments of composite keys.
They are identifiers, not display strings — `make:mini` is the ref; "MINI"
is the display name carried in the entity's `name` field. This distinction
is deliberate: display casing varies across data sources, and case-splits are
how catalogs silently fracture. The ref never varies.

Two domains break the lowercase rule, for a reason: `nano:` and `squish:`
keys are uppercase VIN-charset strings, because they are machine-derived from
VINs — no human ever types one from memory, and keeping them byte-recognizable
against VINs is worth the exception.

**Refs are stable join keys.** Store them in your own database columns, your
config, your agent's memory. `make:honda` will mean Honda for as long as the
platform exists. This permanence is the contract that makes the graph usable
as infrastructure.

The grammar itself is open source: `npm install @cardog/entities` and your
code validates, builds, and types refs with zero API calls — see
[The ref grammar](https://cardog.app/docs/ref-grammar) for holding the language offline.

## Edges: hierarchy and links

Entities form a hierarchy: a model year belongs to a model, a model to a make.
Dereference any entity and you get its ancestors, its children, and counts of
what hangs off it:

```bash
curl "https://api.cardog.app/v2/entities/model:honda/civic" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The response carries `parents` (the chain up to `make:honda`),
`children` (the model years), `counts` (how many live listings, recall
campaigns, and children the graph holds for this node), and `links` — ready
URLs into every other group for this entity. Responses are self-describing:
follow the links instead of constructing paths.

## Entering the graph

There are exactly two doors, by design.

**Free text enters through resolve — and nowhere else.** Your user says
"2021 Civic", not `model-year:honda/civic/2021`:

```bash
curl "https://api.cardog.app/v2/entities/resolve?q=civic&domain=model" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Resolve returns candidates with confidence scores, best first. `best` is
non-null only when a candidate clears the confidence floor — the API never
guesses on your behalf. Everywhere else, a parameter that is not a well-formed,
known ref is a `400` that names the offending value and points you back to
resolve. Never a fuzzy match, never a silently empty result. An unknown ref is
a fact worth telling you about, not a thing to paper over.

**VINs enter through decode.** A VIN is the physical world's pointer into the
graph:

```bash
curl "https://api.cardog.app/v2/vin/1HGCM82633A123456" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The decode returns the vehicle's identity *as refs* — its make, model, model
year, fuel type, body style — each one verified against the registry before
it is claimed. A null ref in the response means "not derivable for this VIN,"
never "we guessed."

## The grains: nano and squish

Between "one specific vehicle" (a VIN) and "a model year" (millions of
vehicles) sit two machine-derived grains, and most market questions live
there:

- **`squish:`** — the first 9 meaningful VIN characters (WMI + VDS + model
  year). Every VIN sharing a squish is the same *configuration* of the same
  model year: same plant-agnostic build. This is the exact-config market
  grain.
- **`nano:`** — the squish plus plant (VIN positions 1–8, 10 and 11), and
  positions 12–14 when position 3 is `9`, where they complete a
  small-volume manufacturer's identifier. Vehicles sharing a nano are
  fungible: same build, same origin. This is the deduplication and
  comparables grain.

Both are pure functions of the VIN — derivable offline, forever, from the
VIN alone. A quote at the squish grain answers "what is *this exact car*
worth on the live market," not "what do Civics go for."

## What hangs off the graph

Every dataset the platform serves is keyed to graph nodes, which is what makes
the API composable:

| Data | Keyed by | Group |
| --- | --- | --- |
| Live listings, facets, counts | entity refs + nano | [Listings](https://cardog.app/docs/reference/listings) |
| Canonical specs (173 attributes, 17 sections) | model-year ref | [Specs](https://cardog.app/docs/reference/specs) |
| Recall campaigns (TC + NHTSA, fused) | recall ref → model-year refs | [Recalls](https://cardog.app/docs/reference/recalls) |
| Live quotes and the tape | model-year ref, squish | [Instruments](https://cardog.app/docs/reference/instruments), [Quotes](https://cardog.app/docs/reference/quotes), [Tape](https://cardog.app/docs/reference/tape) |
| Safety ratings and complaints | model-year ref | [Safety](https://cardog.app/docs/reference/safety) |

One ref, held once, dereferences into all of it. That is the shape of a
typical integration: **resolve once (or decode a VIN), hold the refs, query
everything else with them.** The refs in your database columns are the same
refs in our registry — your data and ours join on identical keys.

## Provenance

Facts in the graph carry authority. A recall record is Transport Canada's,
not ours — responses carry the issuing authority and data freshness
(`asOf`) so what you cite is citable. Where a fact's tier matters
(authoritative, commercial, derived, observed), the response says so rather
than flattening everything into unattributed data.

## Why a graph, and not a database dump

The registry's vocabulary is open — the ref grammar is documented, refs are
free to hold, and validating one requires no API call. What the platform
meters is *answers*: resolution, enumeration, and the data keyed to the
nodes. Browse endpoints are paginated for evaluation, not extraction. The
graph is infrastructure you build on, with the vocabulary as the public
interface and the facts as the product.


---

# Entity resolution


Resolution turns something from the world (a phrase a user typed, a VIN off
a windshield, a build code) into a node in the
[Vehicle Graph](https://cardog.app/docs/vehicle-graph). It either succeeds or it reports how
far it got. It never guesses.

Most identity bugs in automotive data come from a system that picked one
answer when it had three, and every layer downstream inherited the guess
without knowing it. This API is built so that cannot happen. **When
resolution cannot narrow to one, it says so in a typed field and returns
everything that survived.**

## No fuzzy matching at read time

Any parameter that is not a well-formed, known ref returns a `400` naming
the value. There is no fuzzy match and no empty result for a bad ref.
Normalization happens once, in the pipeline, against closed vocabularies. It
never happens per request, and it never happens against display text.

This is why free text is only accepted at one endpoint.

## Resolve, for text

```bash
curl "https://api.cardog.app/v2/entities/resolve?q=2021%20civic&domain=model-year" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Candidates come back scored, best first. `best` is non-null **only** when
a candidate clears the confidence floor. A null `best` with three
candidates is a real answer: the input was ambiguous, so ask your user
rather than taking element zero.

## Decode, for VINs

```bash
curl "https://api.cardog.app/v2/vin/1FTEX1CB0NKD00000" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The decode returns identity **as refs**, each verified against the registry
before it is returned. A null ref means the fact is not derivable from this
VIN. It never means a guess was withheld. The decode also returns the
**build code**, `nano:`, which is where resolution gets more involved.

## The build code is the resolution key

`nano:` (VIN positions 1–8, 10 and 11, plus 12–14 when position 3 is
`9`) identifies a configuration: cab, drivetrain, engine, weight class. It is pure string math over the VIN,
derivable offline and stable forever, and it is the key the data endpoints
answer to:

```
/v2/specs/nano:{code}     → the spec sheet for that build
/v2/safety/nano:{code}    → the crash rating for that configuration
/v2/quotes/nano:{code}    → the market price for that build
/v2/entities/nano:{code}  → the build itself, with links to all of the above
```

Resolving to a build code is exact. Resolving from a build code to a
third-party dataset, such as NHTSA's rated configurations, is a join, and a
join has to report its grain.

## Resolution grain

Endpoints that join a build against an external catalogue return
**`matchGrain`**: how precisely your vehicle was located in that catalogue.

| `matchGrain` | Meaning | What to render |
| --- | --- | --- |
| `configuration` | Exactly one configuration survived, nothing blocking | Your vehicle's result. Safe to state as fact. |
| `partial` | Narrowed, but more than one survived | The set. Do not pick from it. |
| `model-year` | Nothing was eliminated | Everything for the model year, labelled as such. |
| `exempt` | The programme does not cover this vehicle | The reason, carried in `note`. |
| `unrated` | The vehicle exists; the programme never tested it | "Not rated". This is a fact, not a gap. |

Alongside it, `candidates` reports how many configurations existed before
narrowing, so `13 → 3` and `3 → 3` are distinguishable. The first did
some work. The second did none.

### The pin rule

```
pinned = matchGrain === "configuration" && !response.unresolved?.length
```

Both halves are required. A single survivor is not automatically your
vehicle. **`unresolved`** names the reasons a unique match still must not
be claimed: an axis the catalogue declares that the platform does not yet
model (`variant-residue:super-crew`), or a decode too coarse to prove which
axle variant was rated (`drive-axle-unresolved`). An unmodeled axis must
never be read as satisfied. If `unresolved` is present, treat the result as
a shortlist of one.

### Ties are reported, not broken

Where a result set carries a headline value, `best` is populated only when
the maximum is **unique**. Three configurations tied at five stars produce
`best: null`. Breaking that tie would mean picking alphabetically and
presenting it as a finding.

## Trim is not an identity

The most common integration mistake is inferring resolution from trim text.
Do not do this, even where it appears to work.

`trim` is display text. It is not a join key, and nothing in the platform
joins on it. `"Work Truck"` spans four weight classes, and `"LE"` spans
gas and hybrid. Where trim is carried it comes tagged with its authority
tier (`derived` from the VIN's own pattern, or `observed` from a seller's
listing). Those are different facts about different things, not two sources
for one field.

The relationship is **many-to-many**:

- One catalogue variant is encoded by **many VINs**. A King Ranch SuperCrew
  is thousands of vehicles.
- One build code carries **many variants**. Catalogue granularity runs down
  to interior and cosmetic packages that share a VIN pattern exactly.
  Fifteen to thirty per model year is ordinary on a full-size truck.

So a build code neither implies one trim nor is implied by one. If a
shortlist contains a slug that resembles your `trim` string, that
resemblance is a naming coincidence, not a join. When a make names things
differently, code built on it fails without warning. Wait for the grain to
say `configuration`.

## Worked example: a 2022 F-150

```bash
curl "https://api.cardog.app/v2/safety/nano:1FTEX1CBNK" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```jsonc
{
  "matchGrain": "partial",
  "candidates": 13,
  "matched": [
    { "variant": "super-crew",   "overallStars": 5, "frontalDriverStars": 5 },
    { "variant": "super-cab",    "overallStars": 5, "frontalDriverStars": 4 },
    { "variant": "regular-cab",  "overallStars": 5, "frontalDriverStars": 4 }
  ],
  "best": null
}
```

Thirteen rated configurations narrowed to three on drivetrain and fuel
family. The three that remain differ by cab, an axis not yet modeled as a
join column, so all three survive and the grain says `partial`. `best`
is null because all three tie at five stars overall.

The correct rendering is all three, labelled as configurations for this
model year rather than as this vehicle's rating. The incorrect rendering is
`matched[1]`, chosen because `super-cab` resembles the decode's
`"SuperCab"`.

As modeling deepens, results like this collapse toward `configuration`
without any change on your side. That is why you read the grain instead of
the array length.

## Integration checklist

1. Resolve or decode once. Store the **refs**, not the display strings.
2. Query everything else by ref. Never reconstruct one by string
   concatenation. Build it with `@cardog/entities`
   ([the ref grammar](https://cardog.app/docs/ref-grammar)).
3. Branch on `matchGrain` before rendering. Never on array length.
4. Check `unresolved` before treating a single match as a pin.
5. Never join on `trim`, `styleName`, or any display text.
6. Treat `null` as "not known", never as "not applicable". The platform
   distinguishes those, and `unrated` versus `exempt` is that distinction
   made visible.


---

# Conventions

Every `/v2` group follows the same conventions. Learn them once and the
reference pages only have to tell you what an operation returns.

## Request encoding

**Repeatable filters repeat the parameter.** No commas and no custom
delimiters. A filter that takes many values takes the parameter many times.
This example, like every query string on this page, is generated by the
contract's own URL codec:

```http
GET /v2/listings/search?make=make:tesla&make=make:rivian
```

**Ranges are dotted.** `{field}.min` and `{field}.max`, either side
optional:

```http
GET /v2/listings/search?year.min=2022&price.min=20000&price.max=60000
```

**Spec filters address the catalog directly.** `spec.{attributeId}` filters
on any canonical spec attribute. Numeric attributes take `.min`/`.max`,
and availability attributes take repeated values:

```http
GET /v2/listings/search?spec.fuelEconomyCombined.min=35&spec.heatedSeatsFront=standard
```

Unknown spec keys return `400 unknown_spec_attributes` naming the bad
keys, the same way unknown refs do.

## Refs in paths vs queries

A ref's slashes are part of the key (`model-year:honda/cr-v/2026`), so
position matters:

- **In a URL path**, encode slashes as `%2F`:
  `https://api.cardog.app/v2/entities/model-year:honda%2Fcr-v%2F2026`
- **In a query string**, pass the ref raw: `?make=make:tesla`

Every `links` block the API emits is already encoded correctly, which is
one more reason to follow links instead of assembling paths.

A ref is `domain:slug`: `make:tesla`, `model:mini/hardtop`,
`model-year:honda/cr-v/2026`. In a URL path, encode the slashes as `%2F`;
in a query string, pass the ref raw. Ref filters repeat the parameter
(`?make=make:tesla&make=make:rivian`). Browse domains and members with
`GET /v2/entities`, and look up any ref with `GET /v2/entities/{ref}`.
The full grammar, and the npm package that validates it offline, is in
[Ref grammar](https://cardog.app/docs/ref-grammar).

## Query with refs

Refs work across every group: listings, quotes, specs, recalls. Not every
parameter is a ref, though, and the distinction matters:

- **Ref parameters** name a node in the graph: `make`, `model`, and the
  path segment on quotes, specs, and recalls. They take a full
  `{domain}:{key}` string and reject anything else with a `400` that
  names the bad value.
- **Scalar parameters** are ordinary filters: `year.min`, `year.max`,
  `price.max`, `limit`. They take numbers.

On listings, a make is a ref and a year is a range, so `make=make:tesla`
and `year.min=2022` in the same query is normal. Listings filters accept
**make and model refs only**. There is no `model-year=` filter, because a
model year on this surface is a year range. To query a single model year as
a node, use the groups that take one in the path (quotes, specs, recalls,
safety), as below.

```bash
# Listings: make is a ref, year is a range
curl "https://api.cardog.app/v2/listings/search?make=make:tesla&year.min=2022&limit=5" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# Live market quote for an instrument
curl "https://api.cardog.app/v2/quotes/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# Recalls scoped to an entity. make:, model:, and model-year: all work
curl "https://api.cardog.app/v2/recalls/entity/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```typescript
// Listings: ref-native filters
const page = await client.v2.listings.search({
  filters: { makes: ["make:tesla"], year: { min: 2022 } },
  pagination: { limit: 5 },
});

// Live market quote for an instrument
const quote = await client.v2.quotes.getByRef("model-year:honda/cr-v/2026");

// Recalls scoped to an entity
const recalls = await client.v2.recalls.entity("make:toyota");
```

```python
# Listings: ref-native filters
page = client.v2.listings.search(
    filters={"makes": ["make:tesla"], "year": {"min": 2022}}, limit=5
)

# Live market quote for an instrument
quote = client.v2.quotes.get_by_ref("model-year:honda/cr-v/2026")

# Recalls scoped to an entity
recalls = client.v2.recalls.entity("make:toyota")
```

## Response conventions

- **camelCase keys** everywhere. No snake_case in any response.
- **Dates are ISO 8601 strings** (`2026-07-23T12:00:00Z`, or `YYYY-MM-DD`
  for date-grain fields like tape bars).
- **Pagination is an object**, not headers. Paged responses carry a
  `pagination` block with `page`, `limit`. Page size is capped per
  endpoint, and the cap is in the reference.
- **Every response carries `links`**, a map from relation name to a
  server-relative path for related resources (an entity's quotes, recalls,
  listings, specs). Follow them instead of constructing URLs.
- **`null` means not derivable.** A null `fuelType` on a VIN decode
  means the registry cannot support that claim for this VIN. It is a
  statement about coverage, and the API never substitutes a guess where it
  cannot verify.
- **A failed resolution returns nothing.** When `GET /v2/vin/{vin}`
  answers `"valid": false`, every identity field in that response is
  `null` and every ref is `null`, including the `nano` and `squish`
  grains. We do not fill the gap from adjacent records, because a
  plausible-looking join key is worse than an empty one: you would store it.
- **Derived and observed never share a field.** A fact we resolved
  ourselves and a fact we saw on a listing are different facts, and the
  payload keeps them apart. A VIN identity's `trim` is the catalogue trim
  the VIN's own pattern resolves to, tagged by `trimAuthorityTier`. The
  words a seller wrote on a listing ride in `observedTrim` with their own
  `authorityTier` and `asOf`. Price on the first and display the second.

## Request ids and retries

- **Every response carries `X-Request-Id`.** It is the id recorded on
  any credit debit for that request, and every v2 error envelope carries the
  same value as `requestId`. Quote it when you dispute a charge or report
  a failure and we can find the exact debit.
- **Metered POSTs honour `Idempotency-Key`**: `POST /v2/vin/batch` and
  `POST /v2/chassis/image`. Send any string up to 255 characters, one per
  logical call. A retry with the same key and the same body within 24 hours
  returns the first response again and debits nothing, even if your credits
  have since run out: `X-Credits-Rate` is 0, `Idempotent-Replayed` is
  `true`, and `X-Idempotent-Original-Request-Id` is the id of the
  request that was billed. A replay carries no other `X-Credits-*`
  header. The same key with a different body, path or query string is a
  different request and runs fresh. Other routes ignore the header.
- **What is stored.** Only a 2xx that was billed, including a batch whose
  rows partly failed: to decode the failed rows again, send them in a new
  call with a new key. An error, or an answer that cost nothing, is never
  replayed, so that call can be retried with the same key.
- **Billed once per key and body in 24 hours.** A retry sent while the first
  call is still running, or within about a minute of it, can run again
  instead of replaying. It returns a fresh answer without
  `Idempotent-Replayed`, and it is not billed again.
  Its `X-Credits-*` headers are set before the retry is recognised, so they show the call's usual rate and source, but your balance is not reduced a second time.
  If the first call used the last of a free allowance, such a retry can be refused with `402 insufficient_credits`; send it again with the same key once the first call has returned, and it replays.
- **Keys are scoped to the API key that sent them.** The same key sent with another API key is another request.

## Versioning and stability

Within a version, the v2 contract changes **additively**: new fields, new
endpoints, new enum members, new error codes. Nothing a version has shipped
is renamed, removed, or changed in type. A change like that ships as a new
dated version, and the one you pinned keeps answering (see
[Versioning](https://cardog.app/docs/versioning)).

- **Open sets stay open.** Error codes (17 well-known
  today), authority keys, and bar sources can gain members. Dispatch on the
  members you know and fall back gracefully. New members are not a breaking
  change.
- **Refs are permanent.** The ref grammar is versioned
  (`GRAMMAR_VERSION = 1`, exported by the registry
  itself), and a ref, once issued, keeps its meaning for the life of the
  platform.
- **v1 is legacy.** It keeps working for existing integrations, but new
  work should target `/v2` only. The version switcher in these docs marks
  v1 accordingly.

The machine-readable contract is `GET https://api.cardog.app/v2/openapi.json`. These docs,
including this page, are generated from it and from the same source modules
the server imports.

## Batch semantics

Batch endpoints accept the whole batch and resolve each item on its own. One
malformed item fails its own row with the standard
[error envelope](https://cardog.app/docs/errors), in the position it was sent, and never the
whole batch:

```bash
curl -X POST "https://api.cardog.app/v2/vin/batch" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"vins":["2T3R1RFV7MW180266","NOTAVIN"]}'
```

```json
{
  "results": [
    { "ok": true, "vin": "2T3R1RFV7MW180266", "identity": { "…": "…" } },
    { "ok": false, "vin": "NOTAVIN", "error": { "code": "invalid_vin", "…": "…" } }
  ],
  "meta": { "requested": 2, "decoded": 1, "failed": 1 }
}
```

`results` preserves request order and `meta` carries the counts. A batch
takes up to 1,000 VINs and is metered per
VIN decoded. Failed rows cost nothing. See
[Credits](https://cardog.app/docs/credits).

---

# Credits

Every metered request on the platform is priced in **credits**, across
every route group, REST and MCP alike. A request's price depends on what it
answers, not how many bytes it returns. Registry reads are cheap. Identity
and market answers cost more.

> **The posted card** below is version 15, as of
> 2026-11-19, in USD. It is what you
> are charged today. `GET https://api.cardog.app/v2/pricing` is the authoritative copy.
> This page renders from the same module that endpoint serves, and
> `version` only increases, so pin it if you price off our prices.


## The rate card

| Family | Unit | Credits | What it covers |
| --- | --- | --- | --- |
| `vin` | per vin | 2 | Identity decode; batch = N units (one per VIN decoded). |
| `entities` | per request | 1 | Registry browse/resolve/dereference. |
| `specs` | per request | 1 | Catalog + spec sheets. |
| `listings` | per request | 1 | Search, count, facets, detail. |
| `instruments` | per request | 5 | Symbology + instrument cards. |
| `quotes` | per request | 5 | The live book (multi-quote = one request). |
| `tape` | per request | 5 | Prints + daily bars. |
| `recalls` | per vin | 5 | The authoritative per-VIN recall check. Transport Canada + NHTSA fused. |
| `recalls` | per request | 1 | Recall entity/feed/stats reads (non-VIN). |
| `safety` | per request | 1 | NCAP ratings + ODI complaints, keyed by model-year ref. |
| `charging` | per request | 1 | EV charging station search + detail (Open Charge Map data). |
| `parts` | per request | 3 | OEM part numbers for a model year or build code, linked to the manufacturer's official store. |
| `chassis` | per request | 2 | A Japanese chassis number read against the MLIT recall notices: maker, models, type approvals, engines and build dates. A code no notice names (`code_unknown`) costs 0. |
| `chassis` | per image | 2 | A chassis number read off a photo of the caution plate or frame stamp. Billed only when a number is read; a refusal costs 0. |
| `fuel` | per request | 1 | Fuel stations with current pump prices, and daily area prices (Canada). |
| `locations` | per request | 1 | Places near a point (fuel stations, chargers, dealers), and one place in full. |
| `feedback` | per request | 0 | Report a wrong or missing record, and read it back. Free on every plan; rate limited per key. |
| `documents` | per vin | 5 | The factory window sticker for a VIN. Billed only when a label is found; an `unavailable` answer costs 0. |
| `documents` | per check | 0 | HEAD existence check for a VIN's window sticker. Free on every plan. |
| `documents` | per download | 0 | The window sticker PDF, through the signed 24-hour link a window-sticker read returns (GET or HEAD). No credential, free on every plan. |
| `feeds` | per request | 0 | An organization's feed runs: the contract list and the current run's manifest with signed links. Org key only. Free: the paper the data travels under already paid. |
| `feeds` | per download | 0 | A feed artifact, through the signed 24-hour link the latest read returns. No credential, free on every plan. |
| `history` | per vin | 3 | One kind of event for a VIN (the carriers it ran under, its crashes; inspections and more to follow), every item with its source. Billed only when there is an item; an empty answer costs 0. |
| `carriers` | per request | 5 | A carrier by DOT number (declared and observed), or one page of the units observed under it. |
| `carriers` | per search | 1 | Find a carrier by name, DOT number or VIN. |
| `agent` | per session | 0 | Open a session for the Cardog agent. Free on every plan: a turn is the charged unit, and tool reads inside a turn are never billed. |
| `agent` | per thread | 0 | Read the agent's thread history (the list, or one thread's messages). Free on every plan. |
| `agent` | per action | 0 | An organization agent session's coordination doors: read a thread's header or the directory, and reply, open, close or reopen a thread the person approved. Free on every plan. |
| `account` | per request | 0 | Your own plan, credits this cycle and usage by day, family and key. Free on every plan. |
| `changelog` | per request | 0 | What changed on the API, as data. Free on every plan. |

Rates are per unit, and most units are one request. The exceptions meter
per VIN. Batch decode charges one `vin` unit per VIN decoded, and a failed
row costs nothing. The recalls VIN check is priced per VIN checked.

## Plans

| Plan | Price | Credits / month | Past the allowance |
| --- | --- | --- | --- |
| Free | $0/mo | 50 | Pack credits, then 402 |
| Starter | $30/mo | 1,000 | Billed overage ($0.05/credit) |
| Pro | $100/mo | 5,000 | Billed overage ($0.04/credit) |
| Business | $500/mo | 25,000 | Billed overage ($0.03/credit) |
| Enterprise | Custom | Custom | Billed overage (contract rate) |

**Free is self-serve and needs no credit card** — 50 credits a month at $0, enough to evaluate every group before you talk to anyone.

Two rules to plan around:

- **Paid tiers are never blocked.** Past the allowance, requests keep
  working and the excess is billed as overage. A production integration
  does not stop because a month ran long.
- **The free tier stops when it runs out.** Past the allowance, requests
  draw on any credit packs you have bought. When the allowance and every
  pack are spent, metered requests return `402 insufficient_credits`
  until the month resets, you buy a pack, or you upgrade.

## Credit packs

A pack is a one-time purchase of prepaid credits, on any plan, including
free. Credits are spent in this order: the monthly allowance first, then
packs (oldest first), then overage on paid plans. A pack expires 12 months
after purchase and is never billed again. On the free plan, a pack is
pay-as-you-go: 50 free credits each month, then the pack, with no
subscription.

## The budget headers

Every metered response carries the current state of your budget:

- `X-Credits-Rate`
- `X-Credits-Remaining`
- `X-Credits-Allowance`
- `X-Credits-Reset`
- `X-Credits-Source`

`X-Credits-Rate` is what this response cost. It is 0 on non-2xx
responses, because errors are free. One exception: `304 Not Modified` on a
conditional request **is** debited at the route's rate. "Unchanged as of
now" is a served answer, priced the same as the `200` it stands in for.
A retry sent with an `Idempotency-Key` that ran again instead of replaying
shows the call's usual rate and is not debited a second time.
`X-Credits-Remaining` counts down against the allowance, and `-1` in
Allowance or Remaining means a custom plan that is not capped here.
`X-Credits-Reset` is when the month rolls over.

### A worked sequence

A fresh free-tier key has a 50-credit allowance. First, a VIN
decode at 2 credits:

```bash
curl -i "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" -H "x-api-key: $CARDOG_API_KEY" -H "Cardog-Version: 2026-10-26"
```

```http
X-Credits-Rate: 2
X-Credits-Allowance: 50
X-Credits-Remaining: 48
X-Credits-Reset: 2026-08-01T00:00:00.000Z
```

Then a listings search (1 credit) and a market quote
(5 credits):

```http
X-Credits-Rate: 1
X-Credits-Allowance: 50
X-Credits-Remaining: 47
X-Credits-Reset: 2026-08-01T00:00:00.000Z
```

```http
X-Credits-Rate: 5
X-Credits-Allowance: 50
X-Credits-Remaining: 42
X-Credits-Reset: 2026-08-01T00:00:00.000Z
```

Read the headers as you go and you can budget mid-task. "Spend at most 20
credits answering this" needs no extra call.

## The free-tier stop

Once the allowance and every pack are spent, the free tier answers `402` with the standard
[error envelope](https://cardog.app/docs/errors) and the budget headers, so the refusal also
tells you when the month resets:

```json
{
  "code": "insufficient_credits",
  "message": "Monthly credit allowance (50) exhausted. Resets 2026-08-01T00:00:00.000Z.",
  "hint": "Buy a credit pack (any tier — POST /account/credit-packs/checkout) or upgrade at https://cardog.app/pricing — paid tiers convert the stop into billed overage. Rates, allowances, and packs: GET /v2/pricing",
  "docs_url": "https://cardog.app/docs/errors/insufficient_credits.md"
}
```

One thing to plan for: your remaining balance is cached for up to a minute,
so a fast burst can cross the last credit before the stop catches it. Those
requests are charged. The stop then lands on the next request. In practice
the overshoot is one request, and never more than a minute's worth.

## Reading the card by machine

`GET https://api.cardog.app/v2/pricing` returns this entire card (rates, plans, header
names) as JSON, with no auth required. If you are an agent, or writing one,
read it at integration time and again before long tasks. Never hardcode a
rate. The card's `version` only increases, so you can detect change.

Both SDKs keep the budget headers of the last metered response parsed on the
client, errors included, so a task can budget without reading raw headers:

```typescript
await client.v2.vin.getByVin("2T3R1RFV7MW180266");
const { rate, remaining, allowance, reset, source } = client.lastCredits!;
```

```python
client.v2.vin.get_by_vin("2T3R1RFV7MW180266")
credits = client.last_credits  # rate, remaining, allowance, reset, source
```

`remaining` is allowance headroom plus pack balance, `-1` on a custom plan,
and `source` names the pool a debit came from (`allowance`, `pack` or
`overage`), null when nothing was debited. It is null until the first
metered response, and an unmetered response (the rate card, a signed link)
leaves the last set alone.

---

# Errors

Every non-2xx response from a `/v2/*` route has the same shape, the error
envelope. `code` is a value you can dispatch on, `hint` says what to do
next, and `suggestions` carries nearest-ref candidates so a mistyped ref
can be corrected in one step.

```json
{
  "code": "unknown_entity_refs",
  "message": "Unknown entity refs: make:teslla",
  "hint": "Resolve free text to refs at GET /v2/entities/resolve?q=teslla",
  "refs": ["make:teslla"],
  "suggestions": [
    {
      "invalid": "make:teslla",
      "nearest": [{ "ref": "make:tesla", "name": "Tesla" }],
      "resolve": "/v2/entities/resolve?domain=make&q=teslla"
    }
  ]
}
```

## Unknown refs are named, not guessed

A well-formed ref that the registry does not recognize always returns a 400
that names it. Suggestions are advisory and are never applied for you. You
will not get a fuzzy-matched result or an empty set for a bad ref.

## The envelope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | yes | Error code to branch on. Well-known codes: invalid_request, invalid_filters, invalid_ref, invalid_vin, invalid_nano_refs, version_sunset, unknown_entity_refs, unknown_entity_domain, unknown_spec_attributes, not_found, conflict, unauthorized, forbidden, rate_limited, insufficient_credits, internal_error, unavailable. New codes may be added; fall back to message and hint for codes you do not know. |
| `message` | string | yes | Readable description naming the offending input |
| `hint` | string | no | What to do next, e.g. "Resolve free text at GET /v2/entities/resolve" |
| `docs_url` | string | no | URL of a Markdown page explaining this error code and how to fix it |
| `details` | object[] | no | Field-level validation failures, one per failing path |
| `details[].path` | string | no | The failing field, e.g. "filters.makes.0" |
| `details[].message` | string | yes |  |
| `refs` | string[] | no | The offending refs or attribute ids, verbatim. Set for unknown_entity_refs, unknown_spec_attributes, and invalid_nano_refs. |
| `suggestions` | object[] | no | Nearest-ref candidates per offending input. Advisory only; the API does not apply them. |
| `suggestions[].invalid` | string | yes | The offending input, verbatim |
| `suggestions[].nearest` | object[] | yes | Best candidates, most likely first. Advisory only; the API does not apply them. |
| `suggestions[].nearest[].ref` | string | yes | A known entity ref, e.g. "make:tesla" |
| `suggestions[].nearest[].name` | string | no | Display name, e.g. "Tesla" |
| `suggestions[].resolve` | string | no | Server-relative URL of the resolve call that turns this input into refs, e.g. "/v2/entities/resolve?domain=make&q=teslla" |
| `links` | object | no | Related resources, each a server-relative path. invalid_vin carries {"feedback": "/v2/feedback"}: if you know what the vehicle is, report it there. |
| `requestId` | string | no | This request's id, the same value as the X-Request-Id response header and the id recorded on any credit debit for the request. Quote it when you report a failure or dispute a charge. Set on every error the API serves. |

The code set is **open**. New codes are added over time and are never a
breaking change. Dispatch on the codes you know and fall back on
`message` and `hint`.

## Error codes

| Code | Meaning |
| --- | --- |
| [`invalid_request`](https://cardog.app/docs/errors/invalid_request) | The request body or parameters did not match the operation's schema. |
| [`invalid_filters`](https://cardog.app/docs/errors/invalid_filters) | One or more filters used invalid ref syntax, scalar values, or ranges. |
| [`invalid_ref`](https://cardog.app/docs/errors/invalid_ref) | A path or query parameter did not match the `{domain}:{key}` ref grammar. |
| [`invalid_vin`](https://cardog.app/docs/errors/invalid_vin) | The supplied VIN failed the platform's length or character rules. |
| [`invalid_nano_refs`](https://cardog.app/docs/errors/invalid_nano_refs) | A nano filter did not match the VIN-derived nano key grammar. |
| [`version_sunset`](https://cardog.app/docs/errors/version_sunset) | The `Cardog-Version` header named a dated version that is past its support window. |
| [`unknown_entity_refs`](https://cardog.app/docs/errors/unknown_entity_refs) | The refs were well formed, but the entity registry did not recognize them. |
| [`unknown_entity_domain`](https://cardog.app/docs/errors/unknown_entity_domain) | The domain was well formed, but the entity registry does not serve it. |
| [`unknown_spec_attributes`](https://cardog.app/docs/errors/unknown_spec_attributes) | A `spec.*` filter named an attribute that is not in the current catalog. |
| [`not_found`](https://cardog.app/docs/errors/not_found) | The requested route or resource does not exist. |
| [`conflict`](https://cardog.app/docs/errors/conflict) | The record changed between the read your request was based on and the write. |
| [`unauthorized`](https://cardog.app/docs/errors/unauthorized) | The request did not carry a valid API key, session, or internal credential. |
| [`forbidden`](https://cardog.app/docs/errors/forbidden) | The credential is valid but does not grant access to the requested route group. |
| [`rate_limited`](https://cardog.app/docs/errors/rate_limited) | The credential exhausted the request limit described by the response. |
| [`insufficient_credits`](https://cardog.app/docs/errors/insufficient_credits) | A hard-stop plan has no allowance or prepaid pack balance left. |
| [`internal_error`](https://cardog.app/docs/errors/internal_error) | The server failed while processing a request that the caller cannot repair. |
| [`unavailable`](https://cardog.app/docs/errors/unavailable) | A required platform dependency was temporarily unavailable. |

Open a code for what happened, the next action, and a working corrected
request. Error envelopes link to the page's markdown twin so an agent can
fetch the recovery recipe without parsing HTML.

## HTTP statuses

| Status | When |
| --- | --- |
| 400 | Invalid request — grammar failure or unknown-but-well-formed refs, NAMED in `refs`/`details`, with nearest-ref `suggestions` where computable. Never a fuzzy fallback. |
| 401 | No valid credential (API key, session, or internal token) |
| 402 | Insufficient credits (free-tier hard stop; paid tiers bill overage instead) |
| 403 | The link is invalid or expired (`forbidden`); request `GET /v2/vin/{vin}/window-sticker` again for a fresh one |
| 404 | Resource not found |
| 409 | The record changed since it was read (`conflict`); read it again |
| 413 | The body is larger than the route accepts (`invalid_request`, with the limit in `hint`) |
| 429 | Per-minute rate limit exceeded |
| 500 | Internal error |
| 503 | Temporarily unavailable (`unavailable`); retry with backoff |

---

# Versioning

Your integration keeps answering the way it did when you built it. A
request names the contract version it expects, and the API returns that
version's shape, even after a newer version changes it.

The API serves 2 dated versions: `2026-10-21`, `2026-10-26`. The latest is `2026-10-26`.

## The header

A version is a date, `YYYY-MM-DD`. It travels in one request header and
nowhere else:

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

- **No header** returns the oldest version still served, so an integration
  that never sends the header is never broken by a new version. It moves
  forward only when that version reaches its sunset. Send the header to get
  a newer shape.
- **A served date** returns that date's shape.
- **Your key never selects a version.** Rotating a key never changes an
  answer, and two services on one key can each ask for their own version.

Every `/v2` response says what it served:

| header | means |
| --- | --- |
| `Cardog-Version` | the version this response was shaped to |
| `Cardog-Latest-Version` | the newest version the API serves |

When the two differ, a newer version exists. The [changelog](https://cardog.app/changelog)
says what changed and why.

## The SDKs pin for you

`@cardog/api` and the `cardog` Python package send `Cardog-Version`
on every `/v2` request. The value is `PINNED_API_VERSION`, the version the
SDK release was built against. Upgrading the SDK is how you move to a newer
version, and the response types match the version it pins.

```ts
import { CardogClient, PINNED_API_VERSION } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });
await client.v2.vin.getByVin("2T3R1RFV7MW180266");
client.lastVersion; // { requested, latest } from the response headers
```

To speak another version on purpose, while you migrate, set `apiVersion`
(`api_version=` in Python). The types then describe the pinned version
only, so validate what you read.

## How long a version is served

A version is served for **12 months after the next
version lands**. A response pinned to a version that has been superseded
says so in two more headers:

| header | means |
| --- | --- |
| `Deprecation` | when the newer version landed, as `@` and Unix seconds |
| `Sunset` | the first day this version is no longer served |

with a `Link` header pointing at the migration guide for the newer
version, `https://cardog.app/docs/migrations/<date>`.

## Errors

| status | code | when |
| --- | --- | --- |
| `400` | [`invalid_request`](https://cardog.app/docs/errors/invalid_request) | the header is not a date, or names a version the API does not serve. `hint` lists the served versions |
| `409` | [`version_sunset`](https://cardog.app/docs/errors/version_sunset) | the version is past its window. `hint` names a served version and links the migration guide |

A version request is checked before anything is metered, so neither error
costs credits.

## What counts as a new version

A new version is cut only for a change that would break a working
integration: a field removed, renamed or retyped, or a value that changes
meaning. Adding a field, an operation or an error code is not a new
version, so dispatch on the codes you know and ignore fields you do not
(see [Conventions](https://cardog.app/docs/conventions)).

## v1

v1 is not dated. It is deprecated as of 2026-10-09, stops
answering on 2027-12-31, and says so on every response in the
same `Deprecation`, `Sunset` and `Link` headers. See the
[v1 overview](https://cardog.app/docs/v1).

---

# Units


A bare number is ambiguous. `0.095` for a rollover probability could mean
9.5% or 0.095%, and nothing in the response would tell you which.

Every measure in the API therefore ships as a pair:

```jsonc
"possibility": { "value": 9.5, "unitCode": "P1" }
```

## The codes

Unit codes come from **UN/CEFACT Recommendation 20**, the same list
[schema.org](https://schema.org/unitCode) uses for `unitCode`. If you
already handle `unitCode` from structured data, these are the same codes.

| code | means | where you'll see it |
| --- | --- | --- |
| `P1` | percent | rollover possibility |
| `C62` | one (a pure ratio) | static stability factor |
| `KMT` | kilometre | odometer, distances |
| `SMI` | mile (statute) | odometer, US sources |
| `LTR` | litre | engine displacement, fuel capacity |
| `CMQ` | cubic centimetre | engine displacement |
| `LBR` | pound | weights |
| `INH` | inch | dimensions |

## Why a ratio carries a code

`C62` is Recommendation 20's code for a dimensionless quantity. The static
stability factor is track width divided by centre-of-gravity height, so it
has no unit, and `C62` says so explicitly.

That is different from a missing unit. `{ value: 1.48, unitCode: "C62" }`
renders as `1.48`. A measure with a `value` and no `unitCode` is a bug.
Please report it.

## How to read them

**Switch on the code. Do not infer the unit from the field name.** The same
field can arrive in different units from different sources. An odometer is
`KMT` from a Canadian record and `SMI` from a US one, and the field is
called `odometer` either way.

**Do not parse the code.** It is an identifier from a fixed list, not a
display symbol. Map it to whatever your interface shows.

**A measure always has both halves.** If `value` is present, `unitCode`
is present. Our emit gate rejects a measure with an empty unit, so you will
not see a half-populated one. A measure that does not apply is `null` as a
whole.


---

# Report a wrong or missing record


When a decode returns `valid: false` and you know what the vehicle is, or
returns a vehicle you can show is wrong, send it to `POST /v2/feedback`. You
get a receipt now and can check on it later. Reporting costs 0 credits on
every plan.

### File a report

```bash
curl -X POST "https://api.cardog.app/v2/feedback" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{
    "kind": "decode_miss",
    "subject": { "vin": "1HGCM82633A123456" },
    "claim": { "year": 2003, "make": "Honda", "model": "Accord" },
    "evidence": [{ "type": "url", "value": "https://example.com/window-sticker.pdf" }]
  }'
```

The response is `202`:

```json
{
  "id": "fb_01J8Z3K5V6W7X8Y9Z0A1B2C3D4",
  "kind": "decode_miss",
  "subject": { "vin": "1HGCM82633A123456" },
  "status": "received",
  "received_at": "2026-09-12T14:03:11.000Z",
  "resolution": null,
  "links": {
    "self": "/v2/feedback/fb_01J8Z3K5V6W7X8Y9Z0A1B2C3D4",
    "subject": "/v2/vin/1HGCM82633A123456"
  }
}
```

Keep the `id`. Sending the same report again within 24 hours returns this
same receipt with `200` and stores nothing new, so a retry is safe.

### Kinds

| kind | subject | also required |
| --- | --- | --- |
| `decode_miss` | `vin` | |
| `decode_dispute` | `vin` | |
| `recall_dispute` | `vin`, or a `recall:` ref | |
| `spec_dispute` | any | `claim.field` |
| `listing_report` | any | |
| `resolve_miss` | any | `note`: the text that did not resolve |
| `other` | any | |

`subject` takes exactly one of `vin`, `ref` or `listing_id`. `claim`
holds what you believe is true: `year`, `make`, `model`, `trim`, or a
`field` with `expected` and `observed`. `evidence` takes up to 5 links
or quoted excerpts, `note` up to 2,000 characters, and `request_id` names
the response you are disputing when there is one. The whole body is capped at
8 KB.

Today only `decode_miss` and `decode_dispute` are acted on. Every other
kind is stored, and its `resolution.outcome` reads `queued` until it is
routed.

### Check on it

```bash
curl "https://api.cardog.app/v2/feedback/fb_01J8Z3K5V6W7X8Y9Z0A1B2C3D4" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Only the key that filed a report can read it. Any other id returns `404`.

| status | meaning |
| --- | --- |
| `received` | Stored, not yet looked at. |
| `triaged` | Someone has looked at it. |
| `accepted` or `rejected` | The verdict, with `resolution.note` when there is one. |
| `shipped` | The fix is live. `resolution.fixed_in` names the version. |

### What a report does not do

A report never changes a record by itself. It is evidence we check, and a
decode changes only when a fix ships for every VIN it applies to.

### Limits

Each key can file 60 reports a minute and 1,000 a day. Past either you get
`429 rate_limited` with a `Retry-After` header. Every `invalid_vin` error
and every `valid: false` decode carries `links.feedback`, so an agent can
find this endpoint from the response it is already holding.


---

# Decode a VIN

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

One VIN in, one identity card out: display names to render, entity refs to
store, the two VIN grains, and links to this vehicle's market instrument,
recalls, and live listings. Two credits per VIN, batch or single.

This is a separate product from the free American decoder because of
coverage. NHTSA's vPIC is built from US regulatory submissions, so a
Canadian-market vehicle often decodes to a make and a model and then stops:
no trim, sometimes no engine, sometimes nothing at all for a model line that
never went on sale in the United States. We decode 99.77% of Canadian VINs
to trim level. Every fact comes back keyed to a ref, so the decode output joins
directly against specs, listings, market quotes, and recalls without a
name-matching step.

The response:

```json
{
  "vin": "2T3R1RFV7MW180266",
  "valid": true,
  "year": 2021,
  "make": "Toyota",
  "model": "RAV4",
  "trim": "XLE HV",
  "refs": {
    "make": "make:toyota",
    "model": "model:toyota/rav4",
    "modelYear": "model-year:toyota/rav4/2021",
    "bodyStyle": "body-style:sport-utility-vehicle-suv-multi-purpose-vehicle-mpv",
    "fuelType": "fuel-type:gasoline",
    "driveType": "drive-type:4wd-4-wheel-drive-4x4",
    "transmission": null,
    "electrificationLevel": null,
    "vehicleType": null,
    "country": null
  },
  "nano": "nano:2T3R1RFVMW",
  "squish": "squish:2T3R1RFVM",
  "links": {
    "instrument": "/v2/vin/2T3R1RFV7MW180266/instrument",
    "recalls": "/v2/vin/2T3R1RFV7MW180266/recalls",
    "listings": "/v2/vin/2T3R1RFV7MW180266/listings"
  }
}
```

> **Store the refs.** The display names are for your UI. The refs are for
> your database. Write `make:toyota` into the column, not "Toyota". Every
> other endpoint takes the ref, and it will still mean Toyota in five years.
> `null` in any ref field means the fact is not derivable for this VIN.

## What comes back

![Exploded line drawing of a generic SUV: the body lifted above the engine, the transmission and the chassis with its axles and wheels.](https://cardog.app/images/docs/decode-exploded.png)

- **`valid`** is the decoder's verdict. `false` means no identity: every
  field below it is null and every ref is null. The API never fills an
  unresolved VIN from adjacent data.
- **`year`, `make`, `model`, `trim`** are display names. Render
  these and join on the refs. `trim` is the catalogue trim this VIN's own
  pattern resolves to. A seller's listing text ships separately in
  `observedTrim`, tagged and dated.
- **`refs`** are the join keys, one per domain. Every other endpoint takes
  them. They follow the [ref grammar](https://cardog.app/docs/ref-grammar).
- **`nano` and `squish`** are the two VIN grains, covered below.
- **`links`** are server-relative paths to this VIN's related resources.
  Follow them instead of building URLs by hand.


The capture above is trimmed. The live card also carries provenance
(`authorityTier` for the identity facts, `trimAuthorityTier` on the
trim), and `links` grows as the decode resolves: per-ref entity links,
plus `specs`, `quote`, and `safety` once the model year is known. The
full spec sheet is one link away at `links.specs`. On the MCP surface, the
`identify_vehicle` tool summarizes it into a `specHighlights` block. The
complete response shape is in the [VIN reference](https://cardog.app/docs/reference/vin).

## `null` means not derivable

A null in any identity field is a statement about the VIN, not a gap in our
lookup. It means this VIN's pattern does not derive that fact. It is not a
withheld fuzzy match, and it will not turn into a guess on retry. The refs
also cohere as a set: a model ref only ships under the make ref beside it,
and a pairing that cannot hold together goes null rather than travel as a
plausible-looking join key. That is what makes a decode safe in a pipeline.
Every non-null ref can be written straight into a column with no validation
pass.

## Batch

Same contract, up to 1,000 VINs per call:

```bash
curl -X POST "https://api.cardog.app/v2/vin/batch" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"vins":["2T3R1RFV7MW180266","1HGCM82633A123456"]}'
```

The batch is accepted as a whole and each item resolves on its own. One
malformed VIN fails its own row with the standard error envelope and never
the batch. Results come back in request order, with a `meta` block
counting `requested`, `decoded`, and `failed`. Metered per VIN: N VINs
is N decode units.

The TypeScript SDK is the same surface, typed:

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });
const identity = await client.v2.vin.getByVin("2T3R1RFV7MW180266");

// Store the refs, render the names.
await db.vehicles.update(id, {
  makeRef: identity.refs.make,          // "make:toyota"
  modelYearRef: identity.refs.modelYear, // "model-year:toyota/rav4/2021"
  squish: identity.squish,               // "squish:2T3R1RFVM"
});
```

## Why Canadian VINs are hard

vPIC is the decoder everyone starts with, and inside its boundary it is
good: free, public, and correct for US-market vehicles, because it is built
from the submissions US regulation requires. The boundary is the border. A
trim configuration sold only in Canada has no US submission behind it, so
the pattern is absent and the decode returns a make, usually a model, and
stops. A model line that never went on sale in the United States can return
nothing at all.

We treat VIN patterns as a registry to maintain, Canadian-market patterns
included. Decode coverage is 99.77% of Canadian VINs at trim level.

VIN structure is the same on both sides of the border. For WMI, check
digits, and year codes, the arithmetic half of decoding, see
[VIN structure](https://cardog.app/docs/vin).

## The grains: `squish` and `nano`

Two keys in the identity card are pure projections of the VIN itself:

- **`squish`** is WMI + VDS + year, with the plant left out. It is the
  market grain: two VINs with the same squish are the same configuration,
  which is why a squish is a valid instrument for
  [market quotes](https://cardog.app/docs/market-data).
- **`nano`** is the squish plus the plant code (VIN positions 1–8, 10 and
  11), plus positions 12–14 when position 3 is `9`, because for a
  small-volume manufacturer those complete the manufacturer identifier. It is
  the build grain, and the dedup and comparables key.

Because both are projections, you can derive them offline from any VIN with
[`@cardog/entities`](https://www.npmjs.com/package/@cardog/entities), with
no API calls and no network:

```typescript
import { squishFromVin, nanoFromVin } from "@cardog/entities";

const vin = "2T3R1RFV7MW180266";

squishFromVin(vin); // "2T3R1RFVM"  : the market grain (WMI + VDS + year)
nanoFromVin(vin);   // "2T3R1RFV*MW": the build grain (+ plant, check digit masked)
```

The key you compute offline is the key the API returns. The identity card
ships it in ref form (`squish:2T3R1RFVM`, `nano:2T3R1RFVMW`: the ref
leaves out the masked check digit), from the same grammar. You can
index a table on the squish grain before you ever call us.

## From identity to everything else

The identity card is the entry point to the rest of the graph. Every card
carries a `links` block that maps a relation name to a server-relative
path, so related resources are one request away:

- `instrument`: the market instrument this VIN trades as, and from it the
  live quote
- `recalls`: Transport Canada and NHTSA campaigns for this VIN. See
  [Recalls by VIN](https://cardog.app/docs/recalls).
- `listings`: live listings of this vehicle

Follow the links instead of building URLs by hand.

## Errors

Every non-2xx response is one envelope. A malformed VIN:

```json
{
  "code": "invalid_vin",
  "message": "Not a valid VIN: 2T3R1RFV7MW18026",
  "hint": "A VIN is 17 characters, A–Z (no I/O/Q) and 0–9. If the vehicle is real and we have it wrong, report it at POST /v2/feedback",
  "docs_url": "https://cardog.app/docs/errors/invalid_vin.md",
  "links": { "feedback": "/v2/feedback" }
}
```

`code` is a value you can dispatch on, `hint` says what to do next, and
`docs_url` is fetchable markdown with the full correction recipe, so there
is no HTML to parse. `links.feedback` is where to
[report a VIN we have wrong](https://cardog.app/docs/feedback), which costs nothing. In a batch, the same envelope appears on the failing
row's `error` field while the rest of the batch decodes. The complete code
list is in [Errors](https://cardog.app/docs/errors).

---
- **Everything in one fetch:** https://cardog.app/docs.md
- **The contract:** https://api.cardog.app/v2/openapi.json
- **Get a key:** https://cardog.app/login?next=/account/api
- **MCP:** `claude mcp add --transport http cardog "https://mcp.cardog.io/mcp?api_key=$CARDOG_API_KEY"`

---

# VIN structure

![Close-up line drawing of a riveted VIN plate on the dashboard, seen through the lower corner of the windshield; its seventeen characters are blank cells.](https://cardog.app/images/docs/vin-plate.png)

A Vehicle Identification Number is 17 characters that identify one vehicle,
for its whole life. ISO 3779 sets its content and structure and ISO 3780 how
manufacturer codes are assigned. In North America, 49 CFR Part 565 fixes what
each position means, and Canada's CMVSS 115 follows the same layout, so a VIN
on a Canadian vehicle reads exactly like the one below.


## The 17 positions

`2T3R1RFV7MW180266` is a 2021 RAV4 built in Canada. Read left to right, it narrows from
the manufacturer to the model to the one vehicle.


| Positions | Section | In `2T3R1RFV7MW180266` |
| --- | --- | --- |
| 1–3 | World Manufacturer Identifier (WMI): region and manufacturer | `2T3` |
| 4–8 | Vehicle Descriptor Section (VDS): model, body, restraints, engine, in the manufacturer's code | `R1RFV` |
| 9 | Check digit, computed from the other sixteen | `7` |
| 10 | Model year | `M` (2021) |
| 11 | Assembly plant | `W` |
| 12–17 | Serial: the production sequence number | `180266` |

Positions 10 to 17 together are the Vehicle Identifier Section (VIS).


> The letters I, O and Q never appear in a VIN, in any position, so they can
> never be misread as 1 and 0. A "VIN" containing one is a typo or not a VIN.

## The manufacturer: positions 1 to 3

The WMI is assigned to a manufacturer under ISO 3780; in the United States
SAE International makes the assignments under contract to NHTSA. The three
characters together identify the manufacturer and the type of vehicle, and
the first is a region block. First characters you will see most often in North America:

| First character | Assigned to |
| --- | --- |
| 1, 4, 5 | United States |
| 2 | Canada |
| 3 | Mexico (most of the block) |
| J | Japan |
| K | South Korea |
| L | China |
| S | United Kingdom (SA to SM) |
| V | France (VF to VR) |
| W | Germany |

The region is where the WMI was assigned, which usually means where the
vehicle was built, not where the brand is from: a Japanese brand's car built
in Ontario starts with 2.

### Small manufacturers: the extended WMI

A manufacturer building fewer than 1,000 vehicles of a type a year (a
low-volume manufacturer in 49 CFR 565) does not get a three-character WMI of
its own. It gets a six-character identifier: a WMI whose third character is
`9`, finished by positions 12 to 14. A `9` in position 3 always means this
form. The serial is then only positions 15 to 17. Trailer, RV and specialty builders are
the usual carriers of this form.


`2A9TR1DA1PA123045` (constructed to pass its check digit; no real vehicle): positions
1–3 `2A9` and 12–14 `123` together identify the
manufacturer; 4–8 `TR1DA` are its VDS, 9 `1` the check digit,
10 `P` the model year (2023), 11 `A` the plant, 15–17
`045` the serial.


A decoder that reads only positions 1 to 3 merges every small manufacturer
that shares a `9` WMI into one. Cardog's identity for these VINs carries the
extra three characters, covered [below](#how-cardog-keys-on-a-vin).

## The vehicle: positions 4 to 8

The VDS is the manufacturer's own code. Position 4 is often the line or
platform, 5 the restraint system, 6 and 7 the body and series, 8 the engine,
but that is a convention, not a rule: each manufacturer defines its own key
and, in the United States, files it with NHTSA at least 60 days before the
first VIN goes on a vehicle. There is no shared table, which is why a decode
is a lookup against a pattern set rather than arithmetic. On current cars,
MPVs and light trucks, position 7 must be a letter (the model-year section
below says why).

## The check digit: position 9

The check digit catches a mistyped or invented VIN. Each character is turned
into a number, multiplied by its position's weight, and the products summed;
the remainder after dividing by 11 is the digit, written `X` when it is 10.
Position 9 weighs 0, so the digit never checks itself. Paste any VIN to see
its arithmetic.



1. **Transliterate letters** to numbers; digits keep their value:

   ```text
   A=1 B=2 C=3 D=4 E=5 F=6 G=7 H=8 J=1
   K=2 L=3 M=4 N=5 P=7 R=9 S=2 T=3 U=4
   V=5 W=6 X=7 Y=8 Z=9
   ```

2. **Multiply by the weight** of each position:

   ```text
   Position: 1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17
   Weight:   8  7  6  5  4  3  2  10 0  9  8  7  6  5  4  3  2
   ```

3. **Sum and divide by 11.** For `2T3R1RFV7MW180266` the products sum to 370; 370 ÷ 11 is
   33 remainder 7, and position 9 reads 7, so the VIN passes.



Cardog records whether a VIN's digit passes but never refuses a decode on it:
not every market enforces the digit, and a failing digit is a fact about the
VIN worth keeping, not a reason to drop it.

## The model year: position 10

Thirty codes cover thirty model years, then repeat. The letters skip I, O and
Q (never used anywhere), U and Z, and the digit 0.


```text
Code Years       Code Years       Code Years
A    1980 2010   L    1990 2020   Y    2000 2030
B    1981 2011   M    1991 2021   1    2001 2031
C    1982 2012   N    1992 2022   2    2002 2032
D    1983 2013   P    1993 2023   3    2003 2033
E    1984 2014   R    1994 2024   4    2004 2034
F    1985 2015   S    1995 2025   5    2005 2035
G    1986 2016   T    1996 2026   6    2006 2036
H    1987 2017   V    1997 2027   7    2007 2037
J    1988 2018   W    1998 2028   8    2008 2038
K    1989 2019   X    1999 2029   9    2009 2039
```


For cars, MPVs and trucks up to 4,536 kg (10,000 lb) GVWR, position 7
settles the cycle under 49 CFR 565: a digit there means 1980 to 2009, a
letter means 2010 to 2039. In `2T3R1RFV7MW180266` position 7 is `F`, so `M` is
2021. It is the manufacturer's model year, which need not match the calendar
year the vehicle was built in.

## Where the VIN lives on a vehicle

![Line drawing of a sedan with the driver's door open: a plate on the dashboard at the lower driver-side corner of the windshield, and a label on the B-pillar.](https://cardog.app/images/docs/vin-locations.png)

- **The dashboard**, at the lower driver-side corner of the windshield. On
  cars, MPVs and light trucks, 49 CFR 565 requires the VIN inside the cabin
  and readable through the glass by someone standing outside next to the
  driver-side windshield pillar.
- **The driver's door jamb or B-pillar**, on the compliance label, which on
  most vehicles repeats the VIN beside the build date and weight ratings.
- **Stampings** on the frame, the engine or body panels, on many vehicles.
- **The diagnostic port**: most cars from the mid-2000s on report their VIN
  over OBD-II.
- **Paper**: the registration, the insurance slip and the bill of sale.

When two of these disagree, the vehicle has a story worth reading before
anyone buys it.

## How Cardog keys on a VIN

Two grains sit between one VIN and a whole model year, and both are cut from
the VIN alone, offline, with no decode:


```text
VIN     2T3R1RFV7MW180266
squish  2T3R1RFVM          positions 1–8 + 10           squish:2T3R1RFVM
nano    2T3R1RFV*MW        positions 1–8, *, 10, 11     nano:2T3R1RFVMW
nano    2A9TR1DA*PA123     extended WMI: + 12–14        nano:2A9TR1DAPA123
```


- **`squish`** is positions 1 to 8 plus 10: manufacturer, descriptor and
  model year, with the plant left out. Every VIN sharing a squish is the same
  configuration of the same model year, which makes it the market grain:
  [quotes](https://cardog.app/docs/market-data) take it as an instrument.
- **`nano`** is positions 1 to 8, a `*` for the check digit, then 10 and 11:
  the squish plus the plant, the build grain. For an extended-WMI VIN it adds
  positions 12 to 14, because there they are part of the manufacturer; for
  everyone else they are serial and are left out.
- **The ref form drops the `*`**: the key `2T3R1RFV*MW` is
  the ref `nano:2T3R1RFVMW`, and parsing puts it back.

```typescript
import { squishFromVin, nanoFromVin, checkDigitOk } from "@cardog/entities";

squishFromVin("2T3R1RFV7MW180266"); // "2T3R1RFVM"
nanoFromVin("2T3R1RFV7MW180266");   // "2T3R1RFV*MW"
nanoFromVin("2A9TR1DA1PA123045");   // "2A9TR1DA*PA123"
checkDigitOk("2T3R1RFV7MW180266");  // true
```

The [vehicle graph](https://cardog.app/docs/vehicle-graph) covers which endpoints take which
grain, and the [ref grammar](https://cardog.app/docs/ref-grammar) the full set of ref forms.

## Decoding a VIN with the API

The structure tells you where the manufacturer, model year and plant are; it
does not tell you the trim, engine or body, because those live in each
manufacturer's VDS key. A decode does:

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

[Decode a VIN](https://cardog.app/docs/decode-canadian-vin) walks through the response,
and the [VIN reference](https://cardog.app/docs/reference/vin) has the full shape, batch
decoding and the links from a VIN to its recalls, listings and market
instrument.

Moving from another decoder? The [migration guides](https://cardog.app/resources/migration)
map NHTSA vPIC, CarsXE, VinAudit and Auto.dev fields to Cardog's, one by
one, and [What a VIN tells you](https://cardog.app/resources/learn/what-a-vin-tells-you) and
[Squish and nano build codes](https://cardog.app/resources/learn/squish-and-nano-build-codes)
go further into the keys.

## Standards

| Standard | What it sets |
| --- | --- |
| ISO 3779 | VIN content and structure |
| ISO 3780 | The World Manufacturer Identifier and its assignment |
| 49 CFR Part 565 | VIN requirements in the United States: the meaning of each position, the check digit, the model-year code, placement |
| CMVSS 115 | VIN requirements in Canada |

---

# Chinese VINs

```bash
curl "https://api.cardog.app/v2/vin/LGXCE4CB1R2065480" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "vin": "LGXCE4CB1R2065480",
  "valid": true,
  "year": 2024,
  "make": "BYD",
  "model": "Yuan Plus",
  "refs": {
    "make": "make:byd",
    "model": "model:byd/yuan-plus",
    "modelYear": "model-year:byd/yuan-plus/2024",
    "bodyStyle": "body-style:sport-utility-vehicle-suv-multi-purpose-vehicle-mpv",
    "fuelType": "fuel-type:electric",
    "electrificationLevel": "electrification-level:bev-battery-electric-vehicle"
  },
  "nano": "nano:LGXCE4CBR2",
  "squish": "squish:LGXCE4CBR",
  "specHighlights": {
    "seatingCapacity": { "value": 5, "unit": "COUNT" },
    "driveType": { "value": "drive-type:fwd-front-wheel-drive" },
    "fuelTypePrimary": { "value": "fuel-type:electric" }
  },
  "links": {
    "specs": "/v2/specs/model-year%3Abyd%2Fyuan-plus%2F2024",
    "recalls": "/v2/vin/LGXCE4CB1R2065480/recalls",
    "quote": "/v2/quotes/model-year%3Abyd%2Fyuan-plus%2F2024"
  }
}
```

Chinese-built vehicles decode through the same endpoint as every other VIN,
with the same identity card, the same refs, and the same price per call.
A decode names the model, the model year and the powertrain, and links
straight to specs, recalls and market quotes. For the full response shape
and batch decoding, see [Decode a VIN](https://cardog.app/docs/decode-canadian-vin).

## Sample VINs

Real vehicles. Paste any of them into the call above. Battery-electric,
plug-in hybrid, and export gasoline models all decode.

| VIN | Vehicle | Powertrain |
| --- | --- | --- |
| `LGXCH6CB2R2033401` | 2024 BYD Seal | BEV |
| `LGXCH4CD0R2033421` | 2024 BYD Sea Lion 07 | BEV |
| `LC0CE4CB0P0384865` | 2023 BYD Dolphin | BEV |
| `LGXCE4CB1R2065480` | 2024 BYD Yuan Plus | BEV |
| `LGXCF4CD0S0198358` | 2025 BYD Tang L | BEV |
| `L6TDC2028SP901912` | 2025 Zeekr 001 | BEV |
| `L1NNSGHA7TB248173` | 2026 XPeng G6 | BEV |
| `LS6C3E2S4SF028425` | 2025 Deepal S07 | PHEV |
| `LNNBBDAT3SDH43288` | 2025 Chery Tiggo 7 | PHEV |
| `LVTDB11B0SDD72694` | 2025 Jetour X50 | Gasoline |
| `LGWEE4A51RL613983` | 2024 Haval Jolion Pro | Gasoline |
| `LFB1FV691N2L12125` | 2022 Hongqi E-HS9 | BEV |
| `LSKG48L10PD043188` | 2023 LDV MIFA 9 | BEV |
| `LK6ADAE11NB401495` | 2022 Wuling Hongguang MINIEV | BEV |

## Model, year and plant

A Chinese WMI does not name a model, and neither does the vehicle
descriptor on its own: the same descriptor can carry a different car at a
different plant. Every rule we ship is pinned to three parts of the VIN
together:

```text
LC0CE4CB0P0384865
   │││││ ││
   │││││ │└─ Plant (11): 0
   │││││ └── Model year (10): P = 2023
   └┴┴┴┴──── Descriptor (4-8): CE4CB
```

In 2025, `LC0CE4CB` at plant `4` is a BYD Yuan Up and at plant `6` a
Yuan Plus: same descriptor, same year, different car. Reading all three is
what makes the decode name the right one. The combination is also the
`nano` grain in the response, so you can group Chinese VINs the same way
offline with [`@cardog/entities`](https://www.npmjs.com/package/@cardog/entities).

## Send us a VIN

Holding Chinese VINs we should see? Send them to
[`POST /v2/feedback`](https://cardog.app/docs/feedback). It costs nothing.

For what the 17 characters mean in general, see [VIN structure](https://cardog.app/docs/vin).

---
- **Everything in one fetch:** https://cardog.app/docs.md
- **The contract:** https://api.cardog.app/v2/openapi.json
- **Get a key:** https://cardog.app/login?next=/account/api

---

# Window stickers by VIN


```bash
curl "https://api.cardog.app/v2/vin/1GCUYDED1MZ123456/window-sticker" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The window sticker is the label on the glass of a new vehicle: trim, every factory option with its price, the destination charge, fuel economy, where it was assembled. It is the manufacturer's own statement of what it built. Nobody is required to keep one after the sale, and labels exist by VIN for some manufacturers only.

`GET /v2/vin/{vin}/window-sticker` tells you whether we hold that label, and if not, why. Both answers are a `200`. Only the first costs credits.

## When we hold the label

```json
{
  "vin": "1GCUYDED1MZ123456",
  "label": {
    "issuer": "gm",
    "retrievedAt": "2026-09-14T12:00:00.000Z",
    "vinVerified": true,
    "document": {
      "sha256": "3f1a…",
      "mediaType": "application/pdf",
      "downloadUrl": "https://api.cardog.app/v2/window-sticker/3f1a…?exp=1790000000&sig=…"
    }
  },
  "unavailable": null,
  "links": { "identity": "/v2/vin/1GCUYDED1MZ123456" }
}
```

- `issuer` is the manufacturer that issued the label. It is `null` in the rare case where we hold the file without a recorded issuer.
- `retrievedAt` is when we added it.
- `vinVerified` is `true` only when the VIN was read from inside the document. Some manufacturers render the VIN as an image or in an embedded font, so it cannot always be read. `false` means the label is filed under this VIN, and nothing stronger. Treat an unverified label as the manufacturer's answer, not as proof it belongs to this vehicle.
- `document` names the file by its SHA-256. The same file always has the same address, so you can cite it. `downloadUrl` is a signed link to the PDF, good for 24 hours.

A held label costs **5 credits**.

## The PDF

```bash
curl "$DOWNLOAD_URL" -o sticker.pdf
```

`downloadUrl` is a signed link: `GET /v2/window-sticker/{sha256}?exp=…&sig=…`. Open it exactly as printed. It needs no API key and no session, so you can open it in a browser tab, put it in an `<iframe>`, or hand it to a PDF viewer. It costs **0 credits**, `GET` or `HEAD`. The body is the label as the manufacturer issued it, served as `application/pdf` and inline, so a browser displays it rather than downloading it. A viewer that fetches pages on demand can send `Range: bytes=N-M` and get a `206`.

The link is good for 24 hours. After that it answers `403 forbidden`, and so does a link that has been altered. The fix is the same in both cases: request the read again and use the new `downloadUrl`. That read is billed again when the label is held. Do not store the link; keep the VIN. `sha256` names the file forever; the link is only a door that is open today.

A signed link to a hash we hold nothing under is a `404` with the usual error envelope, never an empty file. If the file cannot be fetched right now the answer is `503 unavailable`; retry with backoff.

## When we do not

```json
{
  "vin": "1FTFW1E84PKE12345",
  "label": null,
  "unavailable": {
    "reason": "not_yet_harvested",
    "issuer": "ford",
    "detail": "We have not collected this label yet."
  },
  "links": { "identity": "/v2/vin/1FTFW1E84PKE12345" }
}
```

This costs **0 credits**. `detail` is a sentence you can show a user. `reason` is what your code should read, because each one asks something different of you:

| `reason` | What it means | What to do |
| --- | --- | --- |
| `not_yet_harvested` | We do not hold this label yet. | Retry later. Poll with `HEAD` (below), which is free. |
| `issuer_has_no_record` | The manufacturer has no label for this VIN. | Treat as the manufacturer's answer. Do not retry soon. |
| `lane_us_only` | Coverage for this manufacturer is US-sold vehicles only, and there is no label for this VIN. | Do not retry. |
| `pre_lane_model_year` | The vehicle predates our coverage for its manufacturer. | Do not retry. |
| `no_lane` | We do not cover window stickers for this manufacturer. | Do not retry. |

Only `not_yet_harvested` can change. The other four are final.

## The free existence check

`HEAD` on the same path answers with a status code and no body: `204` when we hold a label, `404` when we do not. It costs nothing on every plan, so it is the right way to poll after a `not_yet_harvested` answer, or to decide whether the `GET` is worth its credits.

```bash
curl -I "https://api.cardog.app/v2/vin/1FTFW1E84PKE12345/window-sticker" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

## Which manufacturers

Ford, Lincoln, GM, Stellantis (Chrysler, Dodge, Jeep, Ram, Fiat, Alfa Romeo), Hyundai, Genesis, Kia, Toyota, Lexus, Nissan and Mitsubishi. Coverage by market and model year varies by manufacturer; `reason` tells you when a VIN falls outside it.

## In the SDKs

```ts
import { writeFile } from "node:fs/promises";

const r = await client.v2.vin.windowSticker("1GCUYDED1MZ123456");
if (r.label) {
  console.log(r.label.vinVerified, r.label.document.sha256);
  const pdf = await client.v2.vin.windowStickerDocument(r.label.document.downloadUrl);
  await writeFile("sticker.pdf", Buffer.from(await pdf.arrayBuffer())); // a fetch Response
} else if (r.unavailable.reason === "not_yet_harvested") {
  // poll with HEAD later
}
```

```python
r = client.v2.vin.window_sticker("1GCUYDED1MZ123456")
if r.label:
    print(r.label.vin_verified, r.label.document.sha256)
    pdf = client.v2.vin.window_sticker_document(r.label.document.download_url)  # bytes
    open("sticker.pdf", "wb").write(pdf)
elif r.unavailable.reason == "not_yet_harvested":
    pass  # poll with HEAD later
```

## Not yet

The label's printed contents (options and their prices, MSRP, fuel economy, assembly point) are not served yet; they arrive as typed rows on a later release, additive to this response.


---

# Japanese chassis numbers


```bash
curl "https://api.cardog.app/v2/chassis/ZRR80-0143041" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

A vehicle built for the Japanese home market has no VIN. It carries a chassis number (車台番号): a model code, a hyphen and a serial, such as `ZRR80-0143041`. The code names the maker and a family of models; the serial is a production counter. There is no year in it and no check digit, so a chassis number cannot be decoded the way a VIN can. It can only be looked up.

`GET /v2/chassis/{chassis}` looks the number up by model code: the maker and models behind the code, the type approvals issued for it, the recall campaigns whose serial ranges hold the unit with the dates those units were built, and the engines the type was sold with.

Send the number with the hyphen. A hyphen-less number is accepted when exactly one known model code and serial length fits it; otherwise the read is a `400` asking for the hyphen. A 17-character VIN is a `400` pointing at [`GET /v2/vin/{vin}`](https://cardog.app/docs/reference/vin).

## What the read answers

```json
{
  "chassis": "ZRR80-0143041",
  "code": "ZRR80",
  "serial": "0143041",
  "status": "read",
  "candidates": [
    {
      "makerJa": "トヨタ",
      "makeRef": "make:toyota",
      "code": "ZRR80",
      "modelsJa": ["エスクァイア", "ノア", "ヴォクシー"],
      "modelsEn": ["Esquire", "Noah", "Voxy"],
      "typeApprovals": ["DBA-ZRR80G", "DBA-ZRR80W"],
      "emissions": [{ "code": "DBA", "regulationYear": 2005, "fuel": "petrol-lpg", "hybrid": false }],
      "notices": [
        {
          "notification": "1141851",
          "notifiedAt": "2018-01-31",
          "campaign": "recall",
          "typeApproval": "DBA-ZRR80G",
          "serialFrom": "0130226",
          "serialTo": "0171289",
          "productionStart": "2015-05-20",
          "productionEnd": "2016-01-07"
        }
      ],
      "built": { "start": "2015-05-20", "end": "2016-01-07", "consistent": true, "before": "2018-01-31" },
      "buildBound": null,
      "engines": [{ "engineCode": "3ZR", "displacementCc": 1986, "fuel": "petrol", "hybrid": false }]
    }
  ],
  "links": { "make": "/v2/entities/make:toyota" }
}
```

One candidate is one maker. Inside it:

- `modelsJa` and `modelsEn` are every model sold under the code. A code is a family, so the read says Noah, Voxy and Esquire, not which of the three this unit is. `modelsEn` names the ones with an English name and is not lined up with `modelsJa`; `modelRefs` carries the registry refs for the models that have an entry.
- `typeApprovals` are every type approval (型式) issued for the code. The prefix names the emissions rule the type was approved under, decoded in `emissions`: the rule, its year, the fuel heading and whether it is a hybrid rule.
- `notices` are the recall campaigns whose serial range holds this unit. A unit inside a range is in the notice's scope. Whether the fix was done is not on the record. A notice filed under two type approvals or two model names appears once per range, so group by `notification` to count recalls.
- `built` is the build window the campaigns holding the serial agree on. When no campaign holds it, `buildBound` is what the neighbouring known ranges allow, since serials are issued in order: an outer bound, often years wide. Both are null when the code has too few known ranges to say anything.
- `engines` are the engines the maker sold under the code, with the years they were offered. Several engines means the code alone does not say which this unit has; the type approval on the plate narrows it.

The read costs 2 credits.

## The four statuses

`status` is the one field to branch on. Each value is a different next move.

| status | what it means | next move |
| --- | --- | --- |
| `read` | One maker uses this code and the serial fits. `candidates` has one entry. | Use it. |
| `ambiguous` | Two makers use the code (Honda and Subaru share `GK3`) and the serial length does not settle it. `candidates` lists each. | Show both makers and let a person pick, or check the plate's maker. |
| `serial_unfit` | The code is known but no maker uses it at this serial length. `candidates` lists the makers and the `serialLengths` they use. | The serial is probably mistyped. Ask for it again. |
| `code_unknown` | We hold no record of this model code. `candidates` is empty. | The number may still be fine: the code is not in our data yet. Costs 0 credits. |

## Reading the number off a photo

```bash
curl -X POST "https://api.cardog.app/v2/chassis/image" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"image": "<base64 photo>"}'
```

The number is on the caution plate, a riveted plate under the hood or in the door jamb, and stamped into the frame. `POST /v2/chassis/image` takes a photo of either as base64 (JPEG, PNG or WebP, 10 MB at most) and answers the number read off it.

```json
{
  "read": {
    "chassis": "ZRR80-0143041",
    "typeApproval": "DBA-ZRR80G",
    "confidence": "high",
    "readings": [{ "chassis": "ZRR80-0143041", "code": "ZRR80", "serial": "0143041" }]
  },
  "refusal": null,
  "links": { "chassis": "/v2/chassis/ZRR80-0143041" }
}
```

`links.chassis` is the read above, ready to open. `typeApproval` is the 型式 printed on the plate, which settles the model when the chassis read lists several. When `confidence` is `low`, a character was in doubt: `readings` lists the possible numbers, most likely first, for a person to confirm before anything is written down.

A photo with no legible number is not an error of the request. It is a `200` with `read: null` and a `refusal`:

| refusal.reason | what it means | next move |
| --- | --- | --- |
| `unreadable` | No chassis number is legible in the photo. | Retake it closer, in better light. |
| `vin` | The plate shows a 17-character VIN. `seen` carries it. | Decode it at `GET /v2/vin/{vin}`. |
| `unsplit` | The number was read but not where its hyphen goes. `seen` carries the digits. | Have a person type it with the hyphen, then open the chassis read. |

A read costs 2 credits. A refusal costs 0. The answer is never cached.

## Keys and sessions

Both reads take an API key. The photo read also answers a signed-in session, so an app can read a plate for a user before it holds a key of its own.


---

# Parts


`/v2/parts/{ref}` answers which manufacturer part numbers are on record for
a vehicle, why each one is on record, and where to buy it **from the
manufacturer**. Ask by model year, or by build code and get the answer for
that build's model year.

![Line drawing of a generic crossover in side view with three parts drawn out above it on dashed lines: a control module over the front, a gear selector over the cabin and a brake caliper over the rear wheel, each with a blank parts tag.](https://cardog.app/images/docs/parts-exploded.png)

### Parts for a model year

```bash
curl "https://api.cardog.app/v2/parts/model-year:hyundai%2Fioniq-5%2F2022" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "modelYearRef": "model-year:hyundai/ioniq-5/2022",
  "grain": "model-year",
  "total": 2,
  "parts": [
    {
      "ref": "part:hyundai/364001xaa0",
      "partNumber": "36400-1XAA0",
      "name": "ICCU ASSEMBLY",
      "description": "Integrated Charging Control Unit",
      "component": { "asPublished": "ELECTRICAL SYSTEM:PROPULSION SYSTEM:CHARGING:MODULE:SOFTWARE" },
      "recalls": ["recall:nhtsa/24v868000", "recall:nhtsa/24v204000"]
    },
    { "ref": "part:hyundai/4295118110", "partNumber": "42951-18110", "name": "SBW CONTROL UNIT" }
  ],
  "acquire": [
    { "make": "make:hyundai", "market": "CA", "name": "Hyundai Canada Parts", "url": "https://parts.hyundaicanada.com/" }
  ],
  "coverage": { "complete": false, "sources": ["gov:nhtsa"], "unpaired": 1 }
}
```

`partNumber` is the number as the manufacturer prints it, the string a
parts counter or a checkout searches for. `ref` is the join key: separators
are dropped, so `04465-0E010` and `044650E010` are the same part. Every
part carries `sources`, the documents that name it, with their dates, and
`recalls`, the campaign refs among them. Follow one to
`/v2/recalls/{ref}`.

### A build code is answered at its model year

```bash
curl "https://api.cardog.app/v2/parts/nano:KM8KM4ABNU" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The answer is the same as for the build's model year, and `grain` says so:
`"model-year"`. A part listed for a model year **applies to some builds of
it**, not necessarily to every vehicle. From a VIN, `GET /v2/vin/{vin}`
links `parts` (the model year) and `partsBuild` (the build code).

### Pairing, and the `unpaired` count

A recall that covers several vehicles and several parts is filed as every
part against every vehicle. Read naively, campaign `24V204000` puts the
GV60's charging unit on the IONIQ 5. A part is listed for a model year only
when the pairing is certain (one vehicle or one part in the campaign), or
when the manufacturer's own description names that model. A number the
campaign names without saying which vehicle it belongs to is counted in
`coverage.unpaired` and never listed. Listing it would claim a fit the
record does not make.

### Where to buy

![Line drawing of a control module resting in an open parts box, a blank parts tag tied to it.](https://cardog.app/images/docs/parts-box.png)

`acquire` at the top lists the manufacturer's official parts stores for the
make, by market, Canada first. A part's own `acquire` links, when present,
open that number on the official store. Every link goes to the
manufacturer's own site, never to a reseller. There are no prices: the
store has the current one.


### What the list covers today

The part numbers named in recall campaigns: about 14,000 numbers across
every make. `coverage.complete` is always `false`. This is the parts
named on recall records, not the full catalogue for the vehicle, and
`coverage.sources` says which kind of record each answer rests on. More
coverage lands in the same response without changing its shape.

Errors: a ref that is not a model year or a build code is a 400
`invalid_ref`. A model year we have no record of is a 404. A model year
with nothing on record is a 200 with `total: 0`. Parts costs 3 credits a
request. Every field is in the [reference](https://cardog.app/docs/reference/parts).


---

# From a carrier's name to its fleet


```bash
curl "https://api.cardog.app/v2/carriers?q=bison%20transport&country=CA" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

A motor carrier is a company that runs trucks across a border or a state line. Each one holds a US DOT number, and that number is on every roadside inspection and every reportable crash its units are involved in. `/v2/carriers` is that register and the walk from it to the units on the road.

## 1. Find the carrier

`GET /v2/carriers?q=…` takes one of three things and says which it read:

- a name or part of one (`bison transport`), matched against legal and trade names, best match first; `state` and `country` narrow it;
- a DOT number (`245330`), which returns that one carrier;
- a 17-character VIN, which returns the carriers that unit was observed under, most recent first.

```json
{
  "query": { "q": "bison transport", "matchedAs": "name", "state": null, "country": "CA" },
  "carriers": { "count": 1, "items": [
    { "dotNumber": 245330, "ref": "org:usdot/245330", "legalName": "BISON TRANSPORT INC", "dbaName": null,
      "domicile": { "city": "WINNIPEG", "state": "MB", "country": "CA" },
      "operation": "interstate", "powerUnits": 1428,
      "links": { "carrier": "/v2/carriers/245330", "vehicles": "/v2/carriers/245330/vehicles" } } ] }
}
```

Costs **1 credit**.

## 2. Read the carrier

`GET /v2/carriers/{dotNumber}` returns two blocks that never mix.

`declared` is what the carrier filed about itself on its latest registration: power units, drivers, annual mileage, whether it carries hazardous materials or passengers. It is self-reported, and `filedOn` says how old it is. Do not divide anything by `declared.mileage` without reading that date.

`observed` is what roadside inspectors and crash reports recorded under the DOT number: distinct units seen, inspections, crashes, first and last seen. Counts, never rates.

A DOT number the road record names but the register does not (a unit's operators can name one) still answers 200: `legalName` and every `declared` field are null, `observed` is the record. 404 is for a DOT number on neither.

```json
{
  "dotNumber": 245330, "legalName": "BISON TRANSPORT INC",
  "domicile": { "city": "WINNIPEG", "state": "MB", "country": "CA" }, "operation": "interstate",
  "declared": { "powerUnits": 1428, "drivers": 1110, "mileage": { "value": 143306767, "year": 2025 },
    "filedOn": "2026-04-22", "registeredOn": "1984-04-12", "hazmat": false, "passengers": false },
  "observed": { "vehicles": 2370, "inspections": 3100, "crashes": 378, "firstSeen": "1995-01-27", "lastSeen": "2026-07-09" }
}
```

The register also holds a street address, a phone number and an officer's name. None of those are served; the domicile is city, state and country.

Costs **5 credits**.

## 3. Walk the fleet

`GET /v2/carriers/{dotNumber}/vehicles` lists every unit an inspector or a crash report put under the DOT number, most recently seen first, with the roles it was seen in, its dates and counts, and a link back to every carrier it ran under.

```json
{
  "dotNumber": 245330,
  "vehicles": { "count": 2370, "items": [
    { "vin": "3AKJHHDR4KSKH9354", "roles": ["power"], "firstSeen": "2022-03-01", "lastSeen": "2026-07-09",
      "inspections": 4, "crashes": 0, "links": { "operators": "/v2/vin/3AKJHHDR4KSKH9354/operators" } } ] },
  "page": { "limit": 100, "nextCursor": "eyJs…" }
}
```

Page with `cursor` until `nextCursor` is null; `limit` goes up to 500. Each page costs **5 credits**. `vehicles.count` is the whole fleet, all pages.

These are observed associations: the unit and the carrier were on one dated row. They are not a confirmed current fleet and not ownership. A unit that changed hands appears under both carriers, each with its own dates, which is the point.

## 4. Walk back from a unit

`GET /v2/vin/{vin}/operators` goes the other way: every carrier a unit was observed running under. There is one item per day an inspection or a crash report put a carrier on the unit, most recent first, so a truck inspected ten times under one carrier is ten items.

```bash
curl "https://api.cardog.app/v2/vin/3HSDZAPR3KN125464/operators?expand=detail" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "vin": "3HSDZAPR3KN125464",
  "items": [
    { "id": "3e779a7ef733b442ed32fc2cc06217ae", "observedAt": "2026-06-15", "source": "gov:fmcsa",
      "value": { "dotNumber": 2865124, "ref": "org:usdot/2865124" },
      "detail": { "type": "fmcsa.inspection", "document": "document:inspection/bcee4bd9-1575-5bda-a057-8c8c85c9365f",
        "carrier": { "dotNumber": 2865124, "legalName": "XLI LOGISTICS INC",
          "domicile": { "city": "SURREY", "state": "BC", "country": "CA" }, "operation": "interstate", "powerUnits": 15 } } }
  ],
  "page": { "limit": 100, "nextCursor": null }
}
```

Without `expand` an item is `id`, `observedAt`, `source` and `value`. `expand=detail` adds the record that put the carrier on the unit (`fmcsa.inspection` or `fmcsa.crash`) and the carrier as it stands on the register. This covers the power unit; a trailer's carriers come from `GET /v2/carriers?q={vin}`.

Costs **3 credits** when there is at least one item, 0 when there is none.

## In the SDK

```ts
const found = await client.v2.carriers.search({ q: "bison transport", country: "CA" });
const dot = found.carriers.items[0].dotNumber;
const carrier = await client.v2.carriers.getByDot(dot);
for await (const unit of client.v2.carriers.allVehicles(dot)) {
  const { items } = await client.v2.vin.operators(unit.vin, { expand: ["detail"] });
}
```

## Where the record stops

Coverage is the US federal roadside record: US DOT-regulated commercial vehicles, including the Canadian and Mexican carriers that cross the border. A carrier that only runs inside one province is not here. A unit never stopped at a scale house is not here. No events is not evidence of a clean fleet.


---

# Feeds

```ts
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_ORG_KEY });

const run = await client.v2.feeds.latest("vehicle-identity@1");
const index = await run.index();

const row = index.lookup("2T3W1RFV3SC776931");
// { pattern: "2T3W1RFV*SC", make: "Toyota", model: "RAV4", model_year: 2025, ... } or null
```

A feed is your organization's own set of vehicle identity rows. It is rebuilt every night and handed over as files. Each file has a record count and a SHA-256, so you can check it before you load it.

An organization creates and edits its own feed in its workspace. It reads the feed from the workspace, from the API, or through the SDK.

## The datasets

Three datasets exist. An organization holds one feed per dataset.

| Dataset | One row per | What it carries |
| --- | --- | --- |
| `vehicle-identity@1` | pattern | The whole identity record: make, model, model year, body, powertrain, weights, status. |
| `vehicle-recalls@1` | pattern and recall campaign | Every campaign that names the pattern's make, model and model year: authority, campaign numbers, defect, remedy, status. The key is the pair. |
| `vehicle-safety@1` | pattern | The crash-test stars the record resolves for the pattern, with the grain of the match: `configuration`, `partial`, `model-year` or `unrated`. |

A recall row says the campaign names the model year. Whether one VIN in that model year was built inside the affected range, or has been remedied, is the manufacturer's own record. The feed does not claim it.

The rest of this page describes vehicle identity, `vehicle-identity@1`, in full; the other two follow the same rules with their own fields, which the workspace lists when you create the feed. Its status is `draft`. Within a version, fields are only added. A breaking change is a new version that runs beside the old one.

The dataset has **66 fields**. There is one row per pattern, not one row per VIN.

**Identity**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 1 | `pattern` | string | always | The row key. VIN positions 1 to 8, `*` for the check digit, positions 10 to 11. Positions 12 to 14 are added when position 3 is `9`. |
| 2 | `wmi` | string | always | VIN positions 1 to 3, the world manufacturer identifier. |
| 3 | `make` | string | when known | The make's display name. |
| 4 | `make_ref` | ref | when known | The make's permanent ref, such as `make:toyota`. Join on this, not on the name. |
| 5 | `model` | string | when known | The model's display name. |
| 6 | `model_ref` | ref | when known | The model's permanent ref, such as `model:toyota/rav4`. |
| 7 | `series` | string | when known | The series, where one is recorded. |
| 8 | `series_ref` | ref | when known | Series within the model. Permanent key. Map it to your own codes. |
| 9 | `model_year` | integer | when known | The model year. |
| 10 | `trim` | string | when known | The trim, where one is recorded. |
| 11 | `status` | string | always | `decoded` or `undecodable`. An undecodable row is a pattern that is on record and has not been named; its value columns are empty. |
| 12 | `status_reasons` | string | when known | Why a pattern is undecodable: reason codes separated by `;`. |

**Body**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 13 | `vehicle_type` | string | when known | Passenger car, truck, motorcycle, trailer and so on. |
| 14 | `vehicle_type_ref` | ref | when known | Vehicle type. Permanent key, e.g. vehicle-type:passenger-car. Map it to your own codes. |
| 15 | `body_style` | string | when known | The body style. |
| 16 | `body_style_ref` | ref | when known | Body style. Permanent key. Map it to your own codes. |
| 17 | `body_cab` | string | when known | Cab type of a pickup or truck. Display name; empty when the registry holds no name for the ref. |
| 18 | `body_cab_ref` | ref | when known | Cab type of a pickup or truck. Permanent key. Map it to your own codes. |
| 19 | `bed_type` | string | when known | Bed type of a pickup. Display name; empty when the registry holds no name for the ref. |
| 20 | `bed_type_ref` | ref | when known | Bed type of a pickup. Permanent key. Map it to your own codes. |
| 21 | `doors` | integer | when known | The number of doors. |

**Powertrain**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 22 | `fuel_type` | string | when known | The fuel type. |
| 23 | `fuel_type_ref` | ref | when known | Primary fuel. Permanent key. Map it to your own codes. |
| 24 | `fuel_type_secondary` | string | when known | Second fuel of a dual-fuel vehicle. Display name; empty when the registry holds no name for the ref. |
| 25 | `fuel_type_secondary_ref` | ref | when known | Second fuel of a dual-fuel vehicle. Permanent key. Map it to your own codes. |
| 26 | `electrification` | string | when known | The electrification level, such as hybrid or battery electric. |
| 27 | `electrification_ref` | ref | when known | Electrification level. Permanent key, e.g. electrification-level:bev-battery-electric-vehicle. Map it to your own codes. |
| 28 | `drive_type` | string | when known | The drive type. |
| 29 | `drive_type_ref` | ref | when known | Drive type. Permanent key. Map it to your own codes. |
| 30 | `transmission` | string | when known | Transmission. Display name; empty when the registry holds no name for the ref. |
| 31 | `transmission_ref` | ref | when known | Transmission. Permanent key. Map it to your own codes. |

**Weight**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 32 | `gvwr_class` | string | when known | The gross vehicle weight rating class. |
| 33 | `gvwr_class_ref` | ref | when known | Gross vehicle weight rating class. Permanent key, e.g. gvwr:class-2e-6-001-7-000-lb-2-722-3-175-kg. Map it to your own codes. |
| 34 | `wheels` | integer | when known | Number of wheels. |
| 35 | `axles` | integer | when known | Number of axles. |
| 36 | `shipping_weight` | integer | when known | Shipping weight, as the record holds it. |
| 37 | `gross_weight` | integer | when known | Gross weight, as the record holds it. |

**Trailer**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 38 | `trailer_type` | string | when known | Trailer type. Display name; empty when the registry holds no name for the ref. |
| 39 | `trailer_type_ref` | ref | when known | Trailer type. Permanent key. Map it to your own codes. |
| 40 | `trailer_body_type` | string | when known | Trailer body type. Display name; empty when the registry holds no name for the ref. |
| 41 | `trailer_body_type_ref` | ref | when known | Trailer body type. Permanent key. Map it to your own codes. |

**Provenance**

| # | Field | Type | Present | What it holds |
| --- | --- | --- | --- | --- |
| 42 | `source` | string | when known | How the row was named: `decode` when the VIN pattern itself resolves it, `reference` when a reference record filled it. It never says who filed the pattern. |
| 43 | `make_source` | string | when known | Which mapper wrote make: decode, catalogue, fill, miit or nhtsa-safety. |
| 44 | `model_source` | string | when known | Which mapper wrote model: decode, catalogue, fill, miit or nhtsa-safety. |
| 45 | `series_source` | string | when known | Which mapper wrote series: decode, catalogue, fill, miit or nhtsa-safety. |
| 46 | `vehicle_type_source` | string | when known | Which mapper wrote vehicle_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 47 | `body_style_source` | string | when known | Which mapper wrote body_style: decode, catalogue, fill, miit or nhtsa-safety. |
| 48 | `body_cab_source` | string | when known | Which mapper wrote body_cab: decode, catalogue, fill, miit or nhtsa-safety. |
| 49 | `bed_type_source` | string | when known | Which mapper wrote bed_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 50 | `fuel_type_source` | string | when known | Which mapper wrote fuel_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 51 | `fuel_type_secondary_source` | string | when known | Which mapper wrote fuel_type_secondary: decode, catalogue, fill, miit or nhtsa-safety. |
| 52 | `electrification_source` | string | when known | Which mapper wrote electrification: decode, catalogue, fill, miit or nhtsa-safety. |
| 53 | `drive_type_source` | string | when known | Which mapper wrote drive_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 54 | `transmission_source` | string | when known | Which mapper wrote transmission: decode, catalogue, fill, miit or nhtsa-safety. |
| 55 | `gvwr_class_source` | string | when known | Which mapper wrote gvwr_class: decode, catalogue, fill, miit or nhtsa-safety. |
| 56 | `trailer_type_source` | string | when known | Which mapper wrote trailer_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 57 | `trailer_body_type_source` | string | when known | Which mapper wrote trailer_body_type: decode, catalogue, fill, miit or nhtsa-safety. |
| 58 | `model_year_source` | string | when known | Which mapper wrote model_year: decode, catalogue, fill, miit or nhtsa-safety. |
| 59 | `trim_source` | string | when known | Which mapper wrote trim: decode, catalogue, fill, miit or nhtsa-safety. |
| 60 | `doors_source` | string | when known | Which mapper wrote doors: decode, catalogue, fill, miit or nhtsa-safety. |
| 61 | `wheels_source` | string | when known | Which mapper wrote wheels: decode, catalogue, fill, miit or nhtsa-safety. |
| 62 | `axles_source` | string | when known | Which mapper wrote axles: decode, catalogue, fill, miit or nhtsa-safety. |
| 63 | `shipping_weight_source` | string | when known | Which mapper wrote shipping_weight: decode, catalogue, fill, miit or nhtsa-safety. |
| 64 | `gross_weight_source` | string | when known | Which mapper wrote gross_weight: decode, catalogue, fill, miit or nhtsa-safety. |
| 65 | `identity_build` | string | always | The identity build the row was produced from. |
| 66 | `updated_at` | date | always | The date the row last changed, `YYYY-MM-DD`. |


A field that is "when known" is empty in CSV and `null` in JSON when there is no value.

### The row key

`pattern` is the part of a VIN that names the vehicle's make, model and model year:

```text
VIN       2 T 3 W 1 R F V 3 S C 7 7 6 9 3 1
position  1 2 3 4 5 6 7 8 9 10 11 ...
pattern   2 T 3 W 1 R F V * S C
```

Positions 1 to 8, an asterisk in place of the check digit at position 9, then positions 10 and 11. When position 3 is `9`, positions 12 to 14 are added, so the pattern is 14 characters. Every VIN that shares a pattern shares a row.

### Which rows a feed covers

A manufacturer's feed covers the rows Cardog's identity record names as that manufacturer's makes. Scope is set by Cardog from who the organization is. It is not a setting.

## Create and configure a feed

In your organization's workspace, open **Feeds** and choose **New feed**. An owner or an admin can create and change a feed.

Customization is a projection over the dataset:

- **Choose fields.** Include any of the 66.
- **Rename columns.** A column name starts with a letter and may use letters, digits, spaces, `_`, `.` and `-`, up to 64 characters.
- **Reorder columns.** `pattern` is the row key and stays column one.

A projection selects, renames and reorders. It never computes a value.

If you save no projection, the feed carries every field under its own name, in the order of the table above.

## Formats

| Format | Files | Notes |
| --- | --- | --- |
| CSV | `full.csv`, `delta.csv`, `deletes.csv` | One row per line. |
| JSON Lines | `full.jsonl`, `delta.jsonl`, `deletes.jsonl` | One JSON object per line. |
| JSON | `full.json`, `delta.json`, `deletes.json` | One JSON array. |

Each format is available plain or gzipped. A gzipped file adds `.gz` to its name.

CSV has three more settings:

| Setting | Choices | Default |
| --- | --- | --- |
| Delimiter | comma, pipe, tab, semicolon | comma |
| Header line | on, off | on |
| Line ending | LF, CRLF | LF |

A CSV value that contains the delimiter or a double quote is wrapped in double quotes, and a quote inside it is doubled (RFC 4180).

In JSON Lines and JSON, the keys are your column names in column order. Integers are numbers and an empty value is `null`.

## The nightly run

Every night the feed is rebuilt from the identity record and compared with the run that is current. The result is a **run**:

| File | Holds |
| --- | --- |
| full | Every row in the feed. |
| delta | The rows that are new or changed since the current run. |
| deletes | The keys that were removed since the current run. Written only when keys were removed. |

Each file has a record count, a size in bytes and a SHA-256.

**The run id is the SHA-256 of the uncompressed full file.** The same data is the same run, whether or not the file is gzipped.

A pointer named "latest" says which run is current. It moves only after every file of the run is written. A reader never sees a run that is half written.

The first run of a feed has nothing to compare with, so its delta file has no rows and its manifest says `kind: "full"`. The same is true of the first run after you change the feed's columns, format or CSV settings: files written under one shape are not compared with files written under another.

### The daily record

Every night is recorded with its outcome, whatever happened:

| Outcome | What happened | What is current afterwards |
| --- | --- | --- |
| `published` | The run was written and the latest pointer moved to it. | The new run. |
| `unchanged` | The data is identical to the current run, so the run id is the same. | The same run. |
| `held` | The run changes more rows than the limit allows. It is written and held for review. | The previous run. |
| `refused` | The run removes too large a share of the rows. It is not published. | The previous run. |
| `failed` | The run did not complete. | The previous run. |

Held and refused are checks on our side, not errors on yours. A run that fails a check is never handed to you as the current run. You keep reading the previous run until a run is published.

### The profile

Each run carries a profile of its full file: how many rows have a value in each field, and breakdowns by make, model year, vehicle type, fuel type, status and source. The workspace shows it with the feed.

## Read a feed

### In the workspace

Open **Feeds**, choose the feed, then choose a run. Each file has a download link. A link is signed and good for 24 hours.

### With the API

Feeds are read with the organization's key, which starts with `crdg_org_`. Create one under **Developer** in the organization's workspace. A personal key or a session is `403 forbidden`. Every feed read costs **0 credits**.

```bash
curl "https://api.cardog.app/v2/feeds" \
  -H "x-api-key: $CARDOG_ORG_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "feeds": [
    {
      "contract": {
        "dataset": "vehicle-identity@1",
        "fieldmap": "recall-tool@1",
        "format": "csv.gz",
        "status": "active",
        "cadence": { "full": true, "delta": true, "weekly_full": false }
      },
      "latest": {
        "runId": "9f2c4e1b…",
        "kind": "delta",
        "producedAt": "2026-10-02T06:00:00.000Z"
      }
    }
  ]
}
```

`GET /v2/feeds` lists the organization's active feeds. `latest` is `null` until a run has been published.

```bash
curl "https://api.cardog.app/v2/feeds/vehicle-identity@1/latest" \
  -H "x-api-key: $CARDOG_ORG_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "contract": {
    "dataset": "vehicle-identity@1",
    "fieldmap": "recall-tool@1",
    "format": "csv.gz",
    "status": "active",
    "cadence": { "full": true, "delta": true, "weekly_full": false }
  },
  "dataset": {
    "id": "vehicle-identity@1",
    "title": "Vehicle identity",
    "status": "draft",
    "semantics": { "upsert": true, "delete": true },
    "fields": [
      { "name": "pattern", "type": "string", "required": true, "joinKey": true }
    ]
  },
  "manifest": {
    "schema": "feed-manifest@1",
    "dataset": "vehicle-identity@1",
    "runId": "9f2c4e1b…",
    "kind": "delta",
    "baselineRunId": "41d07a3c…",
    "artifacts": [
      { "name": "full.csv.gz", "records": 1204, "bytes": 18211, "sha256": "c81e7f02…" },
      { "name": "delta.csv.gz", "records": 14, "bytes": 702, "sha256": "5b7a19d4…" },
      { "name": "deletes.csv.gz", "records": 2, "bytes": 96, "sha256": "e04f6c58…" }
    ],
    "producedAt": "2026-10-02T06:00:00.000Z"
  },
  "artifacts": [
    {
      "name": "full.csv.gz",
      "records": 1204,
      "bytes": 18211,
      "sha256": "c81e7f02…",
      "url": "https://api.cardog.app/v2/feeds/artifact/9f2c4e1b…/full.csv.gz?t=…&d=…&exp=…&sig=…",
      "expiresAt": "2026-10-03T06:12:00.000Z"
    }
  ],
  "columns": [
    { "name": "pattern", "source": "pattern", "type": "string" },
    { "name": "make", "source": "make", "type": "string" },
    { "name": "model_year", "source": "model_year", "type": "integer" }
  ],
  "layout": { "delimiter": ",", "header": true, "lineEnding": "lf" }
}
```

The example is shortened: one dataset field, one artifact link and three columns are shown. Its counts and hashes are illustrative.

- `manifest` describes the run. `kind` is `delta` when the run was compared with an earlier one, and `baselineRunId` names that run. `kind` is `full` when there was nothing to compare with.
- `artifacts` is one entry per file, each with a signed `url`.
- `columns` is the files' columns in order: the name you chose, the dataset field behind it, and its type.
- `layout` is how a CSV file was written.
- `dataset` is the declaration the rows are read by.

`columns` and `layout` describe the run, not the feed's current settings. A feed edited since still reads the files it wrote.

### The file

```bash
curl "$ARTIFACT_URL" -o full.csv.gz
```

Open an artifact `url` exactly as printed. It needs no API key and costs 0 credits. It is good for 24 hours. After that, or if it has been altered, it answers `403 forbidden`. Request `/latest` again for a fresh link. Do not store the link; store the run id.

| Status | When |
| --- | --- |
| `400 invalid_request` | The dataset id is not `name@version`. |
| `403 forbidden` | The credential is not an organization key, or the artifact link is expired or not valid. |
| `404 not_found` | The organization has no active feed for that dataset, or no run has been published yet. |
| `503 unavailable` | The run or the file could not be read right now. Retry with backoff. |

## Read a feed with the SDK

`client.v2.feeds` is in `@cardog/api`. Construct the client with the organization's key.

```ts
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_ORG_KEY });

const { feeds } = await client.v2.feeds.list();
for (const feed of feeds) {
  console.log(feed.contract.dataset, feed.contract.format, feed.latest?.runId ?? "no run yet");
}

const run = await client.v2.feeds.latest("vehicle-identity@1");
console.log(run.runId, run.manifest.kind, run.columns.map((c) => c.name));
```

`latest()` returns a run. These are the ways to read it:

| Member | Returns |
| --- | --- |
| `run.rows(role)` | An async iterator of rows, streamed. The file is never held in memory. |
| `run.toJSON(role)` | Every row as an array. |
| `run.index()` | The full file in memory, keyed by pattern, with `lookup(vin)`. |
| `run.columns` | The files' columns in order: `name`, `source`, `type`. |
| `run.manifest` | The run's manifest. |
| `run.artifact(role)` | The file's entry (`name`, `records`, `bytes`, `sha256`, `url`, `expiresAt`), or `null` when the run has no such file. |
| `run.runId` | The run id. |

`role` is `"full"` (the default), `"delta"` or `"deletes"`.

Rows are objects keyed by your column names. Integers are numbers and an empty value is `null`. Gzip, the delimiter, quoting and the header are handled for you, in the browser and in Node, with web streams only.

```ts
for await (const row of run.rows()) {
  console.log(row.pattern, row.make, row.model_year);
}

const all = await run.toJSON();
```

A row from a deletes file carries the key column alone.

## Answer a VIN from the feed

```ts
const index = await run.index();

const row = index.lookup("2T3W1RFV3SC776931");
if (row === null) {
  // The pattern is not in the feed. Say the VIN is not recognized.
} else {
  console.log(row.make, row.model, row.model_year); // "Toyota" "RAV4" 2025
}
```

`lookup(vin)` masks the VIN to its pattern and returns the row, or `null` when the pattern is not in the feed. It throws only when the string is not a well-formed VIN. `index.get(pattern)` takes a pattern directly, and `index.size` is the number of rows.

The index is keyed by the first column, so it works whatever you named your columns. The fields on the row are the columns you chose, under the names you gave them.

Without the SDK, build the pattern yourself and look it up in your own store:

```ts
function patternOf(vin: string): string {
  const v = vin.trim().toUpperCase();
  const tail = v[2] === "9" ? v.slice(11, 14) : "";
  return v.slice(0, 8) + "*" + v.slice(9, 11) + tail;
}
```

`nanoFromVin` in [`@cardog/entities`](https://www.npmjs.com/package/@cardog/entities) is the same rule with VIN validation, and it is what the SDK calls.

### Why this shape

Canada's Motor Vehicle Safety Regulations section 15.05 requires a designated company's VIN recall lookup tool to return make, model and model year for a VIN and to say when a VIN is not recognized. A feed is reference data that answers that: a row gives the three values, and `null` is the VIN that is not recognized.

### Every row for a VIN

A recalls feed holds several rows for one pattern. `lookupAll` returns all of them, and an empty list when the pattern is not on the record.

```ts
const recalls = await client.v2.feeds.latest("vehicle-recalls@1");
const index = await recalls.index();
const campaigns = index.lookupAll("2T3W1RFV3SC776931");
// [{ pattern, recall_ref, authority, campaign_number, recall_status, … }, …]
```

## Keep your own store current

One call brings your copy up to the current run and tells you where you now stand. Keep the run id it returns and pass it back next time.

```ts
type Row = Record<string, string | number | boolean | null>;

// Your own storage. These five calls are yours to write.
declare const store: {
  lastRunId(): Promise<string | null>;
  clear(): Promise<void>;
  upsert(key: string, row: Row): Promise<void>;
  remove(key: string): Promise<void>;
  saveRunId(runId: string): Promise<void>;
};

const result = await client.v2.feeds.sync("vehicle-identity@1", {
  since: await store.lastRunId(),
  reset: () => store.clear(),
  upsert: (row) => store.upsert(String(Object.values(row)[0]), row),
  remove: (key) => store.remove(key),
});

await store.saveRunId(result.runId);
result.mode; // "full", "delta" or "unchanged"
```

What `sync` does with the run:

| `mode` | When | What is called |
| --- | --- | --- |
| `unchanged` | The current run is the one you hold. | Nothing. |
| `delta` | The current run was built on top of exactly the run you hold. | `remove` for every key that left, then `upsert` for every new or changed row. |
| `full` | Your first sync, a night you missed, or a change to the feed's columns or format. | `reset`, then `upsert` for every row. |

The rules behind it:

- A delta row is a whole row. Insert it if the key is new, replace it if the key exists.
- A deletes row is a key. Remove that row.
- A delta applies to exactly one earlier run, the one `baselineRunId` names. If that is not the run you hold, `sync` applies the full file instead. It needs `reset` for that, so rows that have left are not kept.
- Every file is checked against the SHA-256 in the manifest before a row is applied. A file that does not match throws `FeedIntegrityError` and none of your handlers is called.
- Save the run id only after `sync` returns. If your process stops part way, the next `sync` with the old id applies the same run again, and applying it twice is harmless.

To ask only whether there is anything new:

```ts
const current = await client.v2.feeds.currentRunId("vehicle-identity@1");
if (current !== (await store.lastRunId())) {
  // a new run is waiting
}
```

## Verify a file

Two checks, both with tools you already have.

```bash
# 1. The file you downloaded is the file the run recorded.
shasum -a 256 full.csv.gz
# equals artifacts[].sha256 for full.csv.gz

# 2. The full file is the run.
gunzip -c full.csv.gz | shasum -a 256
# equals manifest.runId
```

`artifacts[].sha256` is the hash of the file as served, so for a gzipped file it is the hash of the gzipped bytes. The run id is the hash of the full file uncompressed. For a feed that is not gzipped the two are the same value.

`artifacts[].records` is the number of rows in the file, not counting a CSV header line. Compare it with what you loaded.

```ts
const full = run.artifact("full");
const rows = await run.toJSON();
if (full === null || rows.length !== full.records) {
  throw new Error("row count does not match the run");
}
```

## Not yet

Push delivery to your own SFTP server, S3 bucket or webhook is coming. A destination can be saved in the workspace today and shows as pending its first delivery. Until then a feed is read by pulling it, in any of the three ways above.

---

# Market data

The market surface has three parts. An **instrument** is the thing being
priced. A **quote** is the current state of the live listings for that
instrument, summarized. The **tape** is every price observation, rolled up
into daily history. Once you can read one quote, you can read them all.

![Line drawing of twelve identical hatchbacks whose lines flow into a bell-shaped histogram of prices, the median bar outlined.](https://cardog.app/images/docs/market-quote.png)

## Instruments: what is being priced

An instrument is a slice of the market with enough listings to price. Two
grains do most of the work:

- **`model-year:`** treats "Honda CR-V 2026" as one instrument. Thousands
  of live listings back it and the medians are stable. Use this grain for
  market overviews, dashboards, and "what do these go for".
- **`squish:`** is the first 9 meaningful VIN characters: one exact
  configuration of one model year. Far fewer listings and a much sharper
  answer. Use this grain for "what is this car worth", appraisal, and
  trade-in logic. You can derive it from any VIN offline.

Between them sit qualified sub-grains (`mmy`, `mmy.drive`, `mmy.fuel`, `mmy.body`, `squish`) that split a model year by
drive, fuel, or body where those change the price.

Use `GET /v2/instruments?q=` to search instruments, or take the
`instrument` link from any VIN decode or entity response.

## Reading a quote

```bash
curl "https://api.cardog.app/v2/quotes/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "ref": "model-year:honda/cr-v/2026",
  "grain": "mmy",
  "liveCount": 1259,
  "bestPrice": 36912,
  "priceP25": 46125,
  "priceMedian": 46902,
  "priceP75": 51450,
  "avgDomDays": 67,
  "cuts30d": 138,
  "avgCutPct30d": 2.6,
  "sightings30d": 939051,
  "asOf": "2026-09-09T12:38:03.506Z",
  "links": {
    "instrument": "/v2/instruments/model-year%3Ahonda%2Fcr-v%2F2026",
    "history": "/v2/tape/history/model-year%3Ahonda%2Fcr-v%2F2026"
  }
}
```

Field by field:

- **`liveCount`** is the number of active listings behind the quote right
  now. Treat it as the sample size. A median over 1,259 listings is
  reliable, and a median over 4 is not. Check it before trusting the
  numbers.
- **`bestPrice` / `priceP25` / `priceMedian` / `priceP75`** describe
  the price distribution. The median is the market price. The P25 to P75
  band is the spread. Best is the floor, and it is often an outlier. The
  gap between best and P25 above is real and typical.
- **`avgDomDays`** is the average days on market: how fast listings sell.
- **`cuts30d` / `avgCutPct30d`** are the price cuts observed in the
  trailing 30 days and their average size. Rising cut counts tend to lead
  falling medians.
- **`sightings30d`** is the number of observations behind the trailing
  stats.
- **`asOf`** is when this quote was computed. A quote describes a moment.

To quote several instruments at once, `GET /v2/quotes?refs=a,b,c` takes up
to 20 refs in one request and returns them in request
order.

## History: daily bars over a window

```bash
curl "https://api.cardog.app/v2/tape/history/model-year:honda%2Fcr-v%2F2026?window=1m" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

History returns ascending daily **bars**: `day`, `median`, `p25`,
`p75`, `best`, plus `count` or `prints` depending on the bar's
`source`. A `"fold"` bar is a once-daily snapshot of the live listings.
A `"prints"` bar is built from individual observations on days with no
snapshot. The set of sources is open. Windows: `1w`, `1m`, `3m`, `6m`, `ytd`, `1y`, `3y`, `5y`, `10y`, `all`.

## The tape: prints

A **print** is one observation of one listing: a price seen on a seller's
site at a moment in time, mapped onto its instrument:

```bash
curl "https://api.cardog.app/v2/tape/live" -H "x-api-key: $CARDOG_API_KEY" -H "Cardog-Version: 2026-10-26"
```

Each print carries the instrument `ref`, the `price`, the seller
`domain` it was observed on, the timestamp, and `vinTail`, the last 6
characters of the VIN. That is enough to dedup a vehicle across sites
without publishing the full VIN. The live feed also reports throughput
(`perMinute`, `today`), which tells you how current the data is.

Everything above is derived from prints. Bars aggregate prints, and quotes
aggregate bars plus the live listings.

Moving a listings integration from MarketCheck? [How to migrate from
MarketCheck to Cardog](https://cardog.app/resources/migration/marketcheck) maps every field,
and [How used-car prices are measured](https://cardog.app/resources/learn/how-used-car-prices-are-measured)
explains the numbers in a quote.

## What Cardog does and does not do

Cardog observes the market, publishes the instruments, and serves the same
quotes to everyone. We hold no inventory, take no side of any trade, and
sell no placement in the numbers. A quote reads the same whether the asker
is a buyer, a dealer, or a lender.

---

# Recalls by VIN

```bash
curl "https://api.cardog.app/v2/recalls/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "vin": "2T3R1RFV7MW180266",
  "modelYearRef": "model-year:toyota/rav4/2021",
  "resolved": true,
  "source": "decoded",
  "market": "CA",
  "applicability": "listed_for_model_year",
  "total": 1,
  "byRegime": { "safety": 1, "emissions": 0 },
  "byAuthority": { "tc": 1, "nhtsa": 1 },
  "recalls": [
    {
      "ref": "recall:tc/2023684",
      "authority": "tc",
      "authorityLabel": "Transport Canada",
      "market": "CA",
      "regime": "safety",
      "applicability": "listed_for_model_year",
      "campaignNumber": "2023684",
      "component": "Airbag",
      "components": [
        { "ref": "component:occupant-protection/airbags", "asPublished": "Airbag", "reading": "placed" }
      ],
      "parts": [],
      "defectSummary": "On certain vehicles, a sensor for the occupant classification system (OCS) may not have been manufactured properly. …",
      "recallDate": "2023-12-20",
      "unitsAffected": 99965,
      "affects": [
        { "modelYearRef": "model-year:toyota/rav4/2021", "year": 2021, "unitsAffected": 99965 }
      ]
    }
  ],
  "asOf": "2026-09-09T06:05:10.165Z",
  "links": { "identity": "/v2/vin/2T3R1RFV7MW180266" }
}
```

![Line drawing of a sedan with its steering-wheel airbag module drawn out above it on a dashed line, and a blank notice sheet below.](https://cardog.app/images/docs/recall-notice.png)

Send a VIN and get back the campaigns listed for that vehicle's model year
in its market of sale: possible recalls, not a VIN-level determination.
Every authority's record is its own row, never merged, carrying its issuing
authority and campaign number so you can cite it. Show your users that a listed recall is confirmed only by the
manufacturer's VIN lookup or a dealer. A check costs 5 credits per VIN —
$0.15 on Starter, $0.10 on Pro. The free tier covers
10 checks a month with no card
([pricing](https://cardog.app/pricing)).


## Market, authority and regime

A recall list answers for one market of sale (API `2026-10-26`). Three
filters scope it, on `/v2/recalls/vin/{vin}`, `/v2/vin/{vin}/recalls` and
`/v2/recalls/entity/{ref}`:

| Param | Values | Default | Effect |
| --- | --- | --- | --- |
| `market` | `CA`, `US`, `AU`, `GB`, `JP`, `KR`, `CN`, `IL`, `all` | `CA` | `recalls` and `total` hold that market's authorities: `CA` is Transport Canada and Environment and Climate Change Canada |
| `authority` | comma list: `tc`, `eccc`, `nhtsa`, `au`, … | none | narrows the list; sent without `market`, picks across every market |
| `regime` | `safety`, `emissions`, `all` | `all` | safety recalls or emissions notices |
| `include` | `other` | none | adds `otherRecalls`, the records of other markets, never counted |

The market is where the car was sold and registered, never read off the VIN:
a Canadian X5 carries a US WMI. Each row says its `market` and `regime`;
`byRegime` counts the market's rows by regime and `byAuthority` counts every
authority with records for the model year, unfiltered. An emissions notice is
never a safety recall: count and label the two apart. NHTSA campaigns are
US records and may have no Canadian counterpart, or one under a different
number covering different vehicles; send `include=other` to show them apart.

A caller pinned to `2026-10-21`, or sending no `Cardog-Version`, keeps
every authority and safety recalls only. See the
[migration guide](https://cardog.app/docs/migrations/2026-10-26).

The VIN is first decoded to its model-year node in the graph, and the
campaigns keyed to that node come back. [Decode a VIN by
API](https://cardog.app/docs/decode-canadian-vin) describes the identity the check goes
through.

## What SOR/2024-274 requires

**SOR/2024-274** amended Canada's Motor Vehicle Safety Regulations. Section
15.05 requires vehicle manufacturers to operate a public, VIN-searchable
recall lookup showing recall and correction information per VIN. That lookup
is the confirmation; this API is not a substitute for it. What this API gives
you is the campaign record behind it: which campaigns name the model year, by
authority, citable. If you build for dealers, insurers, lenders, fleets, or a
registry, send your users to the manufacturer's lookup to confirm. Most
integrations get the negative answer wrong, so the next section covers it
first.

## `resolved: false` is not "no recalls"

The check has two different empty states:

```json
{
  "vin": "9BWAB45U5LP000000",
  "modelYearRef": null,
  "resolved": false,
  "total": 0,
  "recalls": [],
  "asOf": "2026-09-09T06:05:10.165Z",
  "links": {
    "identity": "/v2/vin/9BWAB45U5LP000000"
  }
}
```

- **`resolved: true, total: 0`** means the VIN was matched to its model
  year and the corpus lists no campaigns for that model year. It is not a
  clearance for the vehicle: confirm with the manufacturer's VIN lookup.
- **`resolved: false`** means the VIN could not be matched to a node in
  the graph. The example above is a Brazilian-market Volkswagen the decoder
  does not cover.
  `total: 0` here carries no information. The platform cannot support a
  recall claim for this VIN either way.

Check `resolved` before you check `total`. A surface that renders
`resolved: false` as "No recalls" is making the mistake s.15.05 exists to
prevent. This follows the same null rule as the rest of the API: when the
evidence is missing, the response says so.

## Both authorities, kept distinct

The RAV4 above reports `total: 2`, with the second record elided. The same
occupant classification defect exists as Transport Canada campaign
`2023684` and as NHTSA campaign `23V865000`. The response returns both in
one list and keeps them as separate records, so each can be cited against
its own issuer.

## Components and parts

Each row carries `components`: every component the campaign names, read
onto one shared `component:` tree, with the authority's own text kept
beside it in `asPublished`. Transport Canada files coarse systems (`Airbag`) and
NHTSA files fine paths (`SUSPENSION:FRONT:CONTROL ARM:LOWER BALL JOINT`);
both land on the same tree, so `component:suspension` names everything
beneath it, including `component:suspension/front/control-arm`.

```json
"components": [
  {
    "ref": "component:suspension/front/control-arm",
    "asPublished": "SUSPENSION:FRONT:CONTROL ARM:LOWER BALL JOINT",
    "reading": "placed"
  }
],
"parts": ["part:ford/lx6z3078g", "part:ford/lx6z3078h"]
```

`reading` says how the text was read: `placed` is one ref, `set` means the
text names several systems (one entry each), `refused` means it names no
component and `unknown` is a spelling the vocabulary does not hold yet.
Those last two carry `ref: null`; show `asPublished` instead.

`parts` lists the part refs the filing ties to a specific vehicle, the
replacement parts the remedy calls for. [Parts](https://cardog.app/docs/parts) serves each
one with the maker's own store link. A campaign that files part numbers
without saying which vehicle each fits lists none, rather than guessing.
`components` and `parts` arrive with API `2026-10-26`; a caller on
`2026-10-21` does not see them.

## Citing a result

Every campaign carries enough to cite it:

- **`authority` / `authorityLabel`**: who issued the campaign. `"tc"`
  is Transport Canada and `"nhtsa"` is NHTSA. The set is open.
- **`campaignNumber`**: the authority's own identifier, which resolves in
  their systems.
- **`asOf`**: how fresh the corpus was at the time of the check. Store it
  with the result. "No campaigns listed for this model year as of {asOf},
  per {authority}" is an accurate record. "No recalls" on its own is not,
  and neither is a clearance for the vehicle.

## Sweeping at entity scope

Fleets and portfolios usually watch the entities they hold rather than
checking VIN by VIN. Any make, model, or model-year ref returns its
campaigns:

```bash
# Everything affecting a model year you hold in volume
curl "https://api.cardog.app/v2/recalls/entity/model-year:toyota%2Frav4%2F2021" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# The whole make, for portfolio triage
curl "https://api.cardog.app/v2/recalls/entity/make:toyota" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

A pattern that scales: sweep the entity refs you hold on a schedule, and
when a new campaign appears, run the per-VIN check across the affected part
of your fleet. `GET /v2/recalls/feed` (newest campaigns first) and
`GET /v2/recalls/stats` (corpus counters and latest recall date) support
that loop. The full route list is in the
[recalls reference](https://cardog.app/docs/reference/recalls).

## The affects grain

A campaign's scope is **campaign × model-year**. Each entry in `affects`
binds one model-year ref to its `unitsAffected`, where the authority
published a count. Two consequences follow. First, `affects` is scoped to
how you asked: an entity query lists only the years in your scope, and the
campaign detail (`GET /v2/recalls/{recall-ref}`) lists them all. Second,
the grain is the authority's, not the vehicle's. A campaign names model
years, and the per-VIN check applies that grain through the VIN's identity.
Where a manufacturer scopes a campaign below the model year (a VIN range or
a plant window), the authoritative per-VIN answer is the manufacturer's own
s.15.05 lookup. The campaign record here tells you which one to ask and
cite.

## Pricing

A VIN check is 5 credits: $0.15 on Starter, $0.10 on Pro.
Other reads in the group (entity sweeps, the feed, stats, campaign detail)
are 1 credit each.

The **Free** plan is $0 with 50 credits a month and
**no credit card** — 10 VIN checks to evaluate with,
hard-stopping at the allowance rather than billing you. Paid plans start at
$30/mo (USD).
See [Credits](https://cardog.app/docs/credits) for the full card, or
[cardog.app/pricing](https://cardog.app/pricing); `GET https://api.cardog.app/v2/pricing`
serves it as JSON with no auth.

## What is not here

**Recall completion status is not in this API.** Whether a specific vehicle
has had a specific campaign performed is held by the manufacturer, and we
do not redistribute it. If your product needs "was this fixed", you need an
OEM relationship.

**For a single lookup by hand, Transport Canada's own recall site is
free.** This API adds VIN-to-model-year
resolution, NHTSA campaigns, entity-scoped sweeps, and an interface you can
put behind a product. It does not match a VIN to a campaign's VIN range; the
manufacturer's lookup does. If you are doing this once by hand, see
[How to look up vehicle recalls by VIN](https://cardog.app/blog/look-up-recalls-by-vin).

**Push notification is not built.** Recall watches (notify me when a
campaign lands on a VIN I care about) are on the roadmap and not in the
API. Today you poll `GET /v2/recalls/feed`.

For how Transport Canada and NHTSA campaigns differ, and why one vehicle
can carry both, see
[Canadian vs US recalls](https://cardog.app/resources/learn/canadian-vs-us-recalls).

---

- **Everything in one fetch:** https://cardog.app/docs.md
- **The contract:** https://api.cardog.app/v2/openapi.json
- **Get a key:** https://cardog.app/login?next=/account/api
- **MCP:** `claude mcp add --transport http cardog "https://mcp.cardog.io/mcp?api_key=$CARDOG_API_KEY"`

---

# Safety ratings


Crash ratings can be looked up by two different keys. The key you use
decides how precise the answer is.

### By model year: every configuration NHTSA rated

```bash
curl "https://api.cardog.app/v2/safety/model-year:ram/1500/2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The response carries `ratings`, one per configuration NHTSA tested for
that model year, and `best`, the highest-scoring one. Use this when you
have a year, make, and model but not a specific vehicle.

### By build code: the rating for that vehicle

```bash
curl "https://api.cardog.app/v2/safety/nano:1C6SRFVTTN" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The **nano** is the build code from a VIN decode: VIN positions 1–8, 10
and 11 (plus 12–14 when position 3 is `9`), returned as `nano` on
`/v2/vin`. It identifies the exact configuration: cab, drivetrain, fuel,
weight class.

Use this route when you have a VIN. NHTSA does not rate "a 2026 Ram 1500".
It rates a crew cab and a quad cab separately, and on that truck the
difference is **four stars against five**. Given the build code, we narrow
the model year's ratings to the configurations that can be yours:

```jsonc
{
  "matchGrain": "configuration",   // narrowed to exactly one
  "candidates": 5,                 // how many the model year had
  "matched": [ /* the survivors */ ],
  "best": { /* … */ }
}
```

`matchGrain` says how far the narrowing got:

| grain | meaning |
| --- | --- |
| `configuration` | narrowed to one. This is your vehicle's rating. |
| `partial` | narrowed, but more than one survives |
| `model-year` | nothing could be ruled out |
| `unrated` | NHTSA has no ratings for this model year |
| `exempt` | outside the programme: NCAP rates neither trailers nor vehicles over 8,500 lb GVWR. `note` says which. |

When more than one rating survives, the response returns the shortlist
instead of picking one. `unresolved` names what stopped the narrowing.

**Equipment is answered at trim grain on this route only.** A trim cannot
be known without the build, so the model-year route reports NHTSA's answer
alone. It is coarser, but it is not wrong.

## The shape

A rating comes back in five blocks:

| block | answers |
| --- | --- |
| `config` | what this rating **covers**, with every axis as an entity ID |
| `crash` | what NHTSA **measured** |
| `equipment` | what the vehicle **has** |
| `published` | what the source **said**, verbatim |
| `provenance` | who said it, and which release |

## IDs, and when to use them

Identity and configuration ship twice, as an ID and as a display name:

```jsonc
"makeRef": "make:honda",  "make": "HONDA",
"config": { "bodyStyleRef": "body-style:pickup", "bodyCabRef": "body-cab:crew-super-crew-crew-max" }
```

Use the **name** to show a person. Use the **ID** for everything else. The
ID can be looked up at `/v2/entities`, it survives a change in how we
capitalise, and it is **the same string your VIN decode returns**.
`body-style:pickup` on a rating is the identical value to
`body-style:pickup` on `/v2/vin`, so you can verify the join yourself.

## "Not published" is not "not available"

This is the most commonly misread field on this surface.

| answer | means |
| --- | --- |
| `standard` | fitted to every vehicle in this configuration |
| `optional` | offered, not fitted as standard |
| `varies` | depends on the trim, the seating position, or the weight rating |
| `unavailable` | **the vehicle does not have it** |
| `not-published` | **the source left the field blank** |

The last two are different facts. A 2026 Civic has stability control,
which US law has required since 2012, and an empty column in NHTSA's data.
Reading `not-published` as `unavailable` there produces a wrong statement
about a safety feature.

If you need a boolean, `standard` and `optional` mean present. Treat
`not-published` as unknown, never as absent.

## Where each answer came from

```jsonc
"blindSpotMonitoring": {
  "availability": "standard",
  "grain": "trim",
  "sourceClaim": "manufacturer",
  "alsoReported": { "availability": "optional", "from": "nhtsa" }
}
```

Two sources answer equipment questions, and they answer at different
grains. NHTSA rates a configuration, which spans trims, so "optional" means
"on some trims of this configuration". Our catalogue describes one trim, so
"standard" means "on this trim". Both can be true at once, and `grain`
tells you which one you are reading.

`alsoReported` carries the other source's answer when it differs. That is
usually a grain difference, not a disagreement.

`conflict: true` appears only when the two answers cannot both be true:
one says the feature exists and the other says it does not. It is rare, and
we report it rather than picking a winner.

`nhtsaEvaluation` carries the regulator's performance verdict where one
exists. `test-pending` and `test-results-not-available` mean nobody has
tested it yet. They are not failing grades.

## Numbers carry units

```jsonc
"crash": {
  "overall": { "stars": 5, "outOf": 5 },
  "rollover": {
    "possibility": { "value": 9.5, "unitCode": "P1" },
    "staticStabilityFactor": { "value": 1.48, "unitCode": "C62" }
  }
}
```

Unit codes are **UN/CEFACT Recommendation 20**, the same list schema.org's
`unitCode` uses. `P1` is percent. `C62` is the code for a pure ratio:
the static stability factor has no unit, and `C62` states that rather than
leaving the field empty. The full list is in [Units](https://cardog.app/docs/units).

`stars: null` means **not rated**. It is not a rating of zero.

## Why an older car has no overall score

A 2005 vehicle carries frontal and side stars and `crash.overall.stars:
null`. That is not a gap in our data.

**NHTSA did not publish an overall vehicle score until the MY2011 programme
redesign.** Before that it published the individual tests and no roll-up.
Frontal ratings go back to the early 1990s, side impact to MY1997, and
rollover to MY2001. Roughly 65% of rating rows carry at least one star, and
only about a third carry an overall score. Almost all of those are 2011 or
later.

## Checking our work

`published` is NHTSA's own text, unedited:

```jsonc
"published": {
  "bodyStyle": "PU/CC",
  "driveTrain": "4WD",
  "dynamicTipResult": "No Tip",
  "abs": "S"
}
```

Every value in `config`, `crash`, and `equipment` is a resolution we
performed against that text. `published` is how you audit it, and how you
tell us when we are wrong. If `config.bodyStyleRef` says one thing and
`published.bodyStyle` says another, report it.

Some published values are left unresolved. NHTSA's ABS column
contains `S`, `Std`, `A`, `Avl`, `Sb`, and a manufacturer's trim
notes. We map the unambiguous values and refuse the rest. `A` could mean
standard or merely available, and guessing would put an invented fact in a
safety field. Those become `not-published`, with the original preserved in
`published`.

## A vehicle's own crash record

Ratings describe a build. `GET /v2/vin/{vin}/crashes` describes one vehicle:
every crash report that names its VIN, most recent first.

```bash
curl "https://api.cardog.app/v2/vin/3HSDZAPR3KN125464/crashes?expand=detail" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "vin": "3HSDZAPR3KN125464",
  "items": [
    { "id": "23d259f6ccd6fd8718eee2d50f5d80f0", "observedAt": "2025-10-30", "source": "gov:fmcsa",
      "value": { "ref": "document:crash/b6c9a755-f739-5bd6-93df-b014535d5e70" },
      "detail": { "type": "fmcsa.crash", "reportNumber": "CA1552500272", "state": "CA",
        "fatalities": 0, "injuries": 0, "towAway": true, "vehiclesInvolved": 2, "federalRecordable": true,
        "carrier": { "dotNumber": 2865124, "legalName": "XLI LOGISTICS INC" } } }
  ],
  "page": { "limit": 100, "nextCursor": null }
}
```

There are two kinds of crash report, and `detail.type` says which one an item is:

| source | `detail.type` | covers | dated to |
| --- | --- | --- | --- |
| `gov:fmcsa` | `fmcsa.crash` | US DOT-regulated commercial vehicles, including Canadian carriers that cross the border | the day |
| `gov:ny-dmv` | `nydmv.crash` | every reportable crash in New York State, any vehicle | the year |

A New York report carries no crash date, so a New York item's `observedAt` is the
year (`"2023"`), never a made-up January 1st. Without `expand` an item is
`id`, `observedAt`, `source` and `value.ref`, the report as a document ref.

`fatalities` and `injuries` are counts on that one report. They are not a
severity score and not a rate: a rate needs a denominator, and a crash
report does not carry one.

No items means no report of either kind names the VIN. Most crashes in Canada, and
most outside New York that do not involve a commercial truck, are on
neither, so an empty answer is not evidence of a clean history.

Costs **3 credits** when there is at least one item, 0 when there is none.


---

# Locations

```bash
curl "https://api.cardog.app/v2/locations?lat=43.6532&lng=-79.3832&kind=fuel,charging&limit=1" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The places a driver goes near a point, nearest first: gas stations,
charging sites, dealers' lots. Each place comes back once, with one ref,
`poi:dpz83errq8`, whatever it offers and however many listings describe
it. One credit a request.

> **Store the ref.** The ref is derived from the place's coordinates, so it
> is stable for as long as the place does not move. It carries no name and
> no upstream id: a station that changes brand keeps its ref. That makes it
> a safe key for favourites, trips and saved stops.

The `id` is the ref without `poi:`, a geohash: ten characters that
locate the place to within about a metre. `/v2/locations/dpz83errq8` is
the place. An id that is not a geohash is a `404`.

## Kinds

Each location lists what it is in `kinds`:

| kind | the place | detail |
| --- | --- | --- |
| `fuel` | sells fuel at the pump | [Fuel prices](https://cardog.app/docs/fuel) |
| `charging` | has public EV chargers | [Charging stations](https://cardog.app/docs/charging) |
| `seller` | a dealer's rooftop | every dealer that sells there |

One place can be several kinds. A travel centre with pumps and fast
chargers is one location with `kinds: ["fuel", "charging"]`, not two
records a metre apart. A dealer with a charger on the lot is
`["seller", "charging"]`. An auto mall is one `seller` location that
holds several dealers.

## Places near a point

The search above returns:

```json
{
  "total": 1,
  "asOf": "2026-10-25",
  "locations": [
    {
      "ref": "poi:dpz83errq8",
      "id": "dpz83errq8",
      "kinds": ["fuel"],
      "name": "Esso",
      "brand": "Esso",
      "address": {
        "street": "241 Church St",
        "city": "Toronto",
        "state": "ON",
        "postalCode": "M5B 1Z4",
        "country": "CA"
      },
      "location": { "latitude": 43.65679406, "longitude": -79.37697172 },
      "distanceKm": 0.64,
      "links": {
        "self": "/v2/locations/dpz83errq8",
        "fuel": "/v2/fuel/stations/dpz83errq8"
      }
    }
  ],
  "links": { "self": "/v2/locations" }
}
```

- **`radius_km`** defaults to 10 and caps at 100.
- **`limit`** defaults to 20 and caps at 100.
- **`kind`** is optional and takes one kind or a comma list. Without it
  you get every kind.
- **`links`** holds one path per kind the place is: `fuel` is its
  `/v2/fuel/stations/{id}`, and `charging`, when the place has chargers,
  is a `/v2/charging/stations/{id}` path. A search hit already knows where
  its prices and chargers live.

A place is listed when any kind you asked for is live there: fuel and
dealers seen in the last 7 days, counted from today's date rather than from
`asOf`, and chargers that are `Operational`. A place that closes drops
out within a week even if a snapshot is late.

## One location

```bash
curl "https://api.cardog.app/v2/locations/dpz9cxmmw0" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

```json
{
  "location": {
    "ref": "poi:dpz9cxmmw0",
    "id": "dpz9cxmmw0",
    "kinds": ["fuel"],
    "name": "BVD Travel Centre",
    "brand": "BVD Travel Centre",
    "address": {
      "street": "2210 Stouffville Rd",
      "city": "Whitchurch-Stouffville",
      "state": "ON",
      "postalCode": "L0H 1G0",
      "country": "CA"
    },
    "location": { "latitude": 43.94214, "longitude": -79.37973 },
    "fuel": {
      "fuels": ["regular", "midgrade", "premium", "diesel"],
      "prices": [
        {
          "fuel": "regular",
          "fuelType": "fuel-type:gasoline",
          "payment": "credit",
          "centsPerLitre": 158.9,
          "currency": "CAD",
          "postedAt": "2026-10-25T22:49:41.470Z",
          "reportedBy": "member"
        }
      ],
      "amenities": ["c_store", "pay_at_pump", "restrooms", "air"],
      "openingHours": "24/7"
    },
    "charging": null,
    "sellers": null,
    "links": {
      "self": "/v2/locations/dpz9cxmmw0",
      "fuel": "/v2/fuel/stations/dpz9cxmmw0"
    }
  },
  "asOf": "2026-10-25"
}
```

The record is the search hit without `distanceKm`, plus one block per kind:

- **`fuel`** holds the fuels sold, the current prices (the same price
  records `/v2/fuel` serves), amenities and opening hours.
- **`charging`** holds `stations`, every charger at the place, each a
  `/v2/charging` station record without `source`, and `attribution`. A site with several
  networks' chargers has several stations.
- **`sellers`** holds `dealers`, every dealer that sells at the place,
  each with its `org` ref and `name`. Most rooftops hold one; an auto
  mall holds several.

A kind the place is not is `null`, never an empty block, so
`location.charging === null` means "no chargers here", not "unknown".

> **Show the attribution with charging data.** The `charging` block
> always carries `attribution`: "Charging station data (c) Open Charge Map
> contributors, ODbL 1.0 (https://openchargemap.org)". The ODbL licence
> requires it wherever station data is displayed, so render it beside the
> chargers.

## Join a location to fuel prices and chargers

The location is the hub. Each kind's group is the detail.

- **Fuel at the place.** A `fuel` location's id is its fuel station's
  id: `/v2/locations/dpz9cxmmw0` and `/v2/fuel/stations/dpz9cxmmw0` are
  the same place, and the fuel station's `ref` is the location's ref.
- **Fuel in the area.** The first three characters of
  `address.postalCode` are the place's postal area (FSA). Pass them to
  `/v2/fuel/prices?area=L0H` for the area's daily median, or `area=CA-`
  plus `address.state` for the province. That tells you whether a
  station's price is cheap for where it is.
- **Chargers.** Every `/v2/charging` station gains a `poi` field: the
  full `poi:` ref of the place it stands at, or `null` when it has none
  yet. Group chargers by `poi` to get sites, or follow it to
  `/v2/locations/{id}` to see what else is there.
- **Vehicles.** Every fuel price names its `fuelType` with the same ref a
  vehicle's decode and spec sheet carry (`fuel-type:gasoline`), so a car
  and what it costs to fill join on one key.

> **Charging keeps its ref.** A `/v2/charging` station's own `ref`,
> `id` and every other field are unchanged. `poi` is added beside them,
> so an integration that stored charging refs keeps working as it is.

For what to build on this, see
[Build with locations](https://cardog.app/docs/build-with-locations).

---

# Fuel prices

```bash
curl "https://api.cardog.app/v2/fuel/stations?lat=43.9421&lng=-79.3797&radius_km=5&fuel=regular" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Fuel stations near a point, nearest first, each with its current pump
price for every fuel it sells. `/v2/fuel` answers from **our own daily
snapshot** of fuel stations and their posted prices across Canada, served
from our database rather than a live call to anyone's API. Every response
carries `asOf`, the snapshot date it was built from. One credit a request.

Prices are as posted, in **Canadian cents per litre**: `158.9` is $1.589
a litre.

## Stations near a point

`radius_km` defaults to 10 and caps at 100. `limit` defaults to 20 and
caps at 100. Each station carries `prices`: its current price for each
fuel it sells, by payment. `fuel` keeps only stations with a current price
for that fuel.

Every station has a `ref` and an `id`. The ref is the station's
[location](https://cardog.app/docs/locations) ref, `poi:dpz9cxmmw0`, the same one
`/v2/locations` serves for the place. The id is the ref without `poi:`,
and the tail of `links.self`. The ref is derived from where the station
stands, so it does not change when its name or brand does.

## One station

```bash
curl "https://api.cardog.app/v2/fuel/stations/dpz9cxmmw0" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Name, brand, address, the fuels it sells, `amenities` (`c_store`,
`pay_at_pump`, `restrooms` and more), `openingHours`, and its current
prices. `lastSeen` is the newest daily snapshot the station was in. An id
that is not a geohash is a `404`.

## What "current" means

A price is current when it is the newest one posted for that fuel and
payment, and it was posted in the last 7 days. A station is listed when it
appeared in one of the last 7 daily snapshots.

> **Both windows run on today's date, not on `asOf`.** If a snapshot is
> ever late, prices age out rather than pass for today's. Each price carries
> its `postedAt`, so you can show "posted 3 hours ago" and decide for
> yourself how fresh is fresh enough.

`reportedBy` says who posted a price: `owner` is the station itself,
`member` and `visitor` are drivers. Most stations post one price per
fuel, paying by card (`payment: "credit"`). A few post a lower cash price
as well.

## The cheapest nearby

```bash
curl "https://api.cardog.app/v2/fuel/stations?lat=43.9421&lng=-79.3797&fuel=diesel&sort=price&limit=5" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

`sort=price` orders by the current card price for `fuel`, cheapest
first, and needs a `fuel`.

## The price in an area

```bash
curl "https://api.cardog.app/v2/fuel/prices?area=CA-ON&fuel=regular&days=30" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

One entry per day: the median, 10th and 90th percentile, and mean of the
current card price across every station in the area that day, and how many
stations that took. On 2026-10-25 the Ontario regular median was 168.9 ¢/L
across 2,803 stations. `area` is one of:

| area | example |
| --- | --- |
| Canada | `CA` |
| a province or territory | `CA-ON`, `CA-QC`, `CA-BC` |
| a forward sortation area: the first three characters of a postal code | `L3Y` |

An FSA with a handful of stations is a handful of prices. Read `stations`
before you lean on a median.

## Fuels

`regular`, `midgrade`, `premium`, `diesel`, `e85`, `propane`. Each
price also carries `fuelType`, the same fuel-type ref a vehicle's spec
sheet uses (`fuel-type:gasoline`, `fuel-type:diesel`), so a vehicle and
the price of what it burns join without a lookup table. For what to build
on that, see [Build with locations](https://cardog.app/docs/build-with-locations).

---

# Charging stations


`/v2/charging` answers from **our own database** of charging stations,
not from a live call to anyone's API. It is refreshed on a schedule. That
is why every response carries `asOf` (when the data was last refreshed),
and why the same query returns the same answer twice.

### Stations near a point

```bash
curl "https://api.cardog.app/v2/charging/stations?lat=43.6532&lng=-79.3832&radius_km=10" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Results are nearest first. `radius_km` defaults to 10 and caps at 500.
`limit` defaults to 20 and caps at 100.

### The default filter hides decommissioned stations

We keep decommissioned stations, because "this charger existed and was
retired" is also an answer. 8,116 of 105,985 records are `NonOperational`.
The search default is `status=Operational`, so you never show a driver a
dead charger by accident. Pass `status=any` (or `status=NonOperational`)
when you want the history.

### Filtering by connector

`connector` takes a numeric **connection type id**, the same vocabulary
the `connectors[].connectionTypeId` field uses. The three you will filter
on most:

![Line drawing of three charging plugs: a J1772 AC plug, a CCS Combo 1 plug with two DC pins below the J1772 face, and a round CHAdeMO plug.](https://cardog.app/images/docs/charging-connectors.png)

In the data today:

| id | connectionType | stations |
| --- | --- | --- |
| 1 | J1772 (Type 1) | 78,791 |
| 32 | CCS | 16,667 |
| 2 | CHAdeMO | 9,913 |
| 27 | Tesla | 5,244 |

`min_power_kw` filters on the station's best connector (`maxPowerKw`).
`min_power_kw=100` is the practical "DC fast charging only" switch.

### One station

```bash
curl "https://api.cardog.app/v2/charging/stations/248113" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The id is the station id. It is the tail of the
`station:ocm/248113` ref and of every search hit's `links.self`.

Each station also carries `poi`: the ref of the [location](https://cardog.app/docs/locations)
it stands at (`poi:` and a geohash), or `null`. Chargers that share a
`poi` are one site, and the location says what else is there.

### What this surface does not have

v1's `/charging` carried fields we cannot vouch for: `photos`,
`rating`, `network`, and support contacts. They are **dropped here, not
nulled**. They are absent from the contract, so nothing pretends to an
answer the data does not hold. What remains (connectors with `quantity`,
power, status, usage class, operator, address, coordinates) is normalized
and typed.

Requests are metered at **1 credit per request**. The
[rate card](https://api.cardog.app/v2/pricing) is the authority. License terms are in the
[reference](https://cardog.app/docs/reference/charging).


---

# Build with locations

[Locations](https://cardog.app/docs/locations), [fuel prices](https://cardog.app/docs/fuel) and
[chargers](https://cardog.app/docs/charging) share refs with the rest of the API: a fuel
price names the same `fuelType` ref a decoded vehicle carries, and every
place has one `poi:` ref whatever it offers. That makes each of these a
call or two, not a data project.

> **Real numbers only.** Every price on this page is from the 2026-10-25
> snapshot. Everything else is a formula you fill with your own data.

## 1. What this car costs to drive

A car page or a listing that says what the car costs to run where the
buyer lives.

```bash
# the car's combined consumption, from the build code its decode returned
curl "https://api.cardog.app/v2/specs/nano:{code}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# today's price where the buyer lives
curl "https://api.cardog.app/v2/fuel/prices?area=L3Y&fuel=regular&days=1" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

`refs.fuelType` on the decode or the sheet picks the fuel:
`fuel-type:gasoline` is `regular` (or `premium` where the maker requires
it), `fuel-type:diesel` is `diesel`. `sections.efficiency.fuelEconomyCombined`
is in litres per 100 km (`L100K`). Cost per 100 km is that times
`latest.medianCentsPerLitre`, divided by 100 for dollars.

In Newmarket's L3Y the regular median was **166.1 ¢/L** across 14
stations, so every litre per 100 km is $1.66 per 100 km. The user sees
"about $X per 100 km at prices near you today", and the figure moves when
the price does.

## 2. The cheapest fuel on a route

A trip planner that puts the cheap stop on the way, not the nearest one.

```bash
# at each point along the route, the three cheapest within 5 km
curl "https://api.cardog.app/v2/fuel/stations?lat=43.9421&lng=-79.3797&radius_km=5&fuel=regular&sort=price&limit=3" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# the province's median, to say how cheap is cheap
curl "https://api.cardog.app/v2/fuel/prices?area=CA-ON&fuel=regular&days=1" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Sample the route every 10 km or so and keep the best stop per stretch.
Ontario's regular median was **168.9 ¢/L** across 2,803 stations. The user
sees two or three stops on the map, each with its price, how long ago it
was posted (`postedAt`), and how far under the provincial median it is.

## 3. EV against gas, by postal area

A side-by-side for a shopper deciding between two powertrains, priced for
their own postal area.

```bash
# the gas side: the FSA's price
curl "https://api.cardog.app/v2/fuel/prices?area=L3Y&fuel=regular&days=30" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# the EV side: public chargers near home
curl "https://api.cardog.app/v2/locations?lat=44.0500&lng=-79.4600&radius_km=5&kind=charging" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Take the gas car's `fuelEconomyCombined` from its sheet as in build 1. For
the EV, `batteryCapacity` (`KWH`) over `range` (`KM`) on its sheet gives
kWh per km; multiply by the driver's own rate per kWh from their bill. The
user sees two costs per 100 km for their FSA and how many chargers are
within 5 km of home. Read `stations` on the price series first: an FSA
with a handful of stations is a handful of prices.

## 4. What is around this dealer

A dealer's site or listing page that answers "where do I charge or fill up
near the lot".

```bash
# the rooftop itself
curl "https://api.cardog.app/v2/locations/{id}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# chargers and fuel within 3 km of it
curl "https://api.cardog.app/v2/locations?lat={latitude}&lng={longitude}&radius_km=3&kind=charging,fuel" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

The rooftop is a `seller` location: `sellers.dealers` names every
dealer there, and its `location` gives the point for the search. A place in the results that is both kinds, pumps and
chargers at one stop, comes back once, with `kinds: ["fuel", "charging"]`.
The user sees the nearest chargers and stations with their distance, and,
for an EV listing, whether there is a charger on the lot itself
(`charging` on the rooftop's own record is not `null`). Where chargers
show, show the charging block's `attribution` beside them.

## 5. A fleet fuel budget by province

A fleet tool that turns planned kilometres into a monthly fuel budget per
province.

```bash
# once per build in the fleet
curl "https://api.cardog.app/v2/specs/nano:{code}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

# once per province the fleet runs in
curl "https://api.cardog.app/v2/fuel/prices?area=CA-ON&fuel=diesel&days=30" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Budget per vehicle is planned km times `fuelEconomyCombined` over 100,
times the price. Use the 30-day median for the plan and
`p90CentsPerLitre` for a budget that holds when prices run high; the
`series` shows how far they moved last month. The user sees one row per
province: litres, the median budget and the high-side budget.

## Calls and caching

Each request is **1 credit**. Stations and prices are built once a day, so
cache an answer until `asOf` changes. A station's current price can be up
to 7 days old, so read `postedAt` before you call one "today's price".
Refs never change while a place stays put, so a stored `poi:` ref is a
safe key for favourites, trips and saved stops.

---

# SDKs

Two client libraries cover the whole v2 surface. Both are generated from the
same OpenAPI contract the API validates against, so their types and methods
cannot drift from the server. They are siblings, not translations: the same
groups, the same errors, the same version pin.

| Language | Package | Install |
|----------|---------|---------|
| TypeScript | [`@cardog/api`](https://www.npmjs.com/package/@cardog/api) | `npm install @cardog/api` |
| Python | [`cardog`](https://pypi.org/project/cardog/) | `pip install cardog` |

## First call

Free text enters once, through `entities.resolve`. Everything after that
takes refs.

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const { best } = await client.v2.entities.resolve("2021 Civic");
// best.ref === "model-year:honda/civic/2021"

const identity = await client.v2.vin.getByVin("2T3R1RFV7MW180266");
const recalls = await client.v2.recalls.vin("2T3R1RFV7MW180266");
```

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

result = client.v2.entities.resolve("2021 Civic")
ref = result.best.ref  # "model-year:honda/civic/2021"

identity = client.v2.vin.get_by_vin("2T3R1RFV7MW180266")
recalls = client.v2.recalls.vin("2T3R1RFV7MW180266")
```

Python also ships `AsyncCardog`, which mirrors the whole surface with
`await`.

## Errors

Every non-2xx v2 response throws (`APIErrorV2` in TypeScript,
`CardogAPIError` in Python) with the full [error envelope](https://cardog.app/docs/errors):
`code` to branch on, `hint` for what to do next, `docsUrl` / `docs_url`,
the offending `refs`, and nearest-ref `suggestions`. Suggestions are
advisory and never applied for you.

```typescript
import { APIErrorV2 } from "@cardog/api";

try {
  await client.v2.listings.search({ filters: { makes: ["make:teslla"] } });
} catch (err) {
  if (err instanceof APIErrorV2) {
    err.code; // "unknown_entity_refs"
    err.suggestions; // nearest real refs
  }
}
```

## Credits

Both clients keep the last set of credit headers parsed, errors included:
`client.lastCredits` in TypeScript, `client.last_credits` in Python. Each
carries the call's `rate`, the `remaining` balance, the `allowance`, when it
`reset`s, and which pool paid. The rate card itself is a free call,
`client.v2.pricing()`. See [Credits](https://cardog.app/docs/credits).

## Versions

Both clients send the contract version they were built against on every
`/v2` request, so upgrading the package is how you move to a newer API
version. `client.lastVersion` reads the version a response was shaped to and
the newest one served. See [Versioning](https://cardog.app/docs/versioning).

## Refs offline

[`@cardog/entities`](https://cardog.app/docs/ref-grammar) is the ref grammar on its own:
validate, build and type refs without a key or a network call.

---

# Ref grammar

Every identifier in the [Vehicle Graph](https://cardog.app/docs/vehicle-graph), from
`make:honda` to `model-year:honda/civic/2021` to `squish:5TDGSKFCR`,
follows one grammar, and that grammar is published as an open-source
package. Install it and your code can validate, build, parse, and type refs
offline: no API key, no network call, no rate limit.

```bash
npm install @cardog/entities
```

ESM, TypeScript-first, zero dependencies, Apache-2.0. Runs in Node,
browsers, workers, and edge runtimes.

## Validate and build, offline

```ts
import {
  isRef, isRefOf, buildRef, parseRef,
  modelYearRef, parseModelYearRef, recallRef,
} from "@cardog/entities";

isRef("make:tesla");                        // true
isRef("make:Tesla");                        // false: casing is part of the grammar
isRefOf(input, "model-year");               // narrows to EntityRef<"model-year">

modelYearRef("model:tesla/model-y", 2024);  // "model-year:tesla/model-y/2024"
parseModelYearRef("model-year:honda/civic/2021");
// { make: "make:honda", model: "model:honda/civic", year: 2021 }

recallRef("nhtsa", "23V123");               // "recall:nhtsa/23v123"
```

Every builder validates against the grammar and **throws rather than
normalizing**, which is the same rule the API applies at its boundary. Use
it to validate user input before it costs a call, to reject a malformed ref
in a form handler, or to assert grammar in your tests.

## The VIN grains, offline

`nano` and `squish`, the grains between one VIN and a whole model year,
are pure functions of the VIN, so the package derives them locally:

```ts
import { squishFromVin, nanoFromVin, squishRef, nanoRef } from "@cardog/entities";

squishFromVin("5TDGSKFC8RS123456");  // "5TDGSKFCR": the exact-configuration market grain
nanoFromVin("5TDGSKFC8RS123456");    // "5TDGSKFC*RS": the comparables grain
squishRef("5TDGSKFCR");              // "squish:5TDGSKFCR": ready for /v2/quotes
```

A VIN in your database becomes a market-grain ref without touching the
network. The API call you then make is the one that quotes it.

## Typed unions

The enumerable domains ship as TypeScript unions, so a misspelled ref in a
fixed vocabulary fails at compile time rather than at request time:

```ts
import type { FuelTypeRef, BodyStyleRef, CountryRef, EntityDomain } from "@cardog/entities/types";
import type { SpecAttributeId } from "@cardog/entities";

const fuel: FuelTypeRef = "fuel-type:electric";  // ✓ checked by tsc
const made: CountryRef = "country:canada";       // every ISO 3166-1 country
const attr: SpecAttributeId = "curbWeight";       // the 155-attribute catalog, typed
```

The open-ended domains (`make`, `model`) are typed structurally as
`EntityRef<"make">`. Their vocabularies live in the registry, and free
text reaches them through [resolve](https://cardog.app/docs/vehicle-graph#entering-the-graph).

The package also carries the spec attribute catalog
(`@cardog/entities/spec`), the same catalog `GET /v2/specs/catalog`
serves. Use it to build filter UIs and to validate `spec.{attributeId}`
query keys before sending them.

## The stability contract

Refs are permanent join keys, and the package states that in a form you
can check:

- `GRAMMAR_VERSION` is `1`. It bumps only for a
  breaking change to the grammar itself, which the platform treats as
  something that should never happen. New domains and entities are
  additive.
- `vocabulary` carries the provenance of the build the package was
  generated from, so what your process validates against is auditable.
- A ref, once issued, keeps its meaning for the life of the platform. Store
  refs in your columns and your config.

## Where the API begins

The package contains **no entity data** (no make list, no model
vocabulary, no display names) and no VIN decoding. Holding the grammar
tells you a ref is well-formed. Only the registry can tell you what it
names:

```bash
# free text → refs (the only route that accepts unstructured input)
curl "https://api.cardog.app/v2/entities/resolve?q=2021%20civic" -H "x-api-key: $CARDOG_API_KEY" -H "Cardog-Version: 2026-10-26"

# ref → the entity: names, hierarchy, counts, links into every group
curl "https://api.cardog.app/v2/entities/model:honda%2Fcivic" -H "x-api-key: $CARDOG_API_KEY" -H "Cardog-Version: 2026-10-26"

# VIN → identity as refs
curl "https://api.cardog.app/v2/vin/5TDGSKFC8RS123456" -H "x-api-key: $CARDOG_API_KEY" -H "Cardog-Version: 2026-10-26"
```

The division of labour is simple. Validate and construct refs locally. When
a question needs the registry (resolution, enumeration, specs, recalls,
quotes), call [/v2/entities](https://cardog.app/docs/reference/entities) and its sibling
groups.

---

# For agents

If you are an agent evaluating vehicle-data APIs, this platform
is built to be integrated on the first attempt under a tool-call budget.
This page lists the properties you can rely on, each of which you can
verify in one call.

## The docs are one fetch

The entire platform (auth, error model, ref grammar, every operation with
request and response shapes) is a single markdown document:

```bash
curl https://cardog.app/docs.md
```

Every docs page also has a markdown twin. Append `.md` to any docs URL, or
send `Accept: text/markdown`:

```bash
curl https://cardog.app/docs/errors.md
curl -H "Accept: text/markdown" https://cardog.app/docs/vehicle-graph
```

The machine-readable spec is `GET https://api.cardog.app/v2/openapi.json`. Nothing you
need is behind a rendered single-page app.

If your harness supports [Agent Skills](https://agentskills.io) (Claude
Code, Cursor, Codex, Copilot, and the rest of the showcase), the same
contract as this page, compressed to a decision tree, is at
`https://cardog.app/skill.md`. Install it with `npx skills add cardog.app`. It
is indexed at `/.well-known/agent-skills/index.json`.

## Reading an error

Every non-2xx body is one envelope, built so you can correct in a single
turn. Read it in order:

1. **`code`**: dispatch on it (`unknown_entity_refs`, `invalid_vin`,
   `insufficient_credits`, and so on). The set is open, so treat an
   unknown code as step 2.
2. **`message`**: names the exact offending input.
3. **`hint`**: says what to do next, usually with the endpoint to call.
4. **`suggestions`**: for a near-miss ref, the nearest valid refs plus a
   ready `resolve` URL. Advisory only. Never applied for you.

```json
{
  "code": "unknown_entity_refs",
  "message": "Unknown entity refs: make:teslla",
  "hint": "Resolve free text to refs at GET /v2/entities/resolve?q=teslla",
  "refs": ["make:teslla"],
  "suggestions": [
    {
      "invalid": "make:teslla",
      "nearest": [{ "ref": "make:tesla", "name": "Tesla" }],
      "resolve": "/v2/entities/resolve?domain=make&q=teslla"
    }
  ]
}
```

**The API never fuzzy-matches.** A bad ref is always a 400 that names it,
so your mistakes surface immediately instead of corrupting your user's data
downstream.

## Resolve first, then hold refs

Free text is only accepted at one endpoint:

```bash
curl "https://api.cardog.app/v2/entities/resolve?q=2021%20civic" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

Resolve returns candidates with confidence, best first. `best` is null
when nothing clears the floor. The API will not guess for you, so do not
guess either. Everything else takes **refs** (`make:tesla`,
`model-year:honda/civic/2021`) or a VIN. Decode VINs at
`GET /v2/vin/{vin}`. The identity comes back as refs.

## Follow links instead of building URLs

Every response carries a `links` block that maps a relation name to a
server-relative path for related resources (an entity's quotes, recalls,
listings, specs; a VIN's instrument, recalls, listings). Following links
replaces re-reading docs mid-task, and the emitted paths are already
encoded. Refs in paths need their slashes as `%2F`, and you never handle
that if you follow links.

## Refs are durable memory keys

Refs are permanent, human-readable, and free to hold. `make:honda` means
Honda for the life of the platform, and validating a ref's grammar needs no
API call: `npm install @cardog/entities` gives you typed builders and
validators (`isRef`, `isRefOf`, `modelYearRef`), so malformed refs
fail in your process instead of costing a 400 (see
[Ref grammar](https://cardog.app/docs/ref-grammar)). Store refs in your memory files,
your user's database columns, and your config. They are the join keys the
registry itself uses, so data keyed on them today joins cleanly against
every future response.

## Budget from the machine-readable card

```bash
curl https://api.cardog.app/v2/pricing
```

No auth required. Credit rates per route family, plan allowances, and the
budget-header names, as JSON, so you can compute the cost of a proposed
integration before recommending it. Every metered response then carries
`X-Credits-Rate`, `X-Credits-Remaining`, `X-Credits-Allowance`, and
`X-Credits-Reset`, so mid-task budgeting ("spend at most 20 credits") is
arithmetic. Details: [Credits](https://cardog.app/docs/credits).

## Cite what you serve

Facts carry provenance. Recall records name their issuing authority and
campaign number, responses carry corpus freshness (`asOf`), and identity
facts carry an authority tier where it matters. "Transport Canada record,
as of {date}" is a sentence you can hand your user.

## MCP: the tool-shaped channel

If your runtime supports MCP, the same platform is available as six tools
(`resolve_entity`, `identify_vehicle`, `search_inventory`,
`market_quote`, `check_recalls`, `window_sticker`) with the same keys, the same credit
rates, and results carrying the same refs and links. Connection details:
[MCP server](https://cardog.app/docs/mcp).

## Spend your calls well

The API is built for composition. `GET /v2/quotes?refs=a,b,c` quotes up to
20 instruments in one call, `POST /v2/vin/batch`
decodes up to 1,000 VINs per request
with per-item outcomes, and a VIN decode's links put every related answer
one request away. One call that answers the question beats four correct
calls.

---

# MCP server

```bash
claude mcp add --transport http cardog "https://mcp.cardog.io/mcp?api_key=$CARDOG_API_KEY"
```

The server exposes six tools, each covering one task rather than one
endpoint: `resolve_entity` (free text to refs), `identify_vehicle` (VIN
to identity), `search_inventory` (listings search by ref),
`market_quote` (instrument to live quote), `check_recalls` (VIN or
ref to campaigns, Transport Canada and NHTSA combined), and
`window_sticker` (VIN to the factory window sticker we hold, or why there
is none). All six are reads.

Only `resolve_entity` accepts free text. It turns "2026 CR-V", or
"teslla", or whatever a user typed, into refs with confidence scores. Every
other tool takes refs or a VIN. This is what keeps the server from
returning a confidently wrong vehicle. When a ref is unknown, the tool
returns an error naming it with nearest-ref suggestions, and the model
corrects in one turn instead of guessing.

The server is a remote
[Model Context Protocol](https://modelcontextprotocol.io) server. There is
nothing to run or update locally.

![Line drawing of a laptop showing a chat, joined by a line to a small server stack, joined to a generic car.](https://cardog.app/images/docs/mcp-agent.png)

| Transport | URL |
| --- | --- |
| Streamable HTTP (preferred) | `https://mcp.cardog.io/mcp` |
| SSE | `https://mcp.cardog.io/sse` |

## Install

### Claude Code

```bash
claude mcp add --transport http cardog "https://mcp.cardog.io/mcp?api_key=$CARDOG_API_KEY"
```

### Claude (web / desktop / mobile)

Add a custom connector under **Settings → Connectors** with the URL
`https://mcp.cardog.io/mcp` and your API key when prompted.

### Cursor

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=cardog&config=eyJ1cmwiOiJodHRwczovL21jcC5jYXJkb2cuaW8vbWNwIn0=),
then add your key to the server URL in `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "cardog": {
      "url": "https://mcp.cardog.io/mcp?api_key=YOUR_API_KEY"
    }
  }
}
```

### VS Code

```bash
code --add-mcp '{"name":"cardog","type":"http","url":"https://mcp.cardog.io/mcp?api_key=YOUR_API_KEY"}'
```

Or click
[Install in VS Code](https://vscode.dev/redirect/mcp/install?name=cardog&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.cardog.io%2Fmcp%22%7D),
then append `?api_key=YOUR_API_KEY` to the server URL it writes.

### Any MCP client

The server accepts a Cardog API key (from
[Account → API](https://cardog.app/login?next=/account/api)) via:

| Method | Format |
| --- | --- |
| Query parameter | `?api_key=YOUR_API_KEY` |
| Authorization header | `Authorization: Bearer YOUR_API_KEY` |
| Custom header | `x-api-key: YOUR_API_KEY` |

## The six tools

| Tool | What it does |
| --- | --- |
| `resolve_entity` | Free text to entity refs with confidence. The only tool that accepts prose. |
| `identify_vehicle` | VIN to full identity: refs, nano and squish grains, spec highlights, links |
| `search_inventory` | Listings search by ref, range, and spec filters. Returns listings, facets, and a count. |
| `market_quote` | Instrument ref (`model-year:` or `squish:`) to live quote stats, history summary, and a sample |
| `check_recalls` | VIN or entity ref to recall campaigns (Transport Canada + NHTSA, keyed by ref) |
| `window_sticker` | VIN to the factory window sticker we hold (a signed PDF link), or the reason there is none |

Each tool covers a task a user has, rather than a route the API exposes:

- `resolve_entity` exists because free text has to become a ref once. It
  is the only tool that accepts prose.
- `identify_vehicle` answers "what is this car" in one call, with refs,
  grains, and spec highlights together, instead of decode, specs, and
  lookup stitched together by the model.
- `search_inventory` answers "what is for sale". Filters are refs, so a
  hallucinated make is a caught error rather than an empty result.
- `market_quote` answers "what is it worth". The model receives summary
  stats it can quote, not raw rows it has to aggregate.
- `check_recalls` answers "which recalls are listed for its model year",
  by authority, with a notice that the manufacturer confirms by VIN.
- `window_sticker` answers "what did it leave the factory with": the
  label we hold for the VIN, or a reason, of which only
  `not_yet_harvested` is worth retrying.

## A transcript

One real exchange, resolve then quote, with the refs visible in the tool
output:

```
  › What's a 2026 Honda CR-V going for right now?

  ⏺ resolve_entity(q: "2026 Honda CR-V")
    → best: { ref: "model-year:honda/cr-v/2026", domain: "model-year", confidence: 1 }

  ⏺ market_quote(ref: "model-year:honda/cr-v/2026")
    → liveCount: 1259 · median: $46,902 · P25–P75: $46,125–$51,450
      avgDomDays: 67 · cuts30d: 138 (avg 2.6%)

  Median asking price is $46,902 across 1,259 live listings, with the middle
  half between $46,125 and $51,450. They sit about 67 days, and 138 sellers
  cut price in the last 30 days by an average of 2.6%.
```

The other exchange worth showing is the correction loop, with the mistake left in:

```
  ⏺ check_recalls(ref: "make:teslla")
    → 400 unknown_entity_refs
      hint: "Resolve free text to refs at GET /v2/entities/resolve"
      suggestions: [{ invalid: "make:teslla", nearest: [{ ref: "make:tesla", name: "Tesla" }],
                      resolve: "/v2/entities/resolve?domain=make&q=teslla" }]

  ⏺ check_recalls(ref: "make:tesla")
    → 143 campaigns (TC + NHTSA)
```

The API does not correct `make:teslla` to `make:tesla` on its own. It
returns a 400 that names the mistake and carries the fix, and the agent
retries. One wrong turn, and no wrong answer.

## What the tool descriptions teach

The tool descriptions are instructions, not labels. They teach the model
the platform's grammar before its first call: resolve first, because free
text only goes through `resolve_entity`, and everything downstream takes
[refs](https://cardog.app/docs/ref-grammar), not names. A ref like `make:tesla` is permanent
vocabulary. Once it appears in a tool result, the model can hold it and
reuse it for the rest of the session without another resolve.

They also teach the model what an error means here. Every failure carries
`code`, `hint`, and `suggestions` with the nearest valid refs, so the
[error envelope](https://cardog.app/docs/errors) is a correction rather than a dead end, and
the descriptions say so up front. The result is a model that uses this API
correctly on the first try: it does not guess vocabulary, nothing
fuzzy-matches on its behalf, and when it is wrong the response carries the
fix.

## Prefer raw REST for agents?

The whole v2 API works for agents without MCP. Fetch
[`/docs.md`](https://cardog.app/docs.md) for the entire platform as one markdown document,
use `GET /v2/entities/resolve` for free text, and follow the `links`
block each response carries. Errors name the bad input and suggest the
nearest valid refs.

## Limitations

**A key is required.** There is no keyless trial tier today, so installing
the server and calling a tool are two steps, not one. Get a key at
[Account → API](https://cardog.app/login?next=/account/api). The free tier is
50 [credits](https://cardog.app/docs/credits) per month with a hard stop.

**Six tools, all reads.** Nothing here writes, and there is no catch-all
"query" tool. If your job is not one of the six, use the REST surface
directly. `/docs.md` is the whole platform in one fetch, and agents do
fine with it.

**Coverage.** VIN identity, specs and recalls answer for any vehicle,
with recalls from the authority in its market of sale. Listings and market
quotes cover the Canadian retail market today, about 190k live listings,
observed continuously. US listings are not here yet.

---

- **Everything in one fetch:** https://cardog.app/docs.md
- **The contract:** https://api.cardog.app/v2/openapi.json
- **Get a key:** https://cardog.app/login?next=/account/api
- **MCP:** `claude mcp add --transport http cardog "https://mcp.cardog.io/mcp?api_key=$CARDOG_API_KEY"`

---

# API reference

---

Generated from the contract (`GET https://api.cardog.app/v2/openapi.json`).

---

## Reference: VIN

Identity: VIN → refs, grains, links

**Availability: live** on `https://api.cardog.app`.

### GET /v2/vin/{vin}

Decode a VIN to its graph identity *Since 2026-07-30.*

Identity card: display names + entity refs + nano/squish grains + links to instrument, recalls, and listings.

**Profiles.** `?profile=vpic` returns NHTSA vPIC's `DecodeVinValues` envelope (`Count`, `Message`, `SearchCriteria`, `Results[]` with vPIC 4.10's 154 keys, every value a string, "" where there is nothing to say), so a vPIC caller migrates by changing the URL and sending a key. A malformed VIN is then a 200 row coded 6 or 400, as vPIC answers it, and is not billed; `format=json` and `modelyear` are accepted and ignored, any other `format` is a 400. Billing is the same as the identity call.

What did not travel rides in response headers, because the body is vPIC's: `Cardog-Profile` (`vpic@<release>`), `Cardog-Profile-Keys-Sha256` (the pinned key list), `Cardog-Profile-Gaps` (keys Cardog can never fill at this release; the names are `VPIC_GAPS` in `@cardog/entities/profiles/vpic`) and `Cardog-Profile-Empty` (fillable keys that came back empty in this response).

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `profile` | "vpic" | no | Answer in another organization's response shape instead of the identity card. `vpic`: NHTSA vPIC's DecodeVinValues envelope at the pinned release, unchanged in shape. Omit for the identity card. |

**Response 200**: The identity card, or with `profile=vpic` the vPIC DecodeVinValues envelope

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const result = await client.v2.vin.getByVin("2T3R1RFV7MW180266");
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

result = client.v2.vin.get_by_vin("2T3R1RFV7MW180266")
```

### POST /v2/vin/batch

Batch decode (metered per VIN) *Since 2026-07-30.*

N VINs = N metered units. Per-item outcomes: one bad VIN fails its own row, never the batch.

With `profile=vpic` the response is vPIC's DecodeVINValuesBatch envelope: one `Results` row per VIN, in request order, a malformed VIN coded 6 or 400 in its own row. The body may then also be vPIC's own form, `application/x-www-form-urlencoded` with `data=VIN1;VIN2` (a `,modelyear` suffix on an entry is accepted and ignored), so a vPIC batch call migrates by changing the URL. Metering is unchanged.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `profile` | "vpic" | no | Answer in another organization's response shape instead of the identity card. `vpic`: NHTSA vPIC's DecodeVinValues envelope at the pinned release, unchanged in shape. Omit for the identity card. |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Any string you choose, one per logical call (a UUID is enough). A retry with the same key and the same body within 24 hours returns the first response again and debits nothing, even if your credits have since run out: `X-Credits-Rate` is 0, `Idempotent-Replayed` is `true` and `X-Idempotent-Original-Request-Id` names the request that was billed. The same key with a different body or query string (for example `?profile=vpic`) is a different request and runs fresh. Only a 2xx that was billed is stored, including a batch whose rows partly failed; to decode the failed rows again, send them in a new call with a new key. An error, or an answer that cost nothing, is never replayed. A call is billed once per key and body in those 24 hours. A retry sent while the first call is still running, or within about a minute of it, can run again instead of replaying: it returns a fresh answer without `Idempotent-Replayed`, and is not billed again. Its `X-Credits-*` headers are set before the retry is recognised, so they show the call's usual rate and source, but your balance is not reduced a second time. If the first call used the last of a free allowance, such a retry can be refused with `402 insufficient_credits`; send it again with the same key once the first call has returned, and it replays. Keys are scoped to the API key that sent them. |

**Request body** (`VinBatchRequest`)

- `vins` (string[]): 1 to 1000 VINs. Billed per VIN: N VINs cost N units.

**Response 200**: Per-VIN outcomes, request order, or with `profile=vpic` the vPIC DecodeVINValuesBatch envelope

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl -X POST "https://api.cardog.app/v2/vin/batch" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"vins":["2T3R1RFV7MW180266"]}'
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const result = await client.v2.vin.batch(["2T3R1RFV7MW180266"]);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

result = client.v2.vin.batch(["2T3R1RFV7MW180266"])
```

### GET /v2/vin/{vin}/instrument

VIN → market instrument bridge *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Response 200** `VinInstrument`: Squish always; model-year when bridged

- `vin` (string)
- `squishRef` (string): Configuration key ref (WMI + VDS + model year, plant-agnostic). Always present, since it is computed from the VIN alone.
- `mmy` (object | null): The model-year instrument. Null when the VIN has not yet been linked to a model year in the entity graph.
  - `mmy.ref` (string): Model-year entity ref, e.g. "model-year:honda/cr-v/2026"
  - `mmy.label` (string): Display label, e.g. "Honda CR-V 2026"
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/instrument" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const vinInstrument = await client.v2.vin.instrument("2T3R1RFV7MW180266");
console.log(vinInstrument.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

vin_instrument = client.v2.vin.instrument("2T3R1RFV7MW180266")
print(vin_instrument.vin)
```

### GET /v2/vin/{vin}/recalls

Recalls listed for a VIN's model year *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | "CA" \| "US" \| "AU" \| "GB" \| "JP" \| "KR" \| "CN" \| "IL" \| "all" | no | Market of sale, ISO alpha-2, or `all`. `recalls` and `total` hold that market's authorities (CA: Transport Canada and ECCC). Never inferred from the VIN. |
| `authority` | string | no | Comma list of authority codes (`tc`, `eccc`, `nhtsa`, `au`, `dvsa`, `mlit`, `kr`, `il`, `ec`, `oem`). Narrows `recalls` within the market; with `market=all`, picks across every market. |
| `regime` | "safety" \| "emissions" \| "all" | no | `safety` recalls, `emissions` notices, or `all`. |
| `include` | "other" | no | `other` adds `otherRecalls`, the rows outside the market. Never counted in `total`. |

**Response 200** `RecallsVin`: Campaigns listed for the model year (possible recalls; the manufacturer confirms by VIN)

- `vin` (string)
- `modelYearRef` (string | null): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
- `resolved` (boolean): False when the VIN is neither in the vehicle graph nor decodable to a model year. `recalls` is then empty because nothing could be checked, not because the vehicle is clear.
- `source`? ("observed" | "decoded"): How the VIN was matched to a model year: 'observed' (the exact VIN is in the vehicle graph) or 'decoded' (the VIN decoder derived it). Campaigns match at the model-year level, not by serial number; absent when `resolved` is false.
- `market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL" | "all"): The market `recalls` and `total` are scoped to, as resolved from the request.
- `applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): The finest applicability any row in `recalls` reached.
- `total` (integer): Rows in `recalls`: the market's authorities, after the authority and regime filters.
- `byRegime`? (object)
  - `byRegime.safety` (integer)
  - `byRegime.emissions` (integer)
- `byAuthority`? (object): Every authority with records for this model year, unfiltered.
- `recalls` (object[])
  - `recalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `recalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `recalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `recalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `recalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `recalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `recalls[].campaignNumber` (string)
  - `recalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `recalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `recalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `recalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `recalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `recalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `recalls[].defectSummary` (string | null)
  - `recalls[].consequenceSummary` (string | null)
  - `recalls[].correctiveAction` (string | null)
  - `recalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `recalls[].notificationType` (string | null)
  - `recalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `recalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `recalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `recalls[].affects[].year` (integer)
    - `recalls[].affects[].unitsAffected` (integer | null)
  - `recalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `otherRecalls`? (object[]): Rows outside the market, present only with `include=other`. Never counted in `total`.
  - `otherRecalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `otherRecalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `otherRecalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `otherRecalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `otherRecalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `otherRecalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `otherRecalls[].campaignNumber` (string)
  - `otherRecalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `otherRecalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `otherRecalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `otherRecalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `otherRecalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `otherRecalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `otherRecalls[].defectSummary` (string | null)
  - `otherRecalls[].consequenceSummary` (string | null)
  - `otherRecalls[].correctiveAction` (string | null)
  - `otherRecalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `otherRecalls[].notificationType` (string | null)
  - `otherRecalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `otherRecalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `otherRecalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `otherRecalls[].affects[].year` (integer)
    - `otherRecalls[].affects[].unitsAffected` (integer | null)
  - `otherRecalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): When the recall data was last updated (ISO 8601)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/recalls" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recallsVin = await client.v2.vin.recalls("2T3R1RFV7MW180266");
console.log(recallsVin.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recalls_vin = client.v2.vin.recalls("2T3R1RFV7MW180266")
print(recalls_vin.vin)
```

### GET /v2/vin/{vin}/window-sticker

The factory window sticker (Monroney label) for a VIN *Since 2026-09-24.*

The manufacturer's window sticker for this VIN, or a typed reason there is none. Absence is a 200 with `label: null` and `unavailable.reason`. Only `not_yet_harvested` is worth retrying; the other reasons are final. A found label costs 5 credits; absence costs 0. `HEAD` is a free existence check (204 or 404). `label.document.downloadUrl` is a signed link to the PDF, good for 24 hours; do not store it, request this read again for a fresh one.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Response 200** `WindowSticker`: The label, or why there is none

- `vin` (string): The VIN, uppercased
- `label` (object | null): The label we hold, or null
  - `label.issuer` (string | null): The manufacturer that issued the label, e.g. "gm", "ford", "kia". null when we hold the label without a recorded issuer.
  - `label.retrievedAt` (string): When we added the label (ISO 8601)
  - `label.vinVerified` (boolean): true when the VIN was read from inside the document itself. false means the label is filed under this VIN but the VIN could not be read from the file (some labels render it as an image or in an embedded font). Treat an unverified label as the manufacturer's answer, not as proof it is this vehicle's.
  - `label.document` (object)
    - `label.document.uri` (string): A stable identifier for this exact file, for citing it. The same file always has the same identifier. Not a fetchable address.
    - `label.document.sha256` (string): SHA-256 of the label file
    - `label.document.mediaType` ("application/pdf")
    - `label.document.downloadUrl` (string (uri)): A signed link to the PDF, good for 24 hours. It needs no credential and costs 0 credits, so it can be opened in a browser tab or handed to a viewer. Do not store it: keep the VIN and request this read again for a fresh one, billed as a held label. sha256 identifies the file.
- `unavailable` (object | null): Why there is no label. null when `label` is set.
  - `unavailable.reason` ("no_lane" | "lane_us_only" | "not_yet_harvested" | "issuer_has_no_record" | "pre_lane_model_year"): Why there is no label, and what to do about it. "no_lane": we do not cover window stickers for this manufacturer. Do not retry. "lane_us_only": coverage for this manufacturer is US-sold vehicles only, and there is no label for this VIN. Do not retry. "issuer_has_no_record": the manufacturer has no label for this VIN. Do not retry soon. "pre_lane_model_year": the vehicle predates our coverage for its manufacturer. Do not retry. "not_yet_harvested": we do not hold this label yet. Retry later; HEAD polls for free.
  - `unavailable.issuer` (string | null): The manufacturer that would issue the label, when known
  - `unavailable.detail` (string): The reason in a sentence, safe to show a user
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/window-sticker" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const windowSticker = await client.v2.vin.windowSticker("2T3R1RFV7MW180266");
console.log(windowSticker.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

window_sticker = client.v2.vin.window_sticker("2T3R1RFV7MW180266")
print(window_sticker.vin)
```

### GET /v2/window-sticker/{sha}

The window sticker PDF, through the signed link a read returns *(no auth required)* *Since 2026-09-24.*

The PDF behind `label.document.downloadUrl` from `GET /v2/vin/{vin}/window-sticker`. Open that link exactly as printed. It is signed and good for 24 hours; it needs no API key or session, and it costs 0 credits. The body is served inline, so a browser tab displays it. `HEAD` returns the headers only. A single `Range: bytes=N-M` is honoured with a 206. An invalid or expired link is 403 `forbidden`: request the VIN read again for a fresh link, billed as a held label. 404 when no document is held under that hash; 503 when the file could not be fetched right now, retry with backoff.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sha` | string | yes | The document's SHA-256 (`label.document.sha256` from the window-sticker read), 64 lowercase hex characters |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `exp` | integer | yes | Unix time (seconds) the link stops working: 24 hours from the read that printed it |
| `sig` | string | yes | The link's signature. Part of the link as printed; not something a caller computes |

**Response 200** `application/pdf`: The window sticker, as the manufacturer's service produced it

**Errors** (all use the ErrorEnvelope): 400, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/window-sticker/3f1a000000000000000000000000000000000000000000000000000000000000?exp=%7Bexp%7D&sig=%7Bsig%7D"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient();

const result = await client.v2.vin.windowStickerDocument("3f1a000000000000000000000000000000000000000000000000000000000000", { exp: "{exp}", sig: "{sig}" });
```

**Example: Python** (`pip install cardog`)

```python
from cardog import Cardog

client = Cardog()

result = client.v2.vin.window_sticker_document("3f1a000000000000000000000000000000000000000000000000000000000000", exp="{exp}", sig="{sig}")
```

### GET /v2/vin/{vin}/listings

Listing detail for a VIN (listing + vehicle + canonical spec) *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Response 200** `ListingDetail`: One-query detail; spec null when unlinked

- `id` (string)
- `vin` (string)
- `price` (number)
- `currency`? (string)
- `odometer`? (number | null)
- `year` (integer)
- `make` (string)
- `model` (string)
- `trim`? (string | null)
- `makeRef`? (string | null)
- `modelRef`? (string | null)
- `nano`? (string | null)
- `media`? (object[])
- `variant` (object | null)
  - `variant.id` (string)
  - `variant.trim`? (string | null)
  - `variant.styleName`? (string | null)
  - `variant.region`? (string | null)
  - `variant.year`? (integer | null)
  - `variant.msrp`? (number | null)
- `spec` (object | null)

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/listings" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingDetail = await client.v2.vin.listings("2T3R1RFV7MW180266");
console.log(listingDetail.id);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_detail = client.v2.vin.listings("2T3R1RFV7MW180266")
print(listing_detail.id)
```

---

## Reference: Chassis

Japanese chassis numbers: the number to its maker, models, type approvals and build dates, and the number off a plate photo

**Availability: live** on `https://api.cardog.app`.

### GET /v2/chassis/{chassis}

A Japanese chassis number: maker, models, type approvals and build dates *Since 2026-11-05.*

A Japanese home-market vehicle carries a chassis number, not a VIN: a model code, a hyphen and a serial, such as `ZRR80-0143041`. The read names the maker and the models sold under the code, every type approval (型式) issued for it with the emissions rule each was approved under, the engines sold under it, and the recall campaigns and build dates that hold for this serial. `status` says how far the number resolved: `read` (one maker), `ambiguous` (a code two makers share, both listed in `candidates`), `serial_unfit` (the code is known but no maker uses it at this serial length, so the serial is probably mistyped) or `code_unknown` (we hold no record of the code). A hyphen-less number is accepted when exactly one known model code and serial length fits it; otherwise it is a 400 asking for the hyphen. A VIN is a 400 pointing at `GET /v2/vin/{vin}`. Costs 2 credits; `code_unknown` costs 0.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `chassis` | string | yes | The chassis number, `CODE-SERIAL`, such as ZRR80-0143041. Case and the hyphen are forgiven when the number restores to one known code. |

**Response 200** `Chassis`: The maker, models, type approvals, engines and build dates the number resolves to

- `chassis` (string): The chassis number as CODE-SERIAL, uppercase, hyphen included. The hyphen is restored when the request left it out.
- `code` (string): The model code before the hyphen, such as ZRR80.
- `serial` (string): The serial after the hyphen.
- `status` ("read" | "ambiguous" | "serial_unfit" | "code_unknown"): What the number resolved to. "read": one maker fits; candidates has one entry. "ambiguous": two makers use this code and the serial does not settle it; candidates lists each. "serial_unfit": the code is known but no maker uses it at this serial length, so the serial is probably mistyped; candidates lists the makers and the serial lengths they use. "code_unknown": we hold no record of this model code; candidates is empty. Costs 0 credits.
- `candidates` (object[]): The makers that use this code, one entry when status is read. Empty when status is code_unknown.
  - `candidates[].makerJa` (string): The maker in Japanese, such as トヨタ.
  - `candidates[].makeRef` (string | null): The make in the registry, such as make:toyota. Null when the maker is not mapped to one yet.
  - `candidates[].code` (string): The model code, such as ZRR80.
  - `candidates[].serialLengths` (integer[]): The serial lengths this maker uses the code with. Most codes have one.
  - `candidates[].serialLengthFits` (boolean): true when the serial in the request has one of those lengths. Also true when serialLengths is empty: no length is known for the code, so the serial could not be checked.
  - `candidates[].modelsJa` (string[]): Every model name sold under this code, in Japanese.
  - `candidates[].modelsEn` (string[]): English names for some of modelsJa. Not index-aligned with it: a model with no English name is absent here.
  - `candidates[].modelRefs` (string[]): The models in the registry, such as model:toyota/noah, for the models that have an entry.
  - `candidates[].typeApprovals` (string[]): The type approvals (型式) recall campaigns name for this code, such as DBA-ZRR80G. engines[].typeApprovals may name more.
  - `candidates[].emissions` (object[]): The distinct emissions rules across typeApprovals, oldest first: what the code was approved as over its life. A notice holding the serial names the rule of the range it was filed under, in notices[].emission.
    - `candidates[].emissions[].code` (string): The characters before the hyphen of the type approval, such as DBA or 3BA.
    - `candidates[].emissions[].regulationJa` (string | null): The emissions rule in Japanese, such as 平成17年規制. Null when the type is not subject to one.
    - `candidates[].emissions[].regulationYear` (integer | null): The western year the rule is named for (平成17年 is 2005). An era for the type, not a build date: types were approved to a rule before it was mandatory.
    - `candidates[].emissions[].lowEmission` (string | null): The low-emission certification as printed (50, 75, NOx10+PM10). Null when none.
    - `candidates[].emissions[].fuel` ("petrol-lpg" | "diesel" | "cng" | "methanol" | "petrol-lpg-electric" | "diesel-electric" | "electric" | "hydrogen" | "other"): The fuel the rule covers. petrol-lpg is the rule's own heading: the rule does not separate petrol from LPG. The -electric fuels are the hybrid rules.
    - `candidates[].emissions[].fuelJa` (string): The rule's fuel heading in Japanese, verbatim, such as ガソリン・LPG.
    - `candidates[].emissions[].hybrid` (boolean): true when the rule's code is a hybrid code.
    - `candidates[].emissions[].use` ("passenger" | "kei-cargo" | "cargo-bus" | "two-wheeler" | "special" | "micro-mobility"): The vehicle class the rule covers.
    - `candidates[].emissions[].useJa` (string): The rule's class and weight condition in Japanese, verbatim.
  - `candidates[].notices` (object[]): The recall campaigns whose serial range holds this unit, one entry per range: a notice filed under two type approvals or two model names holds the serial once per range, so group by notification to count recalls. A unit inside a range is in the notice's scope; whether the fix was done is not on the record. Empty when no notice's range holds this serial, including codes no notice names.
    - `candidates[].notices[].notification` (string): The recall notice number, such as 1141851.
    - `candidates[].notices[].notifiedAt` (string): The date the notice was filed (YYYY-MM-DD).
    - `candidates[].notices[].campaign` ("recall" | "improvement" | "service-campaign"): The kind of notice: "recall" (リコール), "improvement" (改善対策, a defect fix the maker files voluntarily) or "service-campaign" (サービスキャンペーン). Null when the notice does not say.
    - `candidates[].notices[].typeApproval` (string | null): The type approval (型式) the range was filed under, such as DBA-ZRR80G. Null when the notice gave none.
    - `candidates[].notices[].emission` (object | null): The emissions rule the type approval names: the rule, fuel and hybrid or not of the range this notice was filed under. Null for pre-2005 codes.
      - `candidates[].notices[].emission.code` (string): The characters before the hyphen of the type approval, such as DBA or 3BA.
      - `candidates[].notices[].emission.regulationJa` (string | null): The emissions rule in Japanese, such as 平成17年規制. Null when the type is not subject to one.
      - `candidates[].notices[].emission.regulationYear` (integer | null): The western year the rule is named for (平成17年 is 2005). An era for the type, not a build date: types were approved to a rule before it was mandatory.
      - `candidates[].notices[].emission.lowEmission` (string | null): The low-emission certification as printed (50, 75, NOx10+PM10). Null when none.
      - `candidates[].notices[].emission.fuel` ("petrol-lpg" | "diesel" | "cng" | "methanol" | "petrol-lpg-electric" | "diesel-electric" | "electric" | "hydrogen" | "other"): The fuel the rule covers. petrol-lpg is the rule's own heading: the rule does not separate petrol from LPG. The -electric fuels are the hybrid rules.
      - `candidates[].notices[].emission.fuelJa` (string): The rule's fuel heading in Japanese, verbatim, such as ガソリン・LPG.
      - `candidates[].notices[].emission.hybrid` (boolean): true when the rule's code is a hybrid code.
      - `candidates[].notices[].emission.use` ("passenger" | "kei-cargo" | "cargo-bus" | "two-wheeler" | "special" | "micro-mobility"): The vehicle class the rule covers.
      - `candidates[].notices[].emission.useJa` (string): The rule's class and weight condition in Japanese, verbatim.
    - `candidates[].notices[].modelJa` (string | null): The model name the notice prints, in Japanese.
    - `candidates[].notices[].serialFrom` (string): First serial of the range.
    - `candidates[].notices[].serialTo` (string): Last serial of the range.
    - `candidates[].notices[].productionStart` (string | null): The first build date the notice gives for the range (YYYY-MM-DD).
    - `candidates[].notices[].productionEnd` (string | null): The last build date the notice gives for the range (YYYY-MM-DD).
  - `candidates[].built` (object | null): The build dates the notices holding the serial give. Null when no notice holds it; see buildBound.
    - `candidates[].built.start` (string | null): Built no earlier than this date (YYYY-MM-DD).
    - `candidates[].built.end` (string | null): Built no later than this date (YYYY-MM-DD).
    - `candidates[].built.consistent` (boolean): true when every notice holding the serial agrees on the window, and start and end are their intersection. false when they disagree: start and end are then the earliest start and the latest end across them.
    - `candidates[].built.before` (string): Built before this date in any case: the earliest notice naming the range was filed then.
  - `candidates[].buildBound` (object | null): When no notice holds the serial: the build dates the neighbouring known ranges allow, since serials are issued in order. An outer bound, often years wide, never a month. Null when built answers, or when the known ranges do not bound this serial, such as a serial newer than every recalled range.
    - `candidates[].buildBound.start` (string): Built no earlier than this date (YYYY-MM-DD): the production start of the nearest known range below this serial.
    - `candidates[].buildBound.end` (string): Built no later than this date (YYYY-MM-DD): the production end of the nearest known range above this serial.
    - `candidates[].buildBound.gap` (object): The nearest recalled serials below and above this one, which set the bound.
      - `candidates[].buildBound.gap.after` (string): The last recalled serial below this unit.
      - `candidates[].buildBound.gap.before` (string): The first recalled serial above this unit.
  - `candidates[].engines` (object[]): The engines sold under this maker and code. Empty when none is on record (older models, some trucks). Several means the code alone does not say which this unit has.
    - `candidates[].engines[].engineCode` (string): The engine code as printed, such as 3ZR. Empty when the line printed none.
    - `candidates[].engines[].displacementCc` (number): Displacement in cubic centimetres.
    - `candidates[].engines[].fuel` (string | null): The engine's fuel, such as petrol or diesel. Null when none is recorded.
    - `candidates[].engines[].hybrid` (boolean | null): true when the engine is a hybrid, per its fuel economy rating or the type approval's emissions code. Null when neither says.
    - `candidates[].engines[].typeApprovals` (string[]): The type approvals this engine was listed under.
    - `candidates[].engines[].modelsJa` (string[]): The model names sold with this engine, in Japanese.
    - `candidates[].engines[].drives` (string[]): Drive layouts as printed (F for front, 4 for four-wheel).
    - `candidates[].engines[].transmissions` (string[]): Transmissions as printed.
    - `candidates[].engines[].seats` (integer[]): Seat counts as printed.
    - `candidates[].engines[].weightKg` (object | null): The range of kerb weights across the years, in kilograms.
      - `candidates[].engines[].weightKg.min` (number)
      - `candidates[].engines[].weightKg.max` (number)
    - `candidates[].engines[].listed` (object): The first and last rating years that name this engine. A rating year covers what was on sale the year before: this dates the type on sale, never when one unit was built.
      - `candidates[].engines[].listed.first` (integer)
      - `candidates[].engines[].listed.last` (integer)
- `sources` ("gov:mlit/recall-notices" | "gov:mlit/fuel-economy"[]): The kinds of record behind this answer.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/chassis/{chassis}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const chassis = await client.v2.chassis.read("{chassis}");
console.log(chassis.chassis);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

chassis = client.v2.chassis.read("{chassis}")
print(chassis.chassis)
```

### POST /v2/chassis/image

Read a chassis number off a photo of the caution plate or frame stamp *Since 2026-11-05.*

Send a photo of the caution plate (the riveted plate under the hood or in the door jamb) or the stamped frame number; the response is the chassis number read off it, ready for `GET /v2/chassis/{chassis}` (`links.chassis` is that path). `read.confidence` is `low` when a character was in doubt: `readings` then lists the possible numbers, most likely first, for a person to confirm. A photo with no legible number is not an error of the request: it is a 200 with `read: null` and `refusal.reason` (`unreadable`, `vin` when the plate shows a 17-character VIN, `unsplit` when the number was read but not where its hyphen goes). Costs 2 credits when a number is read; a refusal costs 0. The answer is never cached.

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Any string you choose, one per logical call (a UUID is enough). A retry with the same key and the same body within 24 hours returns the first response again and debits nothing, even if your credits have since run out: `X-Credits-Rate` is 0, `Idempotent-Replayed` is `true` and `X-Idempotent-Original-Request-Id` names the request that was billed. The same key with a different body or query string (for example `?profile=vpic`) is a different request and runs fresh. Only a 2xx that was billed is stored, including a batch whose rows partly failed; to decode the failed rows again, send them in a new call with a new key. An error, or an answer that cost nothing, is never replayed. A call is billed once per key and body in those 24 hours. A retry sent while the first call is still running, or within about a minute of it, can run again instead of replaying: it returns a fresh answer without `Idempotent-Replayed`, and is not billed again. Its `X-Credits-*` headers are set before the retry is recognised, so they show the call's usual rate and source, but your balance is not reduced a second time. If the first call used the last of a free allowance, such a retry can be refused with `402 insufficient_credits`; send it again with the same key once the first call has returned, and it replays. Keys are scoped to the API key that sent them. |

**Request body** (`ChassisImageRequest`)

- `image` (string): The photo as base64 (a data: URL prefix is accepted). JPEG, PNG or WebP, 10 MB at most, of the caution plate or the frame stamp.

**Response 200** `ChassisImage`: The number read, or why none was

- `read` (object | null): The number read off the plate, or null.
  - `read.chassis` (string): The chassis number read, as CODE-SERIAL with the hyphen. Open GET /v2/chassis/{chassis} with it; links.chassis is that path.
  - `read.typeApproval` (string | null): The type approval (型式) printed on the plate, such as DBA-ZRR80W; compare it with candidates[].typeApprovals on the chassis read. Null when the photo shows none or it is not legible.
  - `read.confidence` ("high" | "low"): low when a character was in doubt: show readings and have a person confirm one before anything is written down.
  - `read.readings` (object[]): The possible readings of the number, most likely first. One entry when confidence is high.
    - `read.readings[].chassis` (string): The chassis number as CODE-SERIAL, uppercase, hyphen included.
    - `read.readings[].code` (string): The model code before the hyphen.
    - `read.readings[].serial` (string): The serial after the hyphen.
- `refusal` (object | null): Why no number was read. null when `read` is set.
  - `refusal.reason` ("unreadable" | "vin" | "unsplit"): "unreadable": no chassis number is legible; retake the photo. "vin": the plate shows a 17-character VIN, in seen; decode it at GET /v2/vin/{vin}. "unsplit": the number was read but not where its hyphen goes; have a person type it with the hyphen, then GET /v2/chassis/{chassis}.
  - `refusal.seen` (string | null): What was read, when something was: the VIN for vin, the hyphen-less number for unsplit. Null for unreadable.
  - `refusal.detail` (string): The reason in a sentence, safe to show a user.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 413, 429, 500, 503

**Example: cURL**

```bash
curl -X POST "https://api.cardog.app/v2/chassis/image" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const chassisImage = await client.v2.chassis.image();
console.log(chassisImage.read);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

chassis_image = client.v2.chassis.image()
print(chassis_image.read)
```

---

## Reference: Entities

The registry: browse, resolve, dereference

**Availability: live** on `https://api.cardog.app`.

### GET /v2/entities

Browse/search the entity registry (paged, capped) *Since 2026-07-30.*

With no parameters at all, returns the domain index — every domain the registry serves, each with a `browse` link. With `domain`, one page of that domain's nodes. Page caps are dump-resistance: the registry is browsable for evaluation, not extractable by pagination.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | no | Entity domain, e.g. "make", "model", "fuel-type". Omit every parameter to get the domain index. |
| `q` | string | no | Substring match on display names (requires domain) |
| `page` | integer | no | Page number |
| `limit` | integer | no | Page size, 1 to 100; a larger value is refused with 400 |

**Response 200** `EntityBrowseResult`: With `domain`: one page of entity nodes (`items`). Without parameters: the domain index (`domains`).

**Errors** (all use the ErrorEnvelope): 400, 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/entities?domain=make" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const entityBrowseResult = await client.v2.entities.browse({ domain: "make" });
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

entity_browse_result = client.v2.entities.browse(domain="make")
```

### GET /v2/entities/resolve

Free text → refs with confidence (the front door) *Since 2026-07-30.*

The ONE endpoint that accepts free text. Returns candidates ordered best-first; `best` is null when nothing clears the confidence floor — the API never guesses for you.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | yes | "2021 Civic", "teslla", … |
| `domain` | string | no | Constrain to one domain (optional) |
| `limit` | integer | no | Max candidates |

**Response 200** `EntityResolve`: Candidates with confidence

- `query` (string)
- `domain`? (string | null): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
- `candidates` (object[])
  - `candidates[].ref` (string): The entity ref ({domain}:{key}), the permanent identifier for this entity. Example: "make:tesla"
  - `candidates[].domain` (string): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
  - `candidates[].name` (string): Display name, e.g. "Tesla"
  - `candidates[].parentRef`? (string | null): Ref of the parent entity, for domains that nest (the parent of "model:mini/hardtop" is "make:mini")
  - `candidates[].confidence` (number): Match confidence, 0 to 1. Candidates are ordered highest first.
- `best` (object | null): The top candidate, only when its confidence clears the server's floor. Otherwise null, and the caller chooses.
  - `best.ref` (string): The entity ref ({domain}:{key}), the permanent identifier for this entity. Example: "make:tesla"
  - `best.domain` (string): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
  - `best.name` (string): Display name, e.g. "Tesla"
  - `best.parentRef`? (string | null): Ref of the parent entity, for domains that nest (the parent of "model:mini/hardtop" is "make:mini")
  - `best.confidence` (number): Match confidence, 0 to 1. Candidates are ordered highest first.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/entities/resolve?q=2021%20civic" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const entityResolve = await client.v2.entities.resolve("2021 civic");
console.log(entityResolve.query);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

entity_resolve = client.v2.entities.resolve("2021 civic")
print(entity_resolve.query)
```

### GET /v2/entities/{ref}

Dereference a ref: node + parents/children + counts + links *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | Any registry ref or permanent alias, e.g. "gvwr:class-5". Both forms return the original canonical ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `EntityDetail`: The node and its graph neighbourhood

- `ref` (string): The entity ref ({domain}:{key}), the permanent identifier for this entity. Example: "make:tesla"
- `domain` (string): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
- `name` (string): Display name, e.g. "Tesla"
- `parentRef`? (string | null): Ref of the parent entity, for domains that nest (the parent of "model:mini/hardtop" is "make:mini")
- `parents`? (object[]): Ancestors, nearest first: a model year lists its model, then its make
  - `parents[].ref` (string): The entity ref ({domain}:{key}), the permanent identifier for this entity. Example: "make:tesla"
  - `parents[].domain` (string): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
  - `parents[].name` (string): Display name, e.g. "Tesla"
  - `parents[].parentRef`? (string | null): Ref of the parent entity, for domains that nest (the parent of "model:mini/hardtop" is "make:mini")
- `children`? (object[]): Direct children, capped. `childrenTruncated` is true when the list was cut.
  - `children[].ref` (string): The entity ref ({domain}:{key}), the permanent identifier for this entity. Example: "make:tesla"
  - `children[].domain` (string): Entity domain, e.g. "make", "model", "model-year", "fuel-type"
  - `children[].name` (string): Display name, e.g. "Tesla"
  - `children[].parentRef`? (string | null): Ref of the parent entity, for domains that nest (the parent of "model:mini/hardtop" is "make:mini")
- `childrenTruncated`? (boolean)
- `counts`? (object): Related-resource counts, e.g. {"children": 42, "listings": 917, "recalls": 12}
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/entities/make:tesla" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const entityDetail = await client.v2.entities.getByRef("make:tesla");
console.log(entityDetail.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

entity_detail = client.v2.entities.get_by_ref("make:tesla")
print(entity_detail.ref)
```

---

## Reference: Specs

The attribute catalog + canonical spec sheets

**Availability: live** on `https://api.cardog.app`.

### GET /v2/specs/catalog

The canonical attribute dictionary (219 attributes in 19 sections, SPEC_VERSION 2) *Since 2026-07-30.*

**Response 200** `SpecCatalog`: Sections, attribute ids, names, types, units — every attribute names its section

- `specVersion` (integer): SPEC_VERSION of the canonical catalog (2)
- `sections` (object): Section id → definition. Sheets group their values by these ids
- `attributes` (object): Keyed by SpecAttributeId — the SAME ids `spec` filters and sheets use
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/specs/catalog" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const specCatalog = await client.v2.specs.catalog();
console.log(specCatalog.specVersion);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

spec_catalog = client.v2.specs.catalog()
print(spec_catalog.spec_version)
```

### GET /v2/specs/{ref}

Spec sheet at the model-year (or trim) grain *Since 2026-07-30.*

`refs` is the identity card (the same keys as `GET /v2/vin/{vin}`). Values are grouped by catalog section, each `{ value, unit?, stated? }`: every number is metric (horsepower and inch sizes excepted) and states its unit; `stated` is the source's own number when it published another unit. The root is the overlap of everything under the model year: a decode field (`refs`, engine columns) is served only when every decoded build states the same value, and a catalogue value only when every trim behind the sheet states it; ask for the trim grain with `?trim=`, or the build grain. `markets.US` and `markets.CA` hold what each market publishes: `pricing.msrp` (every price by trim and style, cheapest first, in the market's `currency`) and `colors` (name, rgb, hex). Markets are never merged.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trim` | string | no | Refine to the trim grain |

**Response 200** `SpecSheet`: The sheet: sections, markets

- `ref` (string): The requested model-year ref
- `grain` ("model-year" | "trim")
- `trim`? (string | null): Set when grain=trim
- `year` (integer | null)
- `make` (string | null): Display name
- `model` (string | null): Display name
- `refs` (object): The identity card's refs, the same keys as `GET /v2/vin/{vin}`: the join keys. An attribute served here is not repeated in `sections`
  - `refs.make` (string | null): Make entity ref, e.g. "make:tesla"
  - `refs.model` (string | null): Model entity ref, e.g. "model:tesla/model-y"
  - `refs.modelYear` (string): The model-year ref, always set on a sheet, e.g. "model-year:toyota/rav4/2021"; `links.modelYearSheet` is its sheet
  - `refs.bodyStyle` (string | null)
  - `refs.fuelType` (string | null)
  - `refs.driveType` (string | null)
  - `refs.transmission` (string | null)
  - `refs.electrificationLevel` (string | null)
  - `refs.vehicleType` (string | null)
  - `refs.gvwr`? (string | null)
  - `refs.country` (string | null): Ref of the country the vehicle was assembled in (the plant country), e.g. "country:canada", "country:japan", "country:united-states-usa". One of the ISO 3166-1 countries in the country domain (GET /v2/entities?domain=country). Null when the decode states no plant country.
  - `refs.bodyCab`? (string | null)
  - `refs.bedType`? (string | null)
  - `refs.series`? (string | null)
  - `refs.fuelTypeSecondary`? (string | null)
  - `refs.trailerBodyType`? (string | null)
  - `refs.trailerType`? (string | null)
- `sections` (object)
- `markets` (object): Per-market pricing and colors; a market with nothing published is absent
  - `markets.US`? (object)
    - `markets.US.currency` ("USD" | "CAD")
    - `markets.US.pricing`? (object)
      - `markets.US.pricing.msrp` (object[]): Every published price, cheapest first
    - `markets.US.colors`? (object): Every color offered in this market across the trims behind the sheet, sorted by name
      - `markets.US.colors.colorsExterior`? (object[])
      - `markets.US.colors.colorsInterior`? (object[])
  - `markets.CA`? (object)
    - `markets.CA.currency` ("USD" | "CAD")
    - `markets.CA.pricing`? (object)
      - `markets.CA.pricing.msrp` (object[]): Every published price, cheapest first
    - `markets.CA.colors`? (object): Every color offered in this market across the trims behind the sheet, sorted by name
      - `markets.CA.colors.colorsExterior`? (object[])
      - `markets.CA.colors.colorsInterior`? (object[])
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/specs/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const specSheet = await client.v2.specs.sheet("model-year:honda/cr-v/2026");
console.log(specSheet.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

spec_sheet = client.v2.specs.sheet("model-year:honda/cr-v/2026")
print(spec_sheet.ref)
```

### GET /v2/specs/nano:{code}

Spec sheet for ONE build code *Since 2026-09-12.*

The same sheet for one build. The VIN's build answers `refs` and identity; the trims that share this build fill the rest, each value one every trim states. Where the build states a value, the build's value is served. Values are metric with their unit, as on the model-year grain. The build's model year is `refs.modelYear`, always set on this grain, and `links.modelYearSheet` is the path to its sheet. Several trims can share a VIN pattern — `markets` prices all of them, never a pick. `?trim=` is not accepted on this grain (400).

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | yes | The build code: the 11-character (or 14 for a small-volume WMI) VIN pattern, star at position 9 omitted or kept. |

**Response 200** `SpecSheetBuild`: The build's sheet: sections, markets

- `ref` (string): The requested build-code ref, e.g. "nano:2T3RWRFVMW"
- `grain` ("nano")
- `year` (integer | null)
- `make` (string | null): Display name
- `model` (string | null): Display name
- `refs` (object): The identity card's refs, the same keys as `GET /v2/vin/{vin}`: the join keys. An attribute served here is not repeated in `sections`
  - `refs.make` (string | null): Make entity ref, e.g. "make:tesla"
  - `refs.model` (string | null): Model entity ref, e.g. "model:tesla/model-y"
  - `refs.modelYear` (string): The model-year ref, always set on a sheet, e.g. "model-year:toyota/rav4/2021"; `links.modelYearSheet` is its sheet
  - `refs.bodyStyle` (string | null)
  - `refs.fuelType` (string | null)
  - `refs.driveType` (string | null)
  - `refs.transmission` (string | null)
  - `refs.electrificationLevel` (string | null)
  - `refs.vehicleType` (string | null)
  - `refs.gvwr`? (string | null)
  - `refs.country` (string | null): Ref of the country the vehicle was assembled in (the plant country), e.g. "country:canada", "country:japan", "country:united-states-usa". One of the ISO 3166-1 countries in the country domain (GET /v2/entities?domain=country). Null when the decode states no plant country.
  - `refs.bodyCab`? (string | null)
  - `refs.bedType`? (string | null)
  - `refs.series`? (string | null)
  - `refs.fuelTypeSecondary`? (string | null)
  - `refs.trailerBodyType`? (string | null)
  - `refs.trailerType`? (string | null)
- `sections` (object)
- `markets` (object): Per-market pricing and colors; a market with nothing published is absent
  - `markets.US`? (object)
    - `markets.US.currency` ("USD" | "CAD")
    - `markets.US.pricing`? (object)
      - `markets.US.pricing.msrp` (object[]): Every published price, cheapest first
    - `markets.US.colors`? (object): Every color offered in this market across the trims behind the sheet, sorted by name
      - `markets.US.colors.colorsExterior`? (object[])
      - `markets.US.colors.colorsInterior`? (object[])
  - `markets.CA`? (object)
    - `markets.CA.currency` ("USD" | "CAD")
    - `markets.CA.pricing`? (object)
      - `markets.CA.pricing.msrp` (object[]): Every published price, cheapest first
    - `markets.CA.colors`? (object): Every color offered in this market across the trims behind the sheet, sorted by name
      - `markets.CA.colors.colorsExterior`? (object[])
      - `markets.CA.colors.colorsInterior`? (object[])
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/specs/nano:{code}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const specSheetBuild = await client.v2.specs.sheetByBuild("{code}");
console.log(specSheetBuild.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

spec_sheet_build = client.v2.specs.sheet_by_build("{code}")
print(spec_sheet_build.ref)
```

---

## Reference: Listings

Ref-native listing search, counts, facets

**Availability: live** on `https://api.cardog.app`.

### GET /v2/listings/search

Search listings — ref filters + spec filters *Since 2026-07-30.*

Filters are entity refs, checked for grammar and then registry membership — an unknown ref returns a 400 naming it, never a silent fuzzy match. Sort: `?sort=<field>&order=<asc|desc>`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `make` | string[] | no | Make ref, repeatable — e.g. "make:mini" |
| `model` | string[] | no | Model ref, repeatable — e.g. "model:mini/hardtop" |
| `nano` | string[] | no | Nano ref (fungible build grain), repeatable — e.g. "nano:5TDGSKFCRS" |
| `bodyStyle` | string[] | no | Body-style ref, repeatable — e.g. "body-style:sedan-saloon" |
| `fuelType` | string[] | no | Fuel-type ref, repeatable — e.g. "fuel-type:electric" |
| `driveType` | string[] | no | Drive-type ref, repeatable — e.g. "drive-type:awd-all-wheel-drive" |
| `transmission` | string[] | no | Transmission ref, repeatable — e.g. "transmission:automatic" |
| `electrification` | string[] | no | Electrification-level ref, repeatable — e.g. "electrification-level:bev-battery-electric-vehicle" |
| `vehicleType` | string[] | no | Vehicle-type ref, repeatable — e.g. "vehicle-type:passenger-car" |
| `trim` | string[] | no | Free-text trim (dealer-entered, no domain), repeatable |
| `seller` | string[] | no | Seller id, repeatable |
| `exteriorColor` | string[] | no | Normalized exterior color, repeatable |
| `interiorColor` | string[] | no | Normalized interior color, repeatable |
| `year.min` | integer | no | Model year lower bound |
| `year.max` | integer | no | Model year upper bound |
| `price.min` | number | no | Price lower bound |
| `price.max` | number | no | Price upper bound |
| `odometer.min` | number | no | Odometer lower bound |
| `odometer.max` | number | no | Odometer upper bound |
| `lat` | number | no | Latitude (with lng + radius) |
| `lng` | number | no | Longitude (with lat + radius) |
| `radius` | number | no | Radius in km (with lat + lng) |
| `verified` | boolean | no | Verified-only gate (defaults true) |
| `createdAfter` | string (date-time) | no | Freshness floor on listing creation |
| `updatedAfter` | string (date-time) | no | Freshness floor on listing update |
| `spec.{attributeId}` | string | no | Canonical spec filter, dynamic keys: numeric attributes take `spec.{id}.min`/`.max` (e.g. `spec.fuelEconomyCombined.min=35`); availability attributes repeat tri-state values (`spec.heatedSeatsFront=standard`). Attribute ids come from GET /v2/specs/catalog; unknown ids 400 with the id named. |
| `page` | integer | no | Page number |
| `limit` | integer | no | Page size, 1 to 250; a larger value is refused with 400 |
| `sort` | string | no | Sort field |
| `order` | "asc" \| "desc" | no | Sort order |

**Response 200** `ListingSearch`: Listings + pagination + echoed filters

- `listings` (object[])
  - `listings[].id` (string)
  - `listings[].vin` (string)
  - `listings[].price` (number)
  - `listings[].currency`? (string)
  - `listings[].odometer`? (number | null)
  - `listings[].year` (integer)
  - `listings[].make` (string)
  - `listings[].model` (string)
  - `listings[].trim`? (string | null)
  - `listings[].makeRef`? (string | null)
  - `listings[].modelRef`? (string | null)
  - `listings[].nano`? (string | null)
  - `listings[].media`? (object[])
- `pagination` (object)
  - `pagination.page` (integer)
  - `pagination.limit` (integer)
- `sort`? (object)
  - `sort.field`? (string)
  - `sort.order`? (string)
- `filters` (object)
  - `filters.ids`? (string[])
  - `filters.makes`? (string[])
  - `filters.models`? (string[])
  - `filters.nanos`? (string[])
  - `filters.bodyStyles`? (string[])
  - `filters.fuelTypes`? (string[])
  - `filters.driveTypes`? (string[])
  - `filters.transmissions`? (string[])
  - `filters.electrificationLevels`? (string[])
  - `filters.vehicleTypes`? (string[])
  - `filters.trims`? (string[])
  - `filters.saleTypes`? (string[])
  - `filters.sellers`? (string[])
  - `filters.year`? (object)
    - `filters.year.min`? (number)
    - `filters.year.max`? (number)
  - `filters.price`? (object)
    - `filters.price.min`? (number)
    - `filters.price.max`? (number)
  - `filters.odometer`? (object)
    - `filters.odometer.min`? (number)
    - `filters.odometer.max`? (number)
  - `filters.cylinders`? (object)
    - `filters.cylinders.min`? (number)
    - `filters.cylinders.max`? (number)
  - `filters.doors`? (object)
    - `filters.doors.min`? (number)
    - `filters.doors.max`? (number)
  - `filters.exteriorColors`? (string[])
  - `filters.interiorColors`? (string[])
  - `filters.location`? (object)
    - `filters.location.lat` (number)
    - `filters.location.lng` (number)
    - `filters.location.radius` (number)
  - `filters.verified`? (boolean)
  - `filters.createdAfter`? (string (date-time))
  - `filters.updatedAfter`? (string (date-time))
  - `filters.spec`? (object): Spec filters keyed by attribute id (see GET /v2/specs/catalog). Numeric attributes take a {min, max} range; equipment attributes take availability values ("standard", "optional", "unavailable"). Example: {"fuelEconomyCombined": {"min": 35}, "heatedSeatsFront": ["standard"]}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/listings/search?make=make:tesla&year.min=2022&limit=5" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingSearch = await client.v2.listings.search({
  filters: { makes: ["make:tesla"], year: { min: 2022 } },
  pagination: { limit: 5 },
});
console.log(listingSearch.listings);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_search = client.v2.listings.search(filters={"makes": ["make:tesla"], "year": {"min": 2022}}, limit=5)
print(listing_search.listings)
```

### GET /v2/listings/count

Count matching listings (distinct VINs) *Since 2026-07-30.*

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `make` | string[] | no | Make ref, repeatable — e.g. "make:mini" |
| `model` | string[] | no | Model ref, repeatable — e.g. "model:mini/hardtop" |
| `nano` | string[] | no | Nano ref (fungible build grain), repeatable — e.g. "nano:5TDGSKFCRS" |
| `bodyStyle` | string[] | no | Body-style ref, repeatable — e.g. "body-style:sedan-saloon" |
| `fuelType` | string[] | no | Fuel-type ref, repeatable — e.g. "fuel-type:electric" |
| `driveType` | string[] | no | Drive-type ref, repeatable — e.g. "drive-type:awd-all-wheel-drive" |
| `transmission` | string[] | no | Transmission ref, repeatable — e.g. "transmission:automatic" |
| `electrification` | string[] | no | Electrification-level ref, repeatable — e.g. "electrification-level:bev-battery-electric-vehicle" |
| `vehicleType` | string[] | no | Vehicle-type ref, repeatable — e.g. "vehicle-type:passenger-car" |
| `trim` | string[] | no | Free-text trim (dealer-entered, no domain), repeatable |
| `seller` | string[] | no | Seller id, repeatable |
| `exteriorColor` | string[] | no | Normalized exterior color, repeatable |
| `interiorColor` | string[] | no | Normalized interior color, repeatable |
| `year.min` | integer | no | Model year lower bound |
| `year.max` | integer | no | Model year upper bound |
| `price.min` | number | no | Price lower bound |
| `price.max` | number | no | Price upper bound |
| `odometer.min` | number | no | Odometer lower bound |
| `odometer.max` | number | no | Odometer upper bound |
| `lat` | number | no | Latitude (with lng + radius) |
| `lng` | number | no | Longitude (with lat + radius) |
| `radius` | number | no | Radius in km (with lat + lng) |
| `verified` | boolean | no | Verified-only gate (defaults true) |
| `createdAfter` | string (date-time) | no | Freshness floor on listing creation |
| `updatedAfter` | string (date-time) | no | Freshness floor on listing update |
| `spec.{attributeId}` | string | no | Canonical spec filter, dynamic keys: numeric attributes take `spec.{id}.min`/`.max` (e.g. `spec.fuelEconomyCombined.min=35`); availability attributes repeat tri-state values (`spec.heatedSeatsFront=standard`). Attribute ids come from GET /v2/specs/catalog; unknown ids 400 with the id named. |

**Response 200** `ListingCount`: One count, planner-estimate flagged

- `count` (integer)
- `countIsApproximate`? (boolean)
- `filters` (object)
  - `filters.ids`? (string[])
  - `filters.makes`? (string[])
  - `filters.models`? (string[])
  - `filters.nanos`? (string[])
  - `filters.bodyStyles`? (string[])
  - `filters.fuelTypes`? (string[])
  - `filters.driveTypes`? (string[])
  - `filters.transmissions`? (string[])
  - `filters.electrificationLevels`? (string[])
  - `filters.vehicleTypes`? (string[])
  - `filters.trims`? (string[])
  - `filters.saleTypes`? (string[])
  - `filters.sellers`? (string[])
  - `filters.year`? (object)
    - `filters.year.min`? (number)
    - `filters.year.max`? (number)
  - `filters.price`? (object)
    - `filters.price.min`? (number)
    - `filters.price.max`? (number)
  - `filters.odometer`? (object)
    - `filters.odometer.min`? (number)
    - `filters.odometer.max`? (number)
  - `filters.cylinders`? (object)
    - `filters.cylinders.min`? (number)
    - `filters.cylinders.max`? (number)
  - `filters.doors`? (object)
    - `filters.doors.min`? (number)
    - `filters.doors.max`? (number)
  - `filters.exteriorColors`? (string[])
  - `filters.interiorColors`? (string[])
  - `filters.location`? (object)
    - `filters.location.lat` (number)
    - `filters.location.lng` (number)
    - `filters.location.radius` (number)
  - `filters.verified`? (boolean)
  - `filters.createdAfter`? (string (date-time))
  - `filters.updatedAfter`? (string (date-time))
  - `filters.spec`? (object): Spec filters keyed by attribute id (see GET /v2/specs/catalog). Numeric attributes take a {min, max} range; equipment attributes take availability values ("standard", "optional", "unavailable"). Example: {"fuelEconomyCombined": {"min": 35}, "heatedSeatsFront": ["standard"]}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/listings/count?make=make:tesla" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingCount = await client.v2.listings.count({ filters: { makes: ["make:tesla"] } });
console.log(listingCount.count);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_count = client.v2.listings.count(filters={"makes": ["make:tesla"]})
print(listing_count.count)
```

### GET /v2/listings/facets

Facets over the filtered set — (ref, name, count) buckets *Since 2026-07-30.*

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `make` | string[] | no | Make ref, repeatable — e.g. "make:mini" |
| `model` | string[] | no | Model ref, repeatable — e.g. "model:mini/hardtop" |
| `nano` | string[] | no | Nano ref (fungible build grain), repeatable — e.g. "nano:5TDGSKFCRS" |
| `bodyStyle` | string[] | no | Body-style ref, repeatable — e.g. "body-style:sedan-saloon" |
| `fuelType` | string[] | no | Fuel-type ref, repeatable — e.g. "fuel-type:electric" |
| `driveType` | string[] | no | Drive-type ref, repeatable — e.g. "drive-type:awd-all-wheel-drive" |
| `transmission` | string[] | no | Transmission ref, repeatable — e.g. "transmission:automatic" |
| `electrification` | string[] | no | Electrification-level ref, repeatable — e.g. "electrification-level:bev-battery-electric-vehicle" |
| `vehicleType` | string[] | no | Vehicle-type ref, repeatable — e.g. "vehicle-type:passenger-car" |
| `trim` | string[] | no | Free-text trim (dealer-entered, no domain), repeatable |
| `seller` | string[] | no | Seller id, repeatable |
| `exteriorColor` | string[] | no | Normalized exterior color, repeatable |
| `interiorColor` | string[] | no | Normalized interior color, repeatable |
| `year.min` | integer | no | Model year lower bound |
| `year.max` | integer | no | Model year upper bound |
| `price.min` | number | no | Price lower bound |
| `price.max` | number | no | Price upper bound |
| `odometer.min` | number | no | Odometer lower bound |
| `odometer.max` | number | no | Odometer upper bound |
| `lat` | number | no | Latitude (with lng + radius) |
| `lng` | number | no | Longitude (with lat + radius) |
| `radius` | number | no | Radius in km (with lat + lng) |
| `verified` | boolean | no | Verified-only gate (defaults true) |
| `createdAfter` | string (date-time) | no | Freshness floor on listing creation |
| `updatedAfter` | string (date-time) | no | Freshness floor on listing update |
| `spec.{attributeId}` | string | no | Canonical spec filter, dynamic keys: numeric attributes take `spec.{id}.min`/`.max` (e.g. `spec.fuelEconomyCombined.min=35`); availability attributes repeat tri-state values (`spec.heatedSeatsFront=standard`). Attribute ids come from GET /v2/specs/catalog; unknown ids 400 with the id named. |

**Response 200** `ListingFacets`: Ref-native facets, feature facets, ranges, histogram

- `makes` (object[])
  - `makes[].ref` (string)
  - `makes[].name` (string)
  - `makes[].count` (integer)
  - `makes[].parentRef`? (string)
- `models` (object[])
  - `models[].ref` (string)
  - `models[].name` (string)
  - `models[].count` (integer)
  - `models[].parentRef`? (string)
- `bodyStyles` (object[])
  - `bodyStyles[].ref` (string)
  - `bodyStyles[].name` (string)
  - `bodyStyles[].count` (integer)
  - `bodyStyles[].parentRef`? (string)
- `fuelTypes` (object[])
  - `fuelTypes[].ref` (string)
  - `fuelTypes[].name` (string)
  - `fuelTypes[].count` (integer)
  - `fuelTypes[].parentRef`? (string)
- `driveTypes` (object[])
  - `driveTypes[].ref` (string)
  - `driveTypes[].name` (string)
  - `driveTypes[].count` (integer)
  - `driveTypes[].parentRef`? (string)
- `transmissions` (object[])
  - `transmissions[].ref` (string)
  - `transmissions[].name` (string)
  - `transmissions[].count` (integer)
  - `transmissions[].parentRef`? (string)
- `electrificationLevels` (object[])
  - `electrificationLevels[].ref` (string)
  - `electrificationLevels[].name` (string)
  - `electrificationLevels[].count` (integer)
  - `electrificationLevels[].parentRef`? (string)
- `vehicleTypes` (object[])
  - `vehicleTypes[].ref` (string)
  - `vehicleTypes[].name` (string)
  - `vehicleTypes[].count` (integer)
  - `vehicleTypes[].parentRef`? (string)
- `exteriorColors` (object[])
  - `exteriorColors[].ref` (string)
  - `exteriorColors[].name` (string)
  - `exteriorColors[].count` (integer)
  - `exteriorColors[].parentRef`? (string)
- `saleTypes` (object[])
  - `saleTypes[].ref` (string)
  - `saleTypes[].name` (string)
  - `saleTypes[].count` (integer)
  - `saleTypes[].parentRef`? (string)
- `years`? (object)
  - `years.min` (number)
  - `years.max` (number)
- `prices`? (object)
  - `prices.min` (number)
  - `prices.max` (number)
- `odometer`? (object)
  - `odometer.min` (number)
  - `odometer.max` (number)
- `priceHistogram`? (object[])
  - `priceHistogram[].min` (number)
  - `priceHistogram[].max` (number)
  - `priceHistogram[].count` (number)
- `featureFacets`? (object[])
  - `featureFacets[].id` (string)
  - `featureFacets[].name` (string)
  - `featureFacets[].category` ("tech" | "comfort" | "safety" | "ev")
  - `featureFacets[].count` (integer)
- `specRanges`? (object)
- `featureFacetsAreApproximate`? (boolean)
- `totalCount` (integer)
- `totalCountIsApproximate`? (boolean)

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/listings/facets?make=make:tesla" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingFacets = await client.v2.listings.facets({ filters: { makes: ["make:tesla"] } });
console.log(listingFacets.makes);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_facets = client.v2.listings.facets(filters={"makes": ["make:tesla"]})
print(listing_facets.makes)
```

### GET /v2/listings/id/{id}

One listing by id *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Listing id |

**Response 200** `ListingDetail`: Listing + vehicle + canonical spec

- `id` (string)
- `vin` (string)
- `price` (number)
- `currency`? (string)
- `odometer`? (number | null)
- `year` (integer)
- `make` (string)
- `model` (string)
- `trim`? (string | null)
- `makeRef`? (string | null)
- `modelRef`? (string | null)
- `nano`? (string | null)
- `media`? (object[])
- `variant` (object | null)
  - `variant.id` (string)
  - `variant.trim`? (string | null)
  - `variant.styleName`? (string | null)
  - `variant.region`? (string | null)
  - `variant.year`? (integer | null)
  - `variant.msrp`? (number | null)
- `spec` (object | null)

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/listings/id/$LISTING_ID" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingDetail = await client.v2.listings.byId("$LISTING_ID");
console.log(listingDetail.id);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_detail = client.v2.listings.by_id("$LISTING_ID")
print(listing_detail.id)
```

### GET /v2/listings/vin/{vin}

Listing detail by VIN — listing + variant + full canonical spec, one query *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Response 200** `ListingDetail`: spec is null when the nano has no variant link yet

- `id` (string)
- `vin` (string)
- `price` (number)
- `currency`? (string)
- `odometer`? (number | null)
- `year` (integer)
- `make` (string)
- `model` (string)
- `trim`? (string | null)
- `makeRef`? (string | null)
- `modelRef`? (string | null)
- `nano`? (string | null)
- `media`? (object[])
- `variant` (object | null)
  - `variant.id` (string)
  - `variant.trim`? (string | null)
  - `variant.styleName`? (string | null)
  - `variant.region`? (string | null)
  - `variant.year`? (integer | null)
  - `variant.msrp`? (number | null)
- `spec` (object | null)

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/listings/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const listingDetail = await client.v2.listings.byVin("2T3R1RFV7MW180266");
console.log(listingDetail.id);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

listing_detail = client.v2.listings.by_vin("2T3R1RFV7MW180266")
print(listing_detail.id)
```

---

## Reference: Instruments

Market symbology + instrument cards

**Availability: live** on `https://api.cardog.app`.

### GET /v2/instruments

Symbology search / most-liquid browse *Since 2026-07-30.*

With `q`: typeahead over live instruments. Without: the most-liquid screener rows.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | no | Typeahead query (min 2 chars) |
| `limit` | integer | no | Row cap |

**Response 200** `InstrumentSearch`: Screener rows with quote line + sparkline

- `query`? (string | null)
- `items` (object[])
  - `items[].ref` (string)
  - `items[].label`? (string)
  - `items[].makeName`? (string)
  - `items[].spark`? (number[]): Daily median prices for the trailing 45 days, oldest first. Intended for an inline sparkline.
  - `items[].median30d`? (number | null): Median price 30 days ago. Compare with `median` to get the 30-day change.
  - `items[].count` (integer): Number of live listings for this instrument
  - `items[].best` (number | null): Lowest live asking price
  - `items[].p25` (number | null): 25th percentile of live asking prices
  - `items[].median` (number | null): Median live asking price
  - `items[].p75` (number | null): 75th percentile of live asking prices
  - `items[].avgDom` (number | null): Average days on market across the live listings
  - `items[].cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
  - `items[].cutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
  - `items[].sightings30d` (integer | null): Number of listing observations in the trailing 30 days
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments?q=cr-v" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentSearch = await client.v2.instruments.search({ q: "cr-v" });
console.log(instrumentSearch.query);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

instrument_search = client.v2.instruments.search(q="cr-v")
print(instrument_search.query)
```

### GET /v2/instruments/{ref}

The instrument card: quote + history + live sample *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | An instrument ref (model-year: or squish:). Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `window` | "1w" \| "1m" \| "3m" \| "6m" \| "ytd" \| "1y" \| "3y" \| "5y" \| "10y" \| "all" | no | History window |

**Response 200** `InstrumentCard`: Quote + daily bars + bounded live sample

- `instrument` (object)
  - `instrument.ref` (string)
  - `instrument.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
  - `instrument.label`? (string)
- `quote` (object)
  - `quote.ref` (string): Ref of the instrument (the thing being priced: a model year or a squish), e.g. "model-year:honda/cr-v/2026"
  - `quote.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
  - `quote.liveCount` (integer): Number of live listings the quote is computed from. Treat it as the sample size.
  - `quote.bestPrice` (number | null): Lowest live asking price
  - `quote.priceP25` (number | null): 25th percentile of live asking prices
  - `quote.priceMedian` (number | null): Median live asking price
  - `quote.priceP75` (number | null): 75th percentile of live asking prices
  - `quote.avgDomDays` (number | null): Average days on market across the live listings
  - `quote.cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
  - `quote.avgCutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
  - `quote.sightings30d` (integer | null): Number of listing observations in the trailing 30 days
  - `quote.asOf` (string): When the quote was last computed (ISO 8601)
  - `quote.links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `history` (object[])
  - `history[].day` (string): The day this bar covers (ISO date, YYYY-MM-DD)
  - `history[].median` (number | null): Median asking price that day
  - `history[].p25` (number | null): 25th percentile of asking prices that day
  - `history[].p75` (number | null): 75th percentile of asking prices that day
  - `history[].best` (number | null): Lowest asking price that day
  - `history[].count` (integer | null): Number of live listings that day. Set on bars with source "fold".
  - `history[].prints` (integer | null): Number of price observations aggregated into the bar. Set on bars with source "prints".
  - `history[].source` (string): How the bar was built: "fold" (a once-daily snapshot of live listings) or "prints" (built from individual price observations). Other values may be added.
- `listings` (object[]): A capped sample of the current set of live listings for this instrument
  - `listings[].vin` (string)
  - `listings[].price` (number)
  - `listings[].odometer` (number | null)
  - `listings[].domain` (string | null)
  - `listings[].listedAt` (string): Listing date (ISO 8601)
  - `listings[].score` (number | null)
  - `listings[].sourceUri` (string | null)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments/model-year:honda%2Fcr-v%2F2026?window=1y" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentCard = await client.v2.instruments.getByRef("model-year:honda/cr-v/2026", { window: "1y" });
console.log(instrumentCard.instrument);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

instrument_card = client.v2.instruments.get_by_ref("model-year:honda/cr-v/2026", window="1y")
print(instrument_card.instrument)
```

### GET /v2/instruments/{ref}/mileage

Price against odometer, projected to one car *Since 2026-11-22.*

Fits asking price on odometer across the instrument's live listings (Theil–Sen: the median pairwise slope, robust to mispriced listings) and projects the band to `km`: the fit there plus the quartiles of its residuals. Outside the sample's odometer range the projection is clamped and flagged `extrapolated`. With `lat`/`lng`, the local market around that point: rings from `radiusKm` widened until `minLocal` listings are inside, then the `province`, each price moved to `km` along the fit. `exclude` takes one VIN out of every statistic. Live retail asking prices only, never sales.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year or squish instrument ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `km` | integer | yes | The odometer to project to, kilometres |
| `exclude` | string | no | A VIN to leave out of every statistic |
| `lat` | number | no | Latitude of the local read's centre |
| `lng` | number | no | Longitude of the local read's centre |
| `province` | string | no | Two-letter province of that point: the widest ring, and the province index |
| `radiusKm` | integer | no | The first local radius, kilometres |
| `minLocal` | integer | no | Listings a local read needs |

**Response 200** `InstrumentMileage`: The fit, the projected band, the local read and the sparkline points

- `instrument` (object)
  - `instrument.ref` (string)
  - `instrument.grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
- `basis` ("asking"): Always live retail asking prices
- `asOf` (string): When the live sample was read (ISO 8601)
- `subject` (object)
  - `subject.km` (integer)
  - `subject.excluded` (boolean): True when the `exclude` VIN was in the sample and was taken out
- `sample` (object)
  - `sample.n` (integer): Live listings read, after the erroneous-price floor and the exclusion
  - `sample.withOdometer` (integer): Of those, listings with a stated odometer of at least 1,000 km (the fit's points)
  - `sample.kmMin` (number | null)
  - `sample.kmMax` (number | null)
  - `sample.medianDaysListed` (number | null): Median days since the sample's listings first appeared
  - `sample.cutShare30d` (number | null): Share of the sample (0..1) whose price was cut in the trailing 30 days
  - `sample.avgCutPct30d` (number | null): Average size of those cuts, percent
- `national` (object): The sample's asking-price quartiles at every odometer, unadjusted
  - `national.n` (integer)
  - `national.p25` (number | null)
  - `national.median` (number | null)
  - `national.p75` (number | null)
- `fit` (object)
  - `fit.status` ("ok" | "thin" | "no_spread" | "no_slope"): `ok`: a usable fit. `thin`: too few listings with an odometer. `no_spread`: the odometers sit too close together to measure a slope. `no_slope`: price does not fall with distance in this sample (a trim or condition mix outweighs it), so no slope is served.
  - `fit.method` ("theil-sen")
  - `fit.n` (integer)
  - `fit.slopePer1000Km` (number | null): Change in asking price per 1,000 km, dollars (negative: price falls with distance)
  - `fit.intercept` (number | null): The fit's asking price at 0 km, dollars
  - `fit.r2` (number | null): Share of the price variance the fit explains (0..1)
  - `fit.madPct` (number | null): Median absolute residual as a percent of the median price
  - `fit.kmMin` (number | null)
  - `fit.kmMax` (number | null)
- `projected` (object | null): The band at the asked odometer; null unless the fit is `ok`
  - `projected.km` (integer): The odometer asked for
  - `projected.atKm` (integer): The odometer the band was projected to: `km`, clamped into the sample's range
  - `projected.extrapolated` (boolean): True when `km` was outside the sample's range and was clamped
  - `projected.p25` (number)
  - `projected.median` (number)
  - `projected.p75` (number)
- `local` (object | null): The local market around `lat`,`lng`; null without a point
  - `local.status` ("ok" | "thin")
  - `local.radiusKm` (integer | null): The ring that reached `minLocal`; null when the read fell back to the province
  - `local.province` (string | null)
  - `local.mileageAdjusted` (boolean): True when each local price was moved to `km` along the fit before the quartiles
  - `local.steps` (object[]): Each ring tried, innermost first; `null` is the province
    - `local.steps[].radiusKm` (integer | null)
    - `local.steps[].n` (integer)
  - `local.n` (integer)
  - `local.p25` (number | null)
  - `local.median` (number | null)
  - `local.p75` (number | null)
- `province` (object | null)
  - `province.code` (string)
  - `province.n` (integer)
  - `province.median` (number | null)
  - `province.index` (number | null): This instrument's median in the province over its national median, both at `km` when the fit is `ok`
- `trims` (object[]): Trims as listed in the sample, most common first
  - `trims[].trim` (string)
  - `trims[].n` (integer)
  - `trims[].median` (number | null): Median asking price of the trim, moved to `km` along the fit when it is `ok`
- `points` (object[]): Up to 80 of the fit's points, for a sparkline
  - `points[].km` (number)
  - `points[].price` (number)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/instruments/model-year:honda%2Fcr-v%2F2026/mileage?km=%7Bkm%7D" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const instrumentMileage = await client.v2.instruments.mileage("model-year:honda/cr-v/2026", { km: "{km}" });
console.log(instrumentMileage.instrument);
```

**Example: Python** (`pip install cardog`)

```python
# The Python SDK does not carry this operation yet.
# Call GET /v2/instruments/{ref}/mileage with an org session token
# in the X-Cardog-Agent-Grant header (see the curl sample).
```

---

## Reference: Quotes

The live book per instrument

**Availability: live** on `https://api.cardog.app`.

### GET /v2/quotes

Multi-quote: one call, up to 20 instruments *Since 2026-07-30.*

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `refs` | string | yes | Comma-separated instrument refs, e.g. "model-year:honda/cr-v/2026,model-year:toyota/rav4/2026". Unknown refs 400, named. |

**Response 200** `MultiQuote`: Quotes in request order

- `quotes` (object[]): Same order as the request
  - `quotes[].ref` (string): Ref of the instrument (the thing being priced: a model year or a squish), e.g. "model-year:honda/cr-v/2026"
  - `quotes[].grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
  - `quotes[].liveCount` (integer): Number of live listings the quote is computed from. Treat it as the sample size.
  - `quotes[].bestPrice` (number | null): Lowest live asking price
  - `quotes[].priceP25` (number | null): 25th percentile of live asking prices
  - `quotes[].priceMedian` (number | null): Median live asking price
  - `quotes[].priceP75` (number | null): 75th percentile of live asking prices
  - `quotes[].avgDomDays` (number | null): Average days on market across the live listings
  - `quotes[].cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
  - `quotes[].avgCutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
  - `quotes[].sightings30d` (integer | null): Number of listing observations in the trailing 30 days
  - `quotes[].asOf` (string): When the quote was last computed (ISO 8601)
  - `quotes[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/quotes?refs=model-year:honda/cr-v/2026,model-year:toyota/rav4/2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const multiQuote = await client.v2.quotes.getMany(["model-year:honda/cr-v/2026", "model-year:toyota/rav4/2026"]);
console.log(multiQuote.quotes);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

multi_quote = client.v2.quotes.get_many(["model-year:honda/cr-v/2026", "model-year:toyota/rav4/2026"])
print(multi_quote.quotes)
```

### GET /v2/quotes/{ref}

The live book for one instrument *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | An instrument ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `Quote`: NBBO-style quote line: best, percentiles, DOM, cuts

- `ref` (string): Ref of the instrument (the thing being priced: a model year or a squish), e.g. "model-year:honda/cr-v/2026"
- `grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
- `liveCount` (integer): Number of live listings the quote is computed from. Treat it as the sample size.
- `bestPrice` (number | null): Lowest live asking price
- `priceP25` (number | null): 25th percentile of live asking prices
- `priceMedian` (number | null): Median live asking price
- `priceP75` (number | null): 75th percentile of live asking prices
- `avgDomDays` (number | null): Average days on market across the live listings
- `cuts30d` (integer | null): Number of price cuts observed in the trailing 30 days
- `avgCutPct30d` (number | null): Average price cut as a percentage, trailing 30 days
- `sightings30d` (integer | null): Number of listing observations in the trailing 30 days
- `asOf` (string): When the quote was last computed (ISO 8601)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/quotes/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const quote = await client.v2.quotes.getByRef("model-year:honda/cr-v/2026");
console.log(quote.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

quote = client.v2.quotes.get_by_ref("model-year:honda/cr-v/2026")
print(quote.ref)
```

---

## Reference: Tape

Prints + daily bars

**Availability: live** on `https://api.cardog.app`.

### GET /v2/tape/live

The live tape: freshest prints, seconds old *Since 2026-07-30.*

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | Print cap |

**Response 200** `TapeLive`: Prints + throughput counters

- `prints` (object[]): Recent price observations (one per listing), newest first. Capped by `limit`.
  - `prints[].ref` (string): Ref of the instrument (the thing being priced: a model year or a squish) this observation belongs to, e.g. "model-year:toyota/rav4/2021"
  - `prints[].label`? (string): Display label from the entity registry, e.g. "Toyota RAV4 2021"
  - `prints[].price` (number)
  - `prints[].domain` (string): Seller website domain the price was observed on
  - `prints[].at` (string): Observation timestamp (ISO 8601)
  - `prints[].vinTail` (string): Last 6 characters of the VIN, enough to deduplicate. The full VIN is never returned.
- `perMinute` (integer): Price observations per minute, averaged over the trailing 5 minutes
- `today` (integer): Price observations since midnight
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/tape/live" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const tapeLive = await client.v2.tape.live();
console.log(tapeLive.prints);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

tape_live = client.v2.tape.live()
print(tape_live.prints)
```

### GET /v2/tape/history/{ref}

Daily bars for one instrument over a window *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | An instrument ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `window` | "1w" \| "1m" \| "3m" \| "6m" \| "ytd" \| "1y" \| "3y" \| "5y" \| "10y" \| "all" | no | History window |

**Response 200** `TapeHistory`: Ascending daily bars from daily snapshots and observed prints

- `ref` (string)
- `grain` ("mmy" | "mmy.drive" | "mmy.fuel" | "mmy.body" | "squish"): Level of detail the instrument is priced at: "mmy" (model year), "mmy.drive", "mmy.fuel" or "mmy.body" (model year split by drive type, fuel type, or body style), or "squish" (exact configuration: WMI + VDS + model year, plant-agnostic)
- `window` ("1w" | "1m" | "3m" | "6m" | "ytd" | "1y" | "3y" | "5y" | "10y" | "all")
- `bars` (object[]): One bar (one day's aggregate of prices) per day, oldest first
  - `bars[].day` (string): The day this bar covers (ISO date, YYYY-MM-DD)
  - `bars[].median` (number | null): Median asking price that day
  - `bars[].p25` (number | null): 25th percentile of asking prices that day
  - `bars[].p75` (number | null): 75th percentile of asking prices that day
  - `bars[].best` (number | null): Lowest asking price that day
  - `bars[].count` (integer | null): Number of live listings that day. Set on bars with source "fold".
  - `bars[].prints` (integer | null): Number of price observations aggregated into the bar. Set on bars with source "prints".
  - `bars[].source` (string): How the bar was built: "fold" (a once-daily snapshot of live listings) or "prints" (built from individual price observations). Other values may be added.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/tape/history/model-year:honda%2Fcr-v%2F2026?window=1y" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const tapeHistory = await client.v2.tape.history("model-year:honda/cr-v/2026", { window: "1y" });
console.log(tapeHistory.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

tape_history = client.v2.tape.history("model-year:honda/cr-v/2026", window="1y")
print(tape_history.ref)
```

---

## Reference: Recalls

Recall campaigns by model year from every market's authorities, ref-keyed

**Availability: live** on `https://api.cardog.app`.

### GET /v2/recalls/vin/{vin}

Recalls listed for a VIN's model year *Since 2026-07-30.*

Resolves the VIN to its model year and returns the campaigns listed for it in the market of sale (default CA: Transport Canada recalls and ECCC emissions notices), each authority's record its own row, never merged. Possible recalls, not a VIN-range match: the manufacturer's VIN lookup (SOR/2024-274 s.15.05) or a dealer confirms. `include=other` adds the records of other markets, such as NHTSA's, uncounted.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `market` | "CA" \| "US" \| "AU" \| "GB" \| "JP" \| "KR" \| "CN" \| "IL" \| "all" | no | Market of sale, ISO alpha-2, or `all`. `recalls` and `total` hold that market's authorities (CA: Transport Canada and ECCC). Never inferred from the VIN. |
| `authority` | string | no | Comma list of authority codes (`tc`, `eccc`, `nhtsa`, `au`, `dvsa`, `mlit`, `kr`, `il`, `ec`, `oem`). Narrows `recalls` within the market; with `market=all`, picks across every market. |
| `regime` | "safety" \| "emissions" \| "all" | no | `safety` recalls, `emissions` notices, or `all`. |
| `include` | "other" | no | `other` adds `otherRecalls`, the rows outside the market. Never counted in `total`. |

**Response 200** `RecallsVin`: Campaigns; `resolved: false` means the VIN was not resolved to a model year, `total: 0` means none listed for it (not a clearance)

- `vin` (string)
- `modelYearRef` (string | null): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
- `resolved` (boolean): False when the VIN is neither in the vehicle graph nor decodable to a model year. `recalls` is then empty because nothing could be checked, not because the vehicle is clear.
- `source`? ("observed" | "decoded"): How the VIN was matched to a model year: 'observed' (the exact VIN is in the vehicle graph) or 'decoded' (the VIN decoder derived it). Campaigns match at the model-year level, not by serial number; absent when `resolved` is false.
- `market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL" | "all"): The market `recalls` and `total` are scoped to, as resolved from the request.
- `applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): The finest applicability any row in `recalls` reached.
- `total` (integer): Rows in `recalls`: the market's authorities, after the authority and regime filters.
- `byRegime`? (object)
  - `byRegime.safety` (integer)
  - `byRegime.emissions` (integer)
- `byAuthority`? (object): Every authority with records for this model year, unfiltered.
- `recalls` (object[])
  - `recalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `recalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `recalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `recalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `recalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `recalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `recalls[].campaignNumber` (string)
  - `recalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `recalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `recalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `recalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `recalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `recalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `recalls[].defectSummary` (string | null)
  - `recalls[].consequenceSummary` (string | null)
  - `recalls[].correctiveAction` (string | null)
  - `recalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `recalls[].notificationType` (string | null)
  - `recalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `recalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `recalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `recalls[].affects[].year` (integer)
    - `recalls[].affects[].unitsAffected` (integer | null)
  - `recalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `otherRecalls`? (object[]): Rows outside the market, present only with `include=other`. Never counted in `total`.
  - `otherRecalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `otherRecalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `otherRecalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `otherRecalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `otherRecalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `otherRecalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `otherRecalls[].campaignNumber` (string)
  - `otherRecalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `otherRecalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `otherRecalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `otherRecalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `otherRecalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `otherRecalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `otherRecalls[].defectSummary` (string | null)
  - `otherRecalls[].consequenceSummary` (string | null)
  - `otherRecalls[].correctiveAction` (string | null)
  - `otherRecalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `otherRecalls[].notificationType` (string | null)
  - `otherRecalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `otherRecalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `otherRecalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `otherRecalls[].affects[].year` (integer)
    - `otherRecalls[].affects[].unitsAffected` (integer | null)
  - `otherRecalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): When the recall data was last updated (ISO 8601)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/recalls/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recallsVin = await client.v2.recalls.vin("2T3R1RFV7MW180266");
console.log(recallsVin.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recalls_vin = client.v2.recalls.vin("2T3R1RFV7MW180266")
print(recalls_vin.vin)
```

### GET /v2/recalls/entity/{ref}

Recalls scoped to a make:, model:, or model-year: ref *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A make:, model:, or model-year: ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | Campaign cap |
| `market` | "CA" \| "US" \| "AU" \| "GB" \| "JP" \| "KR" \| "CN" \| "IL" \| "all" | no | Market of sale, ISO alpha-2, or `all`. `recalls` and `total` hold that market's authorities (CA: Transport Canada and ECCC). Never inferred from the VIN. |
| `authority` | string | no | Comma list of authority codes (`tc`, `eccc`, `nhtsa`, `au`, `dvsa`, `mlit`, `kr`, `il`, `ec`, `oem`). Narrows `recalls` within the market; with `market=all`, picks across every market. |
| `regime` | "safety" \| "emissions" \| "all" | no | `safety` recalls, `emissions` notices, or `all`. |
| `include` | "other" | no | `other` adds `otherRecalls`, the rows outside the market. Never counted in `total`. |

**Response 200** `RecallsEntity`: Campaigns, with affected model-years scoped to the queried ref

- `ref` (string): The queried entity ref (make:, model:, or model-year:)
- `market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL" | "all"): The market `recalls` and `total` are scoped to, as resolved from the request.
- `total` (integer): Total campaigns for this entity in the market, after the authority and regime filters. `recalls` may be shorter when capped by `limit`.
- `byRegime`? (object)
  - `byRegime.safety` (integer)
  - `byRegime.emissions` (integer)
- `byAuthority`? (object): Every authority with campaigns for this entity, unfiltered.
- `recalls` (object[])
  - `recalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `recalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `recalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `recalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `recalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `recalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `recalls[].campaignNumber` (string)
  - `recalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `recalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `recalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `recalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `recalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `recalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `recalls[].defectSummary` (string | null)
  - `recalls[].consequenceSummary` (string | null)
  - `recalls[].correctiveAction` (string | null)
  - `recalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `recalls[].notificationType` (string | null)
  - `recalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `recalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `recalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `recalls[].affects[].year` (integer)
    - `recalls[].affects[].unitsAffected` (integer | null)
  - `recalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `otherRecalls`? (object[]): Campaigns outside the market (capped by `limit`), present only with `include=other`. Never counted in `total`.
  - `otherRecalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `otherRecalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `otherRecalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `otherRecalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `otherRecalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `otherRecalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `otherRecalls[].campaignNumber` (string)
  - `otherRecalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `otherRecalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `otherRecalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `otherRecalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `otherRecalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `otherRecalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `otherRecalls[].defectSummary` (string | null)
  - `otherRecalls[].consequenceSummary` (string | null)
  - `otherRecalls[].correctiveAction` (string | null)
  - `otherRecalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `otherRecalls[].notificationType` (string | null)
  - `otherRecalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `otherRecalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `otherRecalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `otherRecalls[].affects[].year` (integer)
    - `otherRecalls[].affects[].unitsAffected` (integer | null)
  - `otherRecalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/recalls/entity/make:toyota" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recallsEntity = await client.v2.recalls.entity("make:toyota");
console.log(recallsEntity.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recalls_entity = client.v2.recalls.entity("make:toyota")
print(recalls_entity.ref)
```

### GET /v2/recalls/feed

Latest campaigns, newest first *Since 2026-07-30.*

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | Campaign cap |

**Response 200** `RecallsFeed`: The live recall log

- `recalls` (object[])
  - `recalls[].ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
  - `recalls[].authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
  - `recalls[].authorityLabel` (string): Display label, e.g. "Transport Canada"
  - `recalls[].market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
  - `recalls[].regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
  - `recalls[].applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
  - `recalls[].campaignNumber` (string)
  - `recalls[].component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
  - `recalls[].parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
  - `recalls[].components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
    - `recalls[].components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
    - `recalls[].components[].asPublished` (string): The authority's own component text, exactly as filed.
    - `recalls[].components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
  - `recalls[].defectSummary` (string | null)
  - `recalls[].consequenceSummary` (string | null)
  - `recalls[].correctiveAction` (string | null)
  - `recalls[].recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
  - `recalls[].notificationType` (string | null)
  - `recalls[].unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
  - `recalls[].affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
    - `recalls[].affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
    - `recalls[].affects[].year` (integer)
    - `recalls[].affects[].unitsAffected` (integer | null)
  - `recalls[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/recalls/feed" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recallsFeed = await client.v2.recalls.feed();
console.log(recallsFeed.recalls);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recalls_feed = client.v2.recalls.feed()
print(recalls_feed.recalls)
```

### GET /v2/recalls/stats

Recall dataset counts (campaigns, affected model-year links, freshness) *Since 2026-07-30.*

**Response 200** `RecallsStats`: Counts plus the last-updated date, citable

- `campaigns` (integer)
- `links` (integer): Number of (campaign, model year) pairs across all campaigns
- `latest` (string | null): Most recent recall date on record (ISO date)

**Errors** (all use the ErrorEnvelope): 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/recalls/stats" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recallsStats = await client.v2.recalls.stats();
console.log(recallsStats.campaigns);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recalls_stats = client.v2.recalls.stats()
print(recalls_stats.campaigns)
```

### GET /v2/recalls/{ref}

One campaign by recall ref *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A recall: ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `Recall`: The campaign record

- `ref` (string): Entity ref ({domain}:{key}) in the "recall" domain. Example: "recall:tc/2024-123"
- `authority` (string): Issuing authority key: "tc" (Transport Canada), "eccc" (Environment and Climate Change Canada), "nhtsa", "au". Other values may be added.
- `authorityLabel` (string): Display label, e.g. "Transport Canada"
- `market`? ("CA" | "US" | "AU" | "GB" | "JP" | "KR" | "CN" | "IL"): The market the issuing authority belongs to (from the authority registry, never the VIN). Null for an authority with no market.
- `regime`? ("safety" | "emissions"): `safety` (a recall) or `emissions` (a notice of defect). Never counted together on a surface.
- `applicability`? ("listed_for_model_year" | "vin_in_affected_range" | "confirmed_by_manufacturer"): How the record reaches this vehicle. `listed_for_model_year`: the campaign names the model year; only the manufacturer confirms a VIN.
- `campaignNumber` (string)
- `component` (string | null): The authority's component text for the campaign's representative row. `components` lists every component the campaign names.
- `parts`? (string[]): Part refs the campaign names and pairs with a vehicle (`GET /v2/parts/{ref}` serves them, with the maker's store). Only parts the filing ties to a specific vehicle are listed; numbers a multi-vehicle campaign files without pairing are not.
- `components`? (object[]): Every component the campaign names, each read onto the `component:` tree. An NHTSA campaign can name several.
  - `components[].ref` (string | null): The component ref, e.g. "component:occupant-protection/airbags/frontal". A coarse ref names everything beneath it.
  - `components[].asPublished` (string): The authority's own component text, exactly as filed.
  - `components[].reading` ("placed" | "set" | "refused" | "unknown"): `placed`: one ref. `set`: the text names several systems, one entry each. `refused`: names no component. `unknown`: not yet mapped.
- `defectSummary` (string | null)
- `consequenceSummary` (string | null)
- `correctiveAction` (string | null)
- `recallDate` (string | null): Date the recall was issued (ISO date, YYYY-MM-DD)
- `notificationType` (string | null)
- `unitsAffected` (integer | null): Units affected by the whole campaign (the largest value across `affects`)
- `affects` (object[]): Affected model years. When queried by entity, only that entity's model years are listed.
  - `affects[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `affects[].year` (integer)
  - `affects[].unitsAffected` (integer | null)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/recalls/recall:tc%2F2024-123" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recall = await client.v2.recalls.getByRef("recall:tc/2024-123");
console.log(recall.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recall = client.v2.recalls.get_by_ref("recall:tc/2024-123")
print(recall.ref)
```

---

## Reference: History

What happened to a unit, one kind of event per route, every item with its source

**Availability: live** on `https://api.cardog.app`.

### GET /v2/vin/{vin}/operators

Every carrier this unit was observed running under *Since 2026-10-27.*

One item per day a federal roadside inspection or crash report put a motor carrier on this unit, most recent first, each naming the carrier by US DOT number and linking to it. An observed association on a dated record, not ownership: a leased unit is operated by a carrier that does not own it. `expand=detail` adds the inspection or crash record and the carrier as it stands on the register. Costs 3 credits when there is at least one item, 0 when there is none.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `expand` | string | no | `detail` |
| `limit` | integer | no | Page size |
| `cursor` | string | no | `page.nextCursor` from the previous page |

**Response 200** `VinOperators`: Observations, most recent first

- `vin` (string)
- `items` (object[]): Most recent first
  - `items[].id` (string): The fact's content-derived id; stable across reads
  - `items[].observedAt` (string): When it was true in the world: YYYY-MM-DD, or YYYY when the record carries only the year (New York crash reports)
  - `items[].source` (string): Who asserted it, as a source ref: "gov:fmcsa"
  - `items[].value` (object)
    - `items[].value.dotNumber` (integer): US DOT number of the motor carrier operating the unit that day
    - `items[].value.ref` (string): "org:usdot/{dotNumber}"
  - `items[].detail`? (object | null): Present with `expand=detail`; null when the record behind the fact is no longer served
    - `items[].detail.type` ("fmcsa.inspection" | "fmcsa.crash"): The federal record that put the carrier on the unit: a roadside inspection or a crash report
    - `items[].detail.document` (string | null): That record, as a document ref: "document:inspection/…" or "document:crash/…"
    - `items[].detail.carrier` (object | null): The carrier on the register; null when the DOT number is not on it
      - `items[].detail.carrier.dotNumber` (integer)
      - `items[].detail.carrier.ref` (string): "org:usdot/{dotNumber}"
      - `items[].detail.carrier.legalName` (string | null)
      - `items[].detail.carrier.dbaName` (string | null): Trade name, when the carrier filed one
      - `items[].detail.carrier.domicile` (object)
      - `items[].detail.carrier.operation` ("interstate" | "intrastate-hazmat" | "intrastate" | "unknown"): The carrier's operating classification on its filing: "interstate" (A), "intrastate-hazmat" (B), "intrastate" (C), or "unknown".
      - `items[].detail.carrier.powerUnits` (integer | null): Declared power units on the latest filing
      - `items[].detail.carrier.links` (object): `carrier`: the full read. `vehicles`: the fleet walk.
- `page` (object)
  - `page.limit` (integer)
  - `page.nextCursor` (string | null): Pass as `cursor` for the next page; null on the last page
- `links`? (object): `identity`: the unit's identity card. One link per other history route for this VIN (`operators`, `crashes`), never the route itself. `carriers`: the carrier search from this VIN, which also finds the carriers a towed unit ran under.

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/operators?expand=detail" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const vinOperators = await client.v2.vin.operators("2T3R1RFV7MW180266", { expand: "detail" });
console.log(vinOperators.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

vin_operators = client.v2.vin.operators("2T3R1RFV7MW180266", expand="detail")
print(vin_operators.vin)
```

### GET /v2/vin/{vin}/crashes

Every crash on record for this unit *Since 2026-11-19.*

One item per crash report that names this VIN, most recent first: US federal crash reports (FMCSA: US DOT-regulated commercial vehicles, dated to the day) and New York State crash reports (every reportable crash in the state, dated to the year, since a New York report carries no day). Each item names the report as a document ref. `expand=detail` adds the report as it was filed, typed by `detail.type`: `fmcsa.crash` (state, report number, injuries, fatalities, tow-away, vehicles involved, and the carrier operating the unit) or `nydmv.crash` (year, injuries, fatalities). Counts on the report, never rates. No items is not evidence the vehicle was never in a crash. Costs 3 credits when there is at least one item, 0 when there is none.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `vin` | string | yes | 17-character VIN |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `expand` | string | no | `detail` |
| `limit` | integer | no | Page size |
| `cursor` | string | no | `page.nextCursor` from the previous page |

**Response 200** `VinCrashes`: Crash reports, most recent first

- `vin` (string)
- `items` (object[]): Most recent first
  - `items[].id` (string): The fact's content-derived id; stable across reads
  - `items[].observedAt` (string): When it was true in the world: YYYY-MM-DD, or YYYY when the record carries only the year (New York crash reports)
  - `items[].source` (string): Who asserted it, as a source ref: "gov:fmcsa"
  - `items[].value` (object)
    - `items[].value.ref` (string): The crash report for this unit, as a document ref: "document:crash/…"
  - `items[].detail`? (object): Present with `expand=detail`; null when the record behind the fact is no longer served
- `page` (object)
  - `page.limit` (integer)
  - `page.nextCursor` (string | null): Pass as `cursor` for the next page; null on the last page
- `links`? (object): `identity`: the unit's identity card. One link per other history route for this VIN (`operators`, `crashes`), never the route itself. `carriers`: the carrier search from this VIN, which also finds the carriers a towed unit ran under.

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266/crashes?expand=detail" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const vinCrashes = await client.v2.vin.crashes("2T3R1RFV7MW180266", { expand: "detail" });
console.log(vinCrashes.vin);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

vin_crashes = client.v2.vin.crashes("2T3R1RFV7MW180266", expand="detail")
print(vin_crashes.vin)
```

---

## Reference: Carriers

The motor carrier register: name → DOT number → fleet

**Availability: live** on `https://api.cardog.app`.

### GET /v2/carriers

Find a carrier by name, DOT number or VIN *Since 2026-10-27.*

One door into the motor carrier register. `q` is read as a US DOT number when it is all digits, as a VIN when it is 17 characters (the carriers that unit was observed under), and otherwise as a name to match against legal and trade names, best match first. `state` and `country` narrow a name match. Each item links to the carrier read and its fleet. Costs 1 credit.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | yes | A carrier name or part of one, a DOT number, or a VIN |
| `state` | string | no | State or province, two letters |
| `country` | string | no | Country: US, CA or MX |
| `limit` | integer | no | Match cap |

**Response 200** `CarrierSearch`: Matches, best first, with how `q` was read

- `query` (object)
  - `query.q` (string)
  - `query.matchedAs` ("name" | "dotNumber" | "vin"): How `q` was read: as a name to match, a DOT number to look up, or a VIN to walk from.
  - `query.state` (string | null)
  - `query.country` (string | null)
- `carriers` (object)
  - `carriers.count` (integer): Items returned (bounded by `limit`)
  - `carriers.items` (object[]): Best match first
    - `carriers.items[].dotNumber` (integer)
    - `carriers.items[].ref` (string): "org:usdot/{dotNumber}"
    - `carriers.items[].legalName` (string | null)
    - `carriers.items[].dbaName` (string | null): Trade name, when the carrier filed one
    - `carriers.items[].domicile` (object)
      - `carriers.items[].domicile.city` (string | null)
      - `carriers.items[].domicile.state` (string | null): State or province, two letters
      - `carriers.items[].domicile.country` (string | null): "US", "CA" or "MX"
    - `carriers.items[].operation` ("interstate" | "intrastate-hazmat" | "intrastate" | "unknown"): The carrier's operating classification on its filing: "interstate" (A), "intrastate-hazmat" (B), "intrastate" (C), or "unknown".
    - `carriers.items[].powerUnits` (integer | null): Declared power units on the latest filing
    - `carriers.items[].links` (object): `carrier`: the full read. `vehicles`: the fleet walk.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/carriers?q=bison%20transport&country=CA" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const carrierSearch = await client.v2.carriers.search({ q: "bison transport", country: "CA" });
console.log(carrierSearch.query);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

carrier_search = client.v2.carriers.search(q="bison transport", country="CA")
print(carrier_search.query)
```

### GET /v2/carriers/{dotNumber}

The carrier: identity, what it declared, what the road record shows *Since 2026-10-27.*

The carrier on the federal register by DOT number: legal and trade name, domicile (city, state, country), operating classification, the scale it declared on its latest filing (`declared`, self-reported and dated by `filedOn`), and what roadside inspections and crash reports recorded under it (`observed`: distinct units, inspections, crashes, first and last seen). Declared and observed never mix. A DOT number the road record names but the register does not answers 200 with `legalName` and every `declared` field null, the same DOT numbers `/vehicles` answers for; 404 when the DOT number is on neither. Costs 5 credits.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `dotNumber` | integer | yes | The carrier's US DOT number, e.g. `245330` |

**Response 200** `Carrier`: The carrier

- `dotNumber` (integer)
- `ref` (string)
- `legalName` (string | null): null when the DOT number is on the road record but not on the register
- `dbaName` (string | null)
- `domicile` (object)
  - `domicile.city` (string | null)
  - `domicile.state` (string | null): State or province, two letters
  - `domicile.country` (string | null): "US", "CA" or "MX"
- `operation` ("interstate" | "intrastate-hazmat" | "intrastate" | "unknown"): The carrier's operating classification on its filing: "interstate" (A), "intrastate-hazmat" (B), "intrastate" (C), or "unknown".
- `declared` (object): What the carrier filed about itself. Self-reported; dated by `filedOn`. Every field null when the DOT number is not on the register.
  - `declared.powerUnits` (integer | null)
  - `declared.drivers` (integer | null)
  - `declared.mileage` (object | null): Annual mileage as filed. Self-reported and often years old; read `filedOn` before using it as a denominator.
    - `declared.mileage.value` (integer): Miles
    - `declared.mileage.year` (integer | null): The year the mileage figure is for
  - `declared.filedOn` (string | null): Date of the latest filing these figures come from, YYYY-MM-DD
  - `declared.registeredOn` (string | null): Date the DOT number was first registered, YYYY-MM-DD
  - `declared.hazmat` (boolean | null): Filed as carrying hazardous materials
  - `declared.passengers` (boolean | null): Filed as a passenger carrier
- `observed` (object): What the roadside record shows. Counts, never rates.
  - `observed.vehicles` (integer): Distinct VINs seen under this carrier on an inspection or crash report
  - `observed.inspections` (integer): Every roadside inspection under this carrier, with or without a VIN on it; `vehicles`, `firstSeen` and `lastSeen` count only rows that carry a VIN, so do not divide one by the other
  - `observed.crashes` (integer)
  - `observed.firstSeen` (string | null): Earliest event under this carrier, YYYY-MM-DD
  - `observed.lastSeen` (string | null): Latest event under this carrier, YYYY-MM-DD
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/carriers/245330" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const carrier = await client.v2.carriers.getByDot("245330");
console.log(carrier.dotNumber);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

carrier = client.v2.carriers.get_by_dot("245330")
print(carrier.dot_number)
```

### GET /v2/carriers/{dotNumber}/vehicles

Every unit observed under a carrier *Since 2026-10-27.*

The fleet walk: every VIN an inspector or a crash report put under this DOT number, most recently seen first, with the roles it was seen in, first and last seen, its event counts, and a link to every carrier it was observed under. These are observed associations on dated rows, not a confirmed current fleet and not ownership. Pages by `cursor`; `vehicles.count` is the total across pages. 404 when the DOT number is on neither the register nor the road record. Costs 5 credits per page.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `dotNumber` | integer | yes | The carrier's US DOT number, e.g. `245330` |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | Page size |
| `cursor` | string | no | `page.nextCursor` from the previous page |

**Response 200** `CarrierVehicles`: One page of units, most recently seen first

- `dotNumber` (integer)
- `carrier` (object | null): null when the DOT number is not on the register but units were observed under it
  - `carrier.dotNumber` (integer)
  - `carrier.ref` (string): "org:usdot/{dotNumber}"
  - `carrier.legalName` (string | null)
  - `carrier.dbaName` (string | null): Trade name, when the carrier filed one
  - `carrier.domicile` (object)
    - `carrier.domicile.city` (string | null)
    - `carrier.domicile.state` (string | null): State or province, two letters
    - `carrier.domicile.country` (string | null): "US", "CA" or "MX"
  - `carrier.operation` ("interstate" | "intrastate-hazmat" | "intrastate" | "unknown"): The carrier's operating classification on its filing: "interstate" (A), "intrastate-hazmat" (B), "intrastate" (C), or "unknown".
  - `carrier.powerUnits` (integer | null): Declared power units on the latest filing
  - `carrier.links` (object): `carrier`: the full read. `vehicles`: the fleet walk.
- `vehicles` (object)
  - `vehicles.count` (integer): Distinct units observed under this carrier, all pages
  - `vehicles.items` (object[]): Most recently seen first
    - `vehicles.items[].vin` (string)
    - `vehicles.items[].roles` ("power" | "towed"[]): The roles this unit was observed in under this carrier: ["power"], ["towed"], or both
    - `vehicles.items[].firstSeen` (string | null): YYYY-MM-DD
    - `vehicles.items[].lastSeen` (string | null): YYYY-MM-DD
    - `vehicles.items[].inspections` (integer)
    - `vehicles.items[].crashes` (integer)
    - `vehicles.items[].links` (object): `operators`: every carrier this unit was observed under. `crashes`: its crash reports
- `page` (object)
  - `page.limit` (integer)
  - `page.nextCursor` (string | null): Pass as `cursor` for the next page; null on the last page
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/carriers/245330/vehicles?limit=100" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const carrierVehicles = await client.v2.carriers.vehicles("245330", { limit: 100 });
console.log(carrierVehicles.dotNumber);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

carrier_vehicles = client.v2.carriers.vehicles("245330", limit=100)
print(carrier_vehicles.dot_number)
```

---

## Reference: Feeds

An organization's own data set, built nightly, pulled by org key

**Availability: coming soon.** The contract below is frozen. The routes are not mounted yet.

### GET /v2/feeds

The organization's feed contracts and where each one stands *Since 2026-09-30.*

Every active feed contract the key's organization holds, each with the pointer to its current run or `null` before the first run. A feed is the organization's own data set, built nightly from the vehicle record and scoped to what the organization is entitled to. Org key only: a user key or session is 403 `forbidden`. Costs 0 credits.

**Response 200** `FeedsList`: The contracts and their current runs

- `feeds` (object[])
  - `feeds[].contract` (object)
    - `feeds[].contract.dataset` (string)
    - `feeds[].contract.fieldmap` (string)
    - `feeds[].contract.format` ("csv.gz" | "csv" | "jsonl.gz" | "jsonl" | "json.gz" | "json" | "parquet" | "pipe-csv")
    - `feeds[].contract.status` ("active" | "draft" | "suspended")
    - `feeds[].contract.cadence` (object)
      - `feeds[].contract.cadence.full` (boolean)
      - `feeds[].contract.cadence.delta` (boolean)
      - `feeds[].contract.cadence.weekly_full` (boolean)
  - `feeds[].latest` (object | null)
    - `feeds[].latest.runId` (string)
    - `feeds[].latest.deliveryId`? (string)
    - `feeds[].latest.kind` ("full" | "delta")
    - `feeds[].latest.producedAt` (string (date-time))

**Errors** (all use the ErrorEnvelope): 401, 403, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/feeds" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const feedsList = await client.v2.feeds.list();
console.log(feedsList.feeds);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

feeds_list = client.v2.feeds.list()
print(feeds_list.feeds)
```

### GET /v2/feeds/{dataset}/latest

The current run of one dataset, with signed links to its artifacts *Since 2026-09-30.*

The manifest of the current run, the dataset declaration the rows are typed by, and one signed 24-hour link per artifact (`full`, `delta`, and `deletes` when the dataset declares deletes). Open a link exactly as printed; it needs no key and costs 0 credits. Rows are csv, RFC 4180 quoted, sorted by the first field; a VIN matches a row by its pattern (positions 1–8, `*`, 10–11, plus 12–14 when position 3 is `9`). 404 when the organization holds no active contract for the dataset or no run has been published yet. Org key only.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `dataset` | string | yes | A dataset id, name@version, e.g. `vehicle-identity@1`. `GET /v2/feeds` lists the ones this organization holds |

**Response 200** `FeedLatest`: The current run, ready to read

- `contract` (object)
  - `contract.dataset` (string)
  - `contract.fieldmap` (string)
  - `contract.format` ("csv.gz" | "csv" | "jsonl.gz" | "jsonl" | "json.gz" | "json" | "parquet" | "pipe-csv")
  - `contract.status` ("active" | "draft" | "suspended")
  - `contract.cadence` (object)
    - `contract.cadence.full` (boolean)
    - `contract.cadence.delta` (boolean)
    - `contract.cadence.weekly_full` (boolean)
- `dataset` (object)
  - `dataset.id` (string)
  - `dataset.title` (string)
  - `dataset.status` ("ratified" | "draft")
  - `dataset.presets`? (object[])
    - `dataset.presets[].id` (string)
    - `dataset.presets[].title` (string)
    - `dataset.presets[].description` (string)
    - `dataset.presets[].fields` (string[])
  - `dataset.key`? (string[])
  - `dataset.ratifiedAt`? (string (date-time))
  - `dataset.semantics` (object)
    - `dataset.semantics.upsert` (boolean)
    - `dataset.semantics.delete` (boolean)
  - `dataset.fields` (object[])
    - `dataset.fields[].name` (string)
    - `dataset.fields[].type` ("string" | "integer" | "number" | "boolean" | "date" | "timestamp" | "ref")
    - `dataset.fields[].required` (boolean)
    - `dataset.fields[].joinKey`? (boolean)
    - `dataset.fields[].lifecycle`? (string)
    - `dataset.fields[].description`? (string)
    - `dataset.fields[].group`? (string)
    - `dataset.fields[].preset`? (boolean)
    - `dataset.fields[].pairedWith`? (string)
- `manifest` (object)
  - `manifest.schema` ("feed-manifest@1")
  - `manifest.contract` (string)
  - `manifest.dataset` (string)
  - `manifest.fieldmap` (string)
  - `manifest.runId` (string)
  - `manifest.deliveryId`? (string)
  - `manifest.kind` ("full" | "delta")
  - `manifest.baselineRunId`? (string)
  - `manifest.baselineDeliveryId`? (string)
  - `manifest.artifacts` (object[])
    - `manifest.artifacts[].name` (string)
    - `manifest.artifacts[].records` (integer)
    - `manifest.artifacts[].bytes` (integer)
    - `manifest.artifacts[].sha256` (string)
  - `manifest.window` (object)
    - `manifest.window.from` (string (date-time))
    - `manifest.window.to` (string (date-time))
  - `manifest.producedAt` (string (date-time))
  - `manifest.destinationPrefix` (string)
  - `manifest.columns`? (object[])
    - `manifest.columns[].name` (string)
    - `manifest.columns[].source` (string)
    - `manifest.columns[].type` ("string" | "integer" | "number" | "boolean" | "date" | "timestamp" | "ref")
    - `manifest.columns[].mapped`? (boolean)
  - `manifest.layout`? (object)
    - `manifest.layout.delimiter` ("," | "|" | "\t" | ";")
    - `manifest.layout.header` (boolean)
    - `manifest.layout.lineEnding` ("lf" | "crlf")
  - `manifest.schemaHash`? (string)
  - `manifest.counts`? (object)
    - `manifest.counts.conventions` (object)
- `artifacts` (object[])
  - `artifacts[].name` (string)
  - `artifacts[].records` (integer)
  - `artifacts[].bytes` (integer)
  - `artifacts[].sha256` (string)
  - `artifacts[].url` (string (uri))
  - `artifacts[].expiresAt` (string (date-time))
- `columns`? (object[])
  - `columns[].name` (string)
  - `columns[].source` (string)
  - `columns[].type` ("string" | "integer" | "number" | "boolean" | "date" | "timestamp" | "ref")
  - `columns[].mapped`? (boolean)
- `layout`? (object)
  - `layout.delimiter` ("," | "|" | "\t" | ";")
  - `layout.header` (boolean)
  - `layout.lineEnding` ("lf" | "crlf")

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/feeds/{dataset}/latest" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const feedLatest = await client.v2.feeds.latest("{dataset}");
console.log(feedLatest.contract);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

feed_latest = client.v2.feeds.latest("{dataset}")
print(feed_latest.contract)
```

### GET /v2/feeds/artifact/{runId}/{name}

A feed artifact, through the signed link a latest read returns *(no auth required)* *Since 2026-09-30.*

The bytes behind an `artifacts[].url` from `GET /v2/feeds/{dataset}/latest`. Open that link exactly as printed. It is signed and good for 24 hours; it needs no API key or session, and it costs 0 credits. `.gz` artifacts are served as `application/gzip`, plain ones as `text/csv`, `application/x-ndjson` or `application/json` by their extension; all as attachments. An invalid or expired link is 403 `forbidden`: request the latest read again for a fresh one. 404 when no artifact is held under that run and name; 503 when it could not be fetched right now.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | string | yes | The run id (the SHA-256 of the run's full), as printed in the link |
| `name` | string | yes | The artifact name, as printed in the link |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `t` | string | yes | Part of the link as printed |
| `d` | string | yes | Part of the link as printed |
| `exp` | integer | yes | Unix time (seconds) the link stops working: 24 hours from the read that printed it |
| `sig` | string | yes | The link's signature. Part of the link as printed; not something a caller computes |

**Response 200** `application/gzip`: The artifact as the builder wrote it

**Errors** (all use the ErrorEnvelope): 400, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/feeds/artifact/{runId}/{name}?t=%7Bt%7D&d=%7Bd%7D&exp=%7Bexp%7D&sig=%7Bsig%7D"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

// The signed link comes from latest(); the run reads the file behind it.
const run = await client.v2.feeds.latest("vehicle-identity@1");
console.log(run.artifact("{name}")?.url);
for await (const row of run.rows("{name}")) {
  console.log(row);
}
```

**Example: Python** (`pip install cardog`)

```python
from cardog import Cardog

client = Cardog()

result = client.v2.feeds.artifact("{runId}", "{name}", t="{t}", d="{d}", exp="{exp}", sig="{sig}")
```

---

## Reference: Safety

NCAP ratings + complaints

**Availability: live** on `https://api.cardog.app`.

### GET /v2/safety/{ref}

NCAP ratings for a model year *Since 2026-07-30.*

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `Safety`: Rated configurations + the headline rating

- `modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
- `best` (object | null)
  - `best.ref` (string): Ref of this rating. One rating exists per rated configuration (body style, drivetrain, variant, production release), so cite this ref rather than the model year.
  - `best.modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `best.makeRef` (string | null): Entity ref ({domain}:{key}) in the "make" domain. Example: "make:toyota"
  - `best.modelRef` (string | null): Entity ref ({domain}:{key}) in the "model" domain. Example: "model:toyota/rav4"
  - `best.year` (integer)
  - `best.make` (string | null): Display name, derived from makeRef
  - `best.model` (string | null): Display name, derived from modelRef
  - `best.config` (object)
    - `best.config.bodyStyleRef` (string | null): Body-style entity ref, e.g. "body-style:pickup"
    - `best.config.bodyCabRef` (string | null): Cab configuration entity ref for pickups, e.g. "body-cab:crew-super-crew-crew-max"
    - `best.config.driveTypeRefs` (string[])
    - `best.config.fuelTypeRef` (string | null)
    - `best.config.electrificationLevelRef` (string | null)
    - `best.config.nhtsaClass` ("passenger-car" | "suv" | "truck" | "van" | "bus")
    - `best.config.nhtsaSizeClass` ("mini" | "light" | "compact" | "medium" | "heavy")
    - `best.config.variant` (string | null)
  - `best.crash` (object)
    - `best.crash.overall` (object)
      - `best.crash.overall.stars` (integer | null)
      - `best.crash.overall.outOf` (5)
    - `best.crash.frontal` (object)
      - `best.crash.frontal.overall` (object)
      - `best.crash.frontal.driver` (object)
      - `best.crash.frontal.passenger` (object)
    - `best.crash.side` (object)
      - `best.crash.side.overall` (object)
      - `best.crash.side.driver` (object)
      - `best.crash.side.passenger` (object)
      - `best.crash.side.barrier` (object)
      - `best.crash.side.pole` (object)
    - `best.crash.combined` (object)
      - `best.crash.combined.front` (object)
      - `best.crash.combined.rear` (object)
    - `best.crash.rollover` (object)
      - `best.crash.rollover.stars` (object)
      - `best.crash.rollover.possibility` (object | null)
      - `best.crash.rollover.staticStabilityFactor` (object | null)
      - `best.crash.rollover.dynamicTip` ("no-tip" | "tip" | "not-tested")
  - `best.equipment` (object)
  - `best.published` (object)
    - `best.published.bodyStyle` (string | null)
    - `best.published.driveTrain` (string | null)
    - `best.published.vehicleClass` (string | null)
    - `best.published.vehicleType` (string | null)
    - `best.published.dynamicTipResult` (string | null)
    - `best.published.rolloverPossibility` (number | null)
    - `best.published.abs` (string | null)
    - `best.published.esc` (string | null)
    - `best.published.backupCamera` (string | null)
    - `best.published.blindSpotDetection` (string | null)
    - `best.published.frontCollisionWarning` (string | null)
    - `best.published.laneDepartureWarning` (string | null)
    - `best.published.crashImminentBrake` (string | null)
    - `best.published.dynamicBrakeSupport` (string | null)
    - `best.published.headSideAirbag` (string | null)
    - `best.published.torsoSideAirbag` (string | null)
  - `best.provenance` (object)
    - `best.provenance.sourceRef` (string)
    - `best.provenance.productionRelease` (integer)
  - `best.tested`? (boolean)
- `ratings` (object[])
  - `ratings[].ref` (string): Ref of this rating. One rating exists per rated configuration (body style, drivetrain, variant, production release), so cite this ref rather than the model year.
  - `ratings[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `ratings[].makeRef` (string | null): Entity ref ({domain}:{key}) in the "make" domain. Example: "make:toyota"
  - `ratings[].modelRef` (string | null): Entity ref ({domain}:{key}) in the "model" domain. Example: "model:toyota/rav4"
  - `ratings[].year` (integer)
  - `ratings[].make` (string | null): Display name, derived from makeRef
  - `ratings[].model` (string | null): Display name, derived from modelRef
  - `ratings[].config` (object)
    - `ratings[].config.bodyStyleRef` (string | null): Body-style entity ref, e.g. "body-style:pickup"
    - `ratings[].config.bodyCabRef` (string | null): Cab configuration entity ref for pickups, e.g. "body-cab:crew-super-crew-crew-max"
    - `ratings[].config.driveTypeRefs` (string[])
    - `ratings[].config.fuelTypeRef` (string | null)
    - `ratings[].config.electrificationLevelRef` (string | null)
    - `ratings[].config.nhtsaClass` ("passenger-car" | "suv" | "truck" | "van" | "bus")
    - `ratings[].config.nhtsaSizeClass` ("mini" | "light" | "compact" | "medium" | "heavy")
    - `ratings[].config.variant` (string | null)
  - `ratings[].crash` (object)
    - `ratings[].crash.overall` (object)
      - `ratings[].crash.overall.stars` (integer | null)
      - `ratings[].crash.overall.outOf` (5)
    - `ratings[].crash.frontal` (object)
      - `ratings[].crash.frontal.overall` (object)
      - `ratings[].crash.frontal.driver` (object)
      - `ratings[].crash.frontal.passenger` (object)
    - `ratings[].crash.side` (object)
      - `ratings[].crash.side.overall` (object)
      - `ratings[].crash.side.driver` (object)
      - `ratings[].crash.side.passenger` (object)
      - `ratings[].crash.side.barrier` (object)
      - `ratings[].crash.side.pole` (object)
    - `ratings[].crash.combined` (object)
      - `ratings[].crash.combined.front` (object)
      - `ratings[].crash.combined.rear` (object)
    - `ratings[].crash.rollover` (object)
      - `ratings[].crash.rollover.stars` (object)
      - `ratings[].crash.rollover.possibility` (object | null)
      - `ratings[].crash.rollover.staticStabilityFactor` (object | null)
      - `ratings[].crash.rollover.dynamicTip` ("no-tip" | "tip" | "not-tested")
  - `ratings[].equipment` (object)
  - `ratings[].published` (object)
    - `ratings[].published.bodyStyle` (string | null)
    - `ratings[].published.driveTrain` (string | null)
    - `ratings[].published.vehicleClass` (string | null)
    - `ratings[].published.vehicleType` (string | null)
    - `ratings[].published.dynamicTipResult` (string | null)
    - `ratings[].published.rolloverPossibility` (number | null)
    - `ratings[].published.abs` (string | null)
    - `ratings[].published.esc` (string | null)
    - `ratings[].published.backupCamera` (string | null)
    - `ratings[].published.blindSpotDetection` (string | null)
    - `ratings[].published.frontCollisionWarning` (string | null)
    - `ratings[].published.laneDepartureWarning` (string | null)
    - `ratings[].published.crashImminentBrake` (string | null)
    - `ratings[].published.dynamicBrakeSupport` (string | null)
    - `ratings[].published.headSideAirbag` (string | null)
    - `ratings[].published.torsoSideAirbag` (string | null)
  - `ratings[].provenance` (object)
    - `ratings[].provenance.sourceRef` (string)
    - `ratings[].provenance.productionRelease` (integer)
  - `ratings[].tested`? (boolean)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/model-year:honda%2Fcr-v%2F2026" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const safety = await client.v2.safety.ratings("model-year:honda/cr-v/2026");
console.log(safety.modelYearRef);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

safety = client.v2.safety.ratings("model-year:honda/cr-v/2026")
print(safety.model_year_ref)
```

### GET /v2/safety/{ref}/complaints

ODI complaints for a model year, paged *Since 2026-07-30.*

NHTSA publishes one row per affected component under one ODI number, so by default a complaint filed under three components is three rows. `group=complaint` returns one row per complaint with every component in `components` (crash and fire true if any row says so, injuries and deaths the largest reported), and `totalCount` counts complaints. `fields=list` trims `summary` to its first sentence, at most 160 characters.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year ref. Slashes in refs must be URL-encoded (%2F). |

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer | no | Page number |
| `limit` | integer | no | Page size, 1 to 100, or up to 500 with `group=complaint`; a larger value is refused with 400 |
| `group` | "complaint" | no | `complaint`: one row per complaint, with `components` |
| `fields` | "list" | no | `list`: `summary` trimmed to its first sentence for list views |

**Response 200** `Complaints`: Complaints, newest first

- `modelYearRef` (string | null): Null when the query covered more than one model year
- `totalCount` (integer): Rows across every page: complaints with `group=complaint`, complaint and component rows without it
- `complaints` (object[])
  - `complaints[].ref` (string): Ref of the complaint: "complaint:nhtsa/{odino}", where odino is the NHTSA ODI number. NHTSA publishes one row per affected component under the same number, so this ref identifies the complaint, not a single row.
  - `complaints[].modelYearRef` (string | null): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `complaints[].component` (string | null)
  - `complaints[].components`? (string[]): Present when `group=complaint`: every component NHTSA filed this complaint under, in filing order. The first is `component`.
  - `complaints[].summary` (string | null): The complainant's narrative. With `fields=list`, only its first sentence, at most 160 characters, ending in an ellipsis when cut.
  - `complaints[].incidentDate` (string | null): Date of the incident (ISO date, YYYY-MM-DD)
  - `complaints[].filedDate` (string | null): Date the complaint was filed (ISO date, YYYY-MM-DD)
  - `complaints[].crash` (boolean | null)
  - `complaints[].fire` (boolean | null)
  - `complaints[].injuries` (integer | null)
  - `complaints[].deaths` (integer | null)
  - `complaints[].source` (string): Source of the complaint: "nhtsa". Other values may be added.
- `pagination` (object)
  - `pagination.page` (integer)
  - `pagination.limit` (integer)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/model-year:honda%2Fcr-v%2F2026/complaints" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const complaints = await client.v2.safety.complaints("model-year:honda/cr-v/2026");
console.log(complaints.modelYearRef);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

complaints = client.v2.safety.complaints("model-year:honda/cr-v/2026")
print(complaints.model_year_ref)
```

### GET /v2/safety/{ref}/years

A model's years with recall and complaint counts *Since 2026-11-18.*

Every year of one model that the registry holds or that a recall or complaint names, newest first. Each year carries its model-year ref, the distinct recall campaigns per authority (each authority's count stands alone, never summed), and the NHTSA complaints filed against it. 404 when the model has no years at all.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model ref, e.g. "model:ford/f-150". Slashes in refs must be URL-encoded (%2F). |

**Response 200** `SafetyModelYears`: The model's years, newest first

- `modelRef` (string): Entity ref ({domain}:{key}) in the "model" domain. Example: "model:toyota/rav4"
- `years` (object[]): Every year with a registry entry, a recall or a complaint, newest first
  - `years[].year` (integer): Model year
  - `years[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `years[].recalls` (object): Distinct recall campaigns naming this model year, per authority code (e.g. {"tc": 4, "nhtsa": 6}). Each authority counts its own notices; the numbers are never summed into one. Empty when none.
  - `years[].complaints` (integer): NHTSA ODI complaints filed against this model year, each counted once

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/make:tesla/years" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const safetyModelYears = await client.v2.safety.years("make:tesla");
console.log(safetyModelYears.modelRef);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

safety_model_years = client.v2.safety.years("make:tesla")
print(safety_model_years.model_ref)
```

### GET /v2/safety/complaint:nhtsa/{odino}

One ODI complaint by ref *Since 2026-11-18.*

One complaint, addressed by its ref `complaint:nhtsa/{odino}`, grouped as a `group=complaint` row: the full summary, every component in `components`, crash and fire true if any row says so, injuries and deaths the largest reported, plus `modelYearRefs`, every model year it is filed against. 404 when NHTSA has no such complaint in the record.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `odino` | string | yes | The NHTSA ODI number, the key of the complaint ref (`complaint:nhtsa/11766824` → `11766824`). |

**Response 200** `ComplaintDetail`: The complaint

- `ref` (string): Ref of the complaint: "complaint:nhtsa/{odino}", where odino is the NHTSA ODI number. NHTSA publishes one row per affected component under the same number, so this ref identifies the complaint, not a single row.
- `modelYearRef` (string | null): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
- `component` (string | null)
- `components` (string[]): Every component NHTSA filed this complaint under, in filing order. The first is `component`.
- `summary` (string | null): The complainant's narrative. With `fields=list`, only its first sentence, at most 160 characters, ending in an ellipsis when cut.
- `incidentDate` (string | null): Date of the incident (ISO date, YYYY-MM-DD)
- `filedDate` (string | null): Date the complaint was filed (ISO date, YYYY-MM-DD)
- `crash` (boolean | null)
- `fire` (boolean | null)
- `injuries` (integer | null)
- `deaths` (integer | null)
- `source` (string): Source of the complaint: "nhtsa". Other values may be added.
- `modelYearRefs` (string[]): Every model year the complaint is filed against, in filing order. The first is `modelYearRef`.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/complaint:nhtsa/{odino}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const complaintDetail = await client.v2.safety.complaint("{odino}");
console.log(complaintDetail.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

complaint_detail = client.v2.safety.complaint("{odino}")
print(complaint_detail.ref)
```

### GET /v2/safety/complaints/recent

The newest ODI complaints across every vehicle *Since 2026-11-18.*

The newest complaints NHTSA has filed, across every make and model, newest first. Each row is grouped by complaint like a `group=complaint` row (every component, crash and fire true if any row says so, injuries and deaths the largest reported), with `modelYearRefs` and `summary` trimmed to its first sentence, at most 160 characters. Read the full text at `GET /v2/safety/complaint:nhtsa/{odino}`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | Complaints to return, 1 to 100 |

**Response 200** `RecentComplaints`: Complaints, newest first

- `complaints` (object[]): Newest filed first. Each row is grouped by complaint (every component, every model year) with `summary` trimmed to its first sentence, at most 160 characters.
  - `complaints[].ref` (string): Ref of the complaint: "complaint:nhtsa/{odino}", where odino is the NHTSA ODI number. NHTSA publishes one row per affected component under the same number, so this ref identifies the complaint, not a single row.
  - `complaints[].modelYearRef` (string | null): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `complaints[].component` (string | null)
  - `complaints[].components` (string[]): Every component NHTSA filed this complaint under, in filing order. The first is `component`.
  - `complaints[].summary` (string | null): The complainant's narrative. With `fields=list`, only its first sentence, at most 160 characters, ending in an ellipsis when cut.
  - `complaints[].incidentDate` (string | null): Date of the incident (ISO date, YYYY-MM-DD)
  - `complaints[].filedDate` (string | null): Date the complaint was filed (ISO date, YYYY-MM-DD)
  - `complaints[].crash` (boolean | null)
  - `complaints[].fire` (boolean | null)
  - `complaints[].injuries` (integer | null)
  - `complaints[].deaths` (integer | null)
  - `complaints[].source` (string): Source of the complaint: "nhtsa". Other values may be added.
  - `complaints[].modelYearRefs` (string[]): Every model year the complaint is filed against, in filing order. The first is `modelYearRef`.

**Errors** (all use the ErrorEnvelope): 400, 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/complaints/recent" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const recentComplaints = await client.v2.safety.recentComplaints();
console.log(recentComplaints.complaints);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

recent_complaints = client.v2.safety.recent_complaints()
print(recent_complaints.complaints)
```

### GET /v2/safety/complaints/top

The model years with the most complaints in a window *Since 2026-11-18.*

Model years ranked by the distinct NHTSA complaints filed against them in the last `months` months (from `since`, inclusive). `crashes` and `fires` count the complaints that report one; `injuries` and `deaths` add up what each complaint reports. A complaint filed against several model years counts once for each.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `months` | integer | no | The window, in months back from today |
| `limit` | integer | no | Model years to return, 1 to 100 |

**Response 200** `TopComplaints`: Model years, most complaints first

- `months` (integer): The window, in months back from today
- `since` (string): First day of the window (ISO date, YYYY-MM-DD): complaints filed on or after it count
- `modelYears` (object[]): Most complaints first
  - `modelYears[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `modelYears[].complaints` (integer): Distinct complaints filed in the window
  - `modelYears[].crashes` (integer): Of those, complaints that report a crash
  - `modelYears[].fires` (integer): Of those, complaints that report a fire
  - `modelYears[].injuries` (integer): Injuries reported across those complaints
  - `modelYears[].deaths` (integer): Deaths reported across those complaints

**Errors** (all use the ErrorEnvelope): 400, 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/complaints/top" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const topComplaints = await client.v2.safety.topComplaints();
console.log(topComplaints.months);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

top_complaints = client.v2.safety.top_complaints()
print(top_complaints.months)
```

### GET /v2/safety/{ref}/complaints/summary

Complaint counts for a model year or a model *Since 2026-11-19.*

Counts a vehicle's NHTSA owner complaints instead of listing them: distinct complaints (ODI numbers), crashes, fires, injuries and deaths, and the count per component system, per filing month and per model year. Takes a model-year ref or a model ref (every year of the model).

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year ref or a model ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `ComplaintsSummary`: Complaint counts

- `ref` (string): The scope that was counted: a model-year ref or a model ref
- `totalCount` (integer): Distinct complaints (ODI numbers) in scope
- `crashes` (integer): Complaints that report a crash
- `fires` (integer): Complaints that report a fire
- `injuryComplaints` (integer): Complaints that report at least one injury
- `injuries` (integer): People reported injured, summed across complaints
- `deaths` (integer): Deaths reported, summed across complaints
- `firstFiled` (string | null): Earliest filing date in scope (ISO date). Null when there are no complaints.
- `lastFiled` (string | null): Latest filing date in scope (ISO date). Null when there are no complaints.
- `bySystem` (object[]): Complaints per component system, most complained first
  - `bySystem[].system` (string | null): The component system as NHTSA files it: the part of the component before the first colon ("POWER TRAIN" for "POWER TRAIN:AUTOMATIC TRANSMISSION"). Null when the complaint names no component.
  - `bySystem[].complaints` (integer): Complaints that name this system
- `byMonth` (object[]): Complaints per filing month, oldest first; months with no complaints are omitted
  - `byMonth[].month` (string): Month the complaints were filed with NHTSA, YYYY-MM
  - `byMonth[].complaints` (integer)
- `byModelYear` (object[]): Complaints per model year, newest first. One entry for a model-year scope.
  - `byModelYear[].modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
  - `byModelYear[].year` (integer)
  - `byModelYear[].complaints` (integer)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/safety/model-year:honda%2Fcr-v%2F2026/complaints/summary" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const complaintsSummary = await client.v2.safety.complaintsSummary("model-year:honda/cr-v/2026");
console.log(complaintsSummary.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

complaints_summary = client.v2.safety.complaints_summary("model-year:honda/cr-v/2026")
print(complaints_summary.ref)
```

---

## Reference: Charging

EV charging stations (ODbL)

**Availability: live** on `https://api.cardog.app`.

### GET /v2/charging/stations

EV charging stations near a point *Since 2026-08-31.*

Radius search over our own database of charging stations, with no live dependency. Nearest first. Station data is ODbL 1.0: responses carry the `attribution` string; surface it wherever stations render.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | number | yes | Search-center latitude |
| `lng` | number | yes | Search-center longitude |
| `radius_km` | number | no | Search radius in km |
| `connector` | integer | no | Numeric connection type id: stations with at least one matching connector |
| `min_power_kw` | number | no | Minimum station max-power in kW |
| `status` | "Operational" \| "NonOperational" \| "any" | no | Status filter; default serves only operational stations |
| `limit` | integer | no | Station cap |

**Response 200** `ChargingSearch`: Stations nearest first, with the ODbL attribution

- `total` (integer): Number of stations returned, at most `limit`
- `stations` (object[]): Nearest first
  - `stations[].ref` (string): Entity ref ({domain}:{key}) in the "station" domain. Example: "station:ocm/248113"
  - `stations[].id` (string): Station id, the tail of the station ref
  - `stations[].source` (string): Station namespace, the middle segment of the station ref: "ocm". Other values may be added.
  - `stations[].name` (string | null)
  - `stations[].address` (object)
    - `stations[].address.street` (string | null)
    - `stations[].address.city` (string | null)
    - `stations[].address.state` (string | null)
    - `stations[].address.postalCode` (string | null)
    - `stations[].address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `stations[].location` (object)
    - `stations[].location.latitude` (number)
    - `stations[].location.longitude` (number)
  - `stations[].connectors` (object[])
    - `stations[].connectors[].connectionTypeId` (integer): Numeric connection type id (0 = unspecified)
    - `stations[].connectors[].connectionType` (string): Connector type name, e.g. "CCS Type 1", "NACS"
    - `stations[].connectors[].powerKW` (number): Rated power in kW (0 = unknown)
    - `stations[].connectors[].currentType` ("AC" | "DC")
    - `stations[].connectors[].level` (integer): Charging level 1–3 (0 = unspecified)
    - `stations[].connectors[].voltage` (number): Volts (0 = unknown)
    - `stations[].connectors[].amperage` (number): Amps (0 = unknown)
    - `stations[].connectors[].quantity` (integer | null): Number of connectors of this type at the station
  - `stations[].maxPowerKw` (number | null): Highest rated power of any connector at the station, in kW
  - `stations[].numberOfPoints` (integer | null): Number of charge points at the station
  - `stations[].operator` (string | null)
  - `stations[].status` (string): Station status: "Operational" or "NonOperational". Decommissioned stations are kept in the dataset, so filter on this field.
  - `stations[].usage` (string | null): Usage class, e.g. "Public", "Private - Restricted Access"
  - `stations[].isMembershipRequired` (boolean | null)
  - `stations[].isPayAtLocation` (boolean | null)
  - `stations[].dateCreated` (string | null): When the source first recorded the station (ISO 8601)
  - `stations[].dateLastVerified` (string | null): Last source verification (ISO 8601)
  - `stations[].poi` (string | null): The place this station is at: a `poi:{geohash}` ref, readable at `/v2/locations/{geohash}`. A fuel station or dealer at the same spot shares it. Null when the station has no place.
  - `stations[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): When the data was last refreshed (ISO 8601)
- `attribution` (string): Licence attribution string (ODbL 1.0). Must be shown wherever station data is displayed.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/charging/stations?lat=43.6532&lng=-79.3832&radius_km=10" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const chargingSearch = await client.v2.charging.search({ lat: 43.6532, lng: -79.3832, radius_km: 10 });
console.log(chargingSearch.total);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

charging_search = client.v2.charging.search(lat=43.6532, lng=-79.3832, radius_km=10)
print(charging_search.total)
```

### GET /v2/charging/stations/{id}

One charging station by id *Since 2026-08-31.*

Each station carries `poi` (added 2026-10-26, additive): the `poi:{geohash}` ref of the place it is at, readable at `/v2/locations/{geohash}`, or null when the station has no place.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Station id, the tail of the station ref |

**Response 200** `ChargingStationDetail`: The station record, with the ODbL attribution

- `station` (object)
  - `station.ref` (string): Entity ref ({domain}:{key}) in the "station" domain. Example: "station:ocm/248113"
  - `station.id` (string): Station id, the tail of the station ref
  - `station.source` (string): Station namespace, the middle segment of the station ref: "ocm". Other values may be added.
  - `station.name` (string | null)
  - `station.address` (object)
    - `station.address.street` (string | null)
    - `station.address.city` (string | null)
    - `station.address.state` (string | null)
    - `station.address.postalCode` (string | null)
    - `station.address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `station.location` (object)
    - `station.location.latitude` (number)
    - `station.location.longitude` (number)
  - `station.connectors` (object[])
    - `station.connectors[].connectionTypeId` (integer): Numeric connection type id (0 = unspecified)
    - `station.connectors[].connectionType` (string): Connector type name, e.g. "CCS Type 1", "NACS"
    - `station.connectors[].powerKW` (number): Rated power in kW (0 = unknown)
    - `station.connectors[].currentType` ("AC" | "DC")
    - `station.connectors[].level` (integer): Charging level 1–3 (0 = unspecified)
    - `station.connectors[].voltage` (number): Volts (0 = unknown)
    - `station.connectors[].amperage` (number): Amps (0 = unknown)
    - `station.connectors[].quantity` (integer | null): Number of connectors of this type at the station
  - `station.maxPowerKw` (number | null): Highest rated power of any connector at the station, in kW
  - `station.numberOfPoints` (integer | null): Number of charge points at the station
  - `station.operator` (string | null)
  - `station.status` (string): Station status: "Operational" or "NonOperational". Decommissioned stations are kept in the dataset, so filter on this field.
  - `station.usage` (string | null): Usage class, e.g. "Public", "Private - Restricted Access"
  - `station.isMembershipRequired` (boolean | null)
  - `station.isPayAtLocation` (boolean | null)
  - `station.dateCreated` (string | null): When the source first recorded the station (ISO 8601)
  - `station.dateLastVerified` (string | null): Last source verification (ISO 8601)
  - `station.poi` (string | null): The place this station is at: a `poi:{geohash}` ref, readable at `/v2/locations/{geohash}`. A fuel station or dealer at the same spot shares it. Null when the station has no place.
  - `station.links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): When the data was last refreshed (ISO 8601)
- `attribution` (string): Licence attribution string (ODbL 1.0). Must be shown wherever station data is displayed.

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/charging/stations/248113" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const chargingStationDetail = await client.v2.charging.station("248113");
console.log(chargingStationDetail.station);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

charging_station_detail = client.v2.charging.station("248113")
print(charging_station_detail.station)
```

---

## Reference: Parts

OEM part numbers by model year, linked to the manufacturer's official parts store

**Availability: live** on `https://api.cardog.app`.

### GET /v2/parts/{ref}

OEM part numbers for a model year or build code, with where to buy them *Since 2026-10-26.*

The manufacturer part numbers on record for a model year, each with the document that names it and, where known, a link to that number on the manufacturer's official parts store. The root `acquire` lists the official stores for the make by market. Parts apply at the model-year grain: a part listed applies to some builds of the model year, not necessarily every vehicle. A `nano:` ref is answered at its model year. Today the parts are the numbers named in recall campaigns, so `coverage.complete` is false: this is not the full catalogue. No prices; the store has the current one.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ref` | string | yes | A model-year: or nano: ref. Slashes in refs must be URL-encoded (%2F). |

**Response 200** `Parts`: Parts with sources, links to the official store, and the stores for the make

- `ref` (string): The queried ref
- `grain` ("model-year"): The grain the parts apply at. "model-year": each part applies to some builds of the model year, not necessarily every vehicle. A nano request is answered at this grain.
- `modelYearRef` (string): Entity ref ({domain}:{key}) in the "model-year" domain. Example: "model-year:toyota/rav4/2021"
- `total` (integer)
- `parts` (object[])
  - `parts[].ref` (string): Entity ref ({domain}:{key}) in the "part" domain. Example: "part:hyundai/4295118110"
  - `parts[].partNumber` (string): The number as the manufacturer printed it, e.g. "42951-18110"
  - `parts[].make` (string): The make the part is sold under
  - `parts[].name` (string | null): The manufacturer's name for the part
  - `parts[].description` (string | null)
  - `parts[].component` (object | null): The component the part belongs to. A `ref` into the shared component tree joins this object when the tree ships (additive).
    - `parts[].component.asPublished` (string): The system it belongs to, verbatim as the authority files it, e.g. "PARKING BRAKE:ELECTRICAL:CONTROL MODULE:SOFTWARE". The same field name recall rows use for the same text.
  - `parts[].sources` (object[])
    - `parts[].sources[].source` (string): Who issued it, as an authority id, e.g. "gov:nhtsa"
    - `parts[].sources[].ref` (string): The document that names the part (today: the recall campaign it was filed with)
    - `parts[].sources[].observedAt` (string | null): When that document was published (ISO date); null if undated
  - `parts[].recalls` (string[]): The recall campaigns that name this part for this model year: the distinct recall refs among `sources`.
  - `parts[].acquire`? (object[]): This number on the manufacturer's official store, where a link to it is known. Absent otherwise; use the root `acquire` stores.
    - `parts[].acquire[].market` ("CA" | "US"): Market the store sells into
    - `parts[].acquire[].kind` ("search" | "product"): "search" opens the store's search for this number; "product" opens the part's own page
    - `parts[].acquire[].url` (string (uri))
- `acquire` (object[]): The manufacturer's official parts stores for this make, by market. Empty when none is on file.
  - `acquire[].make` (string): Entity ref ({domain}:{key}) in the "make" domain. Example: "make:toyota"
  - `acquire[].market` ("CA" | "US"): Market the store sells into
  - `acquire[].name` (string): The store's own name, e.g. "Hyundai Canada Parts"
  - `acquire[].url` (string (uri)): The store's home page (absolute URL on the manufacturer's site)
- `coverage` (object)
  - `coverage.complete` (false): Always false today: the list is the part numbers named on the public record, not the full catalogue for the vehicle
  - `coverage.sources` (string[]): The authorities whose records the list rests on, e.g. ["gov:nhtsa"]
  - `coverage.unpaired` (integer): Part numbers a document names for several vehicles at once without saying which is this one's (a multi-vehicle recall filed as a cross product). Not in `parts`: listing them would claim a fit the record does not make.
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/parts/model-year:hyundai%2Fioniq-5%2F2022" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const parts = await client.v2.parts.byRef("model-year:hyundai/ioniq-5/2022");
console.log(parts.ref);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

parts = client.v2.parts.by_ref("model-year:hyundai/ioniq-5/2022")
print(parts.ref)
```

---

## Reference: Fuel

Fuel stations and pump prices in Canada

**Availability: live** on `https://api.cardog.app`.

### GET /v2/fuel/stations

Fuel stations near a point, with current prices *Since 2026-10-26.*

Radius search over our daily snapshot of Canadian fuel stations, with no live dependency. Each station carries its current posted prices (newest post per fuel and payment, at most 7 days old) in Canadian cents per litre. Nearest first, or cheapest first with `sort=price` and a `fuel`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | number | yes | Search-center latitude |
| `lng` | number | yes | Search-center longitude |
| `radius_km` | number | no | Search radius in km |
| `fuel` | "regular" \| "midgrade" \| "premium" \| "diesel" \| "e85" \| "propane" | no | Only stations with a current price for this fuel |
| `sort` | "distance" \| "price" | no | Nearest first, or cheapest current credit price first (needs `fuel`) |
| `limit` | integer | no | Station cap |

**Response 200** `FuelStationSearch`: Stations with current prices

- `total` (integer): Number of stations returned, at most `limit`
- `stations` (object[])
  - `stations[].ref` (string): Entity ref ({domain}:{key}) in the "poi" domain. Example: "poi:dpz9cxmmw0"
  - `stations[].id` (string): The station's id: a 10-character geohash of its location, the ref without "poi:" (e.g. "dpz9cxmmw0")
  - `stations[].name` (string | null)
  - `stations[].brand` (string | null)
  - `stations[].address` (object)
    - `stations[].address.street` (string | null)
    - `stations[].address.city` (string | null)
    - `stations[].address.state` (string | null): Province or territory code, e.g. "ON"
    - `stations[].address.postalCode` (string | null)
    - `stations[].address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `stations[].location` (object)
    - `stations[].location.latitude` (number)
    - `stations[].location.longitude` (number)
  - `stations[].fuels` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"[]): Fuels the station sells
  - `stations[].amenities` (string[]): e.g. "c_store", "pay_at_pump", "restrooms". Other values may be added.
  - `stations[].openingHours` (string | null)
  - `stations[].prices` (object[]): Current prices: the newest post per fuel and payment, at most 7 days old
    - `stations[].prices[].fuel` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"): Fuel: a gasoline grade (regular, midgrade, premium) or diesel, e85, propane
    - `stations[].prices[].fuelType` (string): Fuel-type entity ref, e.g. "fuel-type:gasoline"
    - `stations[].prices[].payment` ("credit" | "cash"): Price paying by card or by cash; most stations post credit only
    - `stations[].prices[].centsPerLitre` (number): Posted price, Canadian cents per litre
    - `stations[].prices[].currency` ("CAD")
    - `stations[].prices[].postedAt` (string): When the price was posted (ISO 8601)
    - `stations[].prices[].reportedBy` (string | null): Who posted it: "owner" (the station) or "member" / "visitor" (a driver). Other values may be added.
  - `stations[].lastSeen` (string): The newest daily snapshot the station appeared in (YYYY-MM-DD)
  - `stations[].distanceKm`? (number): Distance from the search point, in km (search results only)
  - `stations[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): The newest daily snapshot served (YYYY-MM-DD)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/fuel/stations?lat=43.6532&lng=-79.3832&radius_km=5&fuel=regular" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const fuelStationSearch = await client.v2.fuel.search({
  lat: 43.6532,
  lng: -79.3832,
  radius_km: 5,
  fuel: "regular",
});
console.log(fuelStationSearch.total);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

fuel_station_search = client.v2.fuel.search(lat=43.6532, lng=-79.3832, radius_km=5, fuel="regular")
print(fuel_station_search.total)
```

### GET /v2/fuel/stations/{id}

One fuel station by id, with current prices *Since 2026-10-26.*

The id is the station's 10-character geohash: its ref without "poi:" (e.g. `dpz9cxmmw0` for `poi:dpz9cxmmw0`). Anything else is a 404.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Station id: a 10-character geohash, the ref without "poi:" (e.g. "dpz9cxmmw0") |

**Response 200** `FuelStationDetail`: The station record with its current prices

- `station` (object)
  - `station.ref` (string): Entity ref ({domain}:{key}) in the "poi" domain. Example: "poi:dpz9cxmmw0"
  - `station.id` (string): The station's id: a 10-character geohash of its location, the ref without "poi:" (e.g. "dpz9cxmmw0")
  - `station.name` (string | null)
  - `station.brand` (string | null)
  - `station.address` (object)
    - `station.address.street` (string | null)
    - `station.address.city` (string | null)
    - `station.address.state` (string | null): Province or territory code, e.g. "ON"
    - `station.address.postalCode` (string | null)
    - `station.address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `station.location` (object)
    - `station.location.latitude` (number)
    - `station.location.longitude` (number)
  - `station.fuels` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"[]): Fuels the station sells
  - `station.amenities` (string[]): e.g. "c_store", "pay_at_pump", "restrooms". Other values may be added.
  - `station.openingHours` (string | null)
  - `station.prices` (object[]): Current prices: the newest post per fuel and payment, at most 7 days old
    - `station.prices[].fuel` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"): Fuel: a gasoline grade (regular, midgrade, premium) or diesel, e85, propane
    - `station.prices[].fuelType` (string): Fuel-type entity ref, e.g. "fuel-type:gasoline"
    - `station.prices[].payment` ("credit" | "cash"): Price paying by card or by cash; most stations post credit only
    - `station.prices[].centsPerLitre` (number): Posted price, Canadian cents per litre
    - `station.prices[].currency` ("CAD")
    - `station.prices[].postedAt` (string): When the price was posted (ISO 8601)
    - `station.prices[].reportedBy` (string | null): Who posted it: "owner" (the station) or "member" / "visitor" (a driver). Other values may be added.
  - `station.lastSeen` (string): The newest daily snapshot the station appeared in (YYYY-MM-DD)
  - `station.distanceKm`? (number): Distance from the search point, in km (search results only)
  - `station.links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `asOf`? (string): The newest daily snapshot served (YYYY-MM-DD)

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/fuel/stations/dpz9cxmmw0" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const fuelStationDetail = await client.v2.fuel.station("dpz9cxmmw0");
console.log(fuelStationDetail.station);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

fuel_station_detail = client.v2.fuel.station("dpz9cxmmw0")
print(fuel_station_detail.station)
```

### GET /v2/fuel/prices

Daily pump prices for Canada, a province or a postal FSA *Since 2026-10-26.*

The daily median, p10, p90 and mean of current credit prices across stations in an area, for one fuel, oldest first. Areas: `CA`, a province (`CA-ON`), or a forward sortation area (`L3Y`, the first three characters of a postal code).

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `area` | string | no | "CA", a province like "CA-ON", or an FSA like "L3Y" |
| `fuel` | "regular" \| "midgrade" \| "premium" \| "diesel" \| "e85" \| "propane" | no | Fuel |
| `days` | integer | no | Days of history |

**Response 200** `FuelPrices`: The area's daily price series

- `area` (string)
- `areaKind` ("country" | "province" | "fsa")
- `fuel` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"): Fuel: a gasoline grade (regular, midgrade, premium) or diesel, e85, propane
- `fuelType` (string): Fuel-type entity ref, e.g. "fuel-type:gasoline"
- `currency` ("CAD")
- `latest` (object | null): The newest day in the series, or null when the area has no prices
  - `latest.date` (string): YYYY-MM-DD
  - `latest.stations` (integer): Stations with a current credit price that day
  - `latest.medianCentsPerLitre` (number)
  - `latest.p10CentsPerLitre` (number): 10th percentile: the cheap end
  - `latest.p90CentsPerLitre` (number): 90th percentile: the expensive end
  - `latest.meanCentsPerLitre` (number)
- `series` (object[]): One entry per day with prices, oldest first
  - `series[].date` (string): YYYY-MM-DD
  - `series[].stations` (integer): Stations with a current credit price that day
  - `series[].medianCentsPerLitre` (number)
  - `series[].p10CentsPerLitre` (number): 10th percentile: the cheap end
  - `series[].p90CentsPerLitre` (number): 90th percentile: the expensive end
  - `series[].meanCentsPerLitre` (number)
- `asOf`? (string): The newest daily snapshot served (YYYY-MM-DD)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/fuel/prices?area=CA-ON&fuel=regular&days=30" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const fuelPrices = await client.v2.fuel.prices({ area: "CA-ON", fuel: "regular", days: 30 });
console.log(fuelPrices.area);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

fuel_prices = client.v2.fuel.prices(area="CA-ON", fuel="regular", days=30)
print(fuel_prices.area)
```

---

## Reference: Locations

Places a driver goes: fuel stations, chargers and dealers, one ref each

**Availability: live** on `https://api.cardog.app`.

### GET /v2/locations

Places near a point: fuel stations, chargers and dealers *Since 2026-10-26.*

Radius search over every place a driver goes, one `poi:{geohash}` ref per place: a gas station with chargers is one place with two kinds. A place is listed when any requested kind is live (a fuel station seen in the last 7 days, an operational charger, a dealer seen in the last 7 days). Nearest first. Each hit links to its own group's record (`links.fuel`, `links.charging`).

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | number | yes | Search-center latitude |
| `lng` | number | yes | Search-center longitude |
| `radius_km` | number | no | Search radius in km |
| `kind` | string | no | Only places of these kinds: a comma list of "fuel", "charging", "seller" (e.g. "fuel,charging") |
| `limit` | integer | no | Place cap |

**Response 200** `LocationSearch`: Places nearest first

- `total` (integer): Number of places returned, at most `limit`
- `locations` (object[]): Nearest first
  - `locations[].ref` (string): Entity ref ({domain}:{key}) in the "poi" domain. Example: "poi:dpz9cxmmw0"
  - `locations[].id` (string): The place's id: a 10-character geohash of its location, the ref without "poi:" (e.g. "dpz9cxmmw0")
  - `locations[].kinds` ("fuel" | "charging" | "seller"[]): Every kind the place is, e.g. a gas station with chargers is ["fuel", "charging"]
  - `locations[].name` (string | null)
  - `locations[].brand` (string | null)
  - `locations[].address` (object)
    - `locations[].address.street` (string | null)
    - `locations[].address.city` (string | null)
    - `locations[].address.state` (string | null): Province or territory code, e.g. "ON"
    - `locations[].address.postalCode` (string | null)
    - `locations[].address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `locations[].location` (object)
    - `locations[].location.latitude` (number)
    - `locations[].location.longitude` (number)
  - `locations[].distanceKm` (number): Distance from the search point, in km
  - `locations[].links`? (object): `self`, plus `fuel` (the /v2/fuel station) when kinds has fuel and `charging` (the /v2/charging station) when kinds has charging
- `asOf`? (string): The newest day any place was seen (YYYY-MM-DD)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/locations?lat=43.6532&lng=-79.3832&radius_km=5&kind=fuel" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const locationSearch = await client.v2.locations.search({
  lat: 43.6532,
  lng: -79.3832,
  radius_km: 5,
  kind: "fuel",
});
console.log(locationSearch.total);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

location_search = client.v2.locations.search(lat=43.6532, lng=-79.3832, radius_km=5, kind="fuel")
print(location_search.total)
```

### GET /v2/locations/dealers

Dealers by name or organization, each with its place *Since 2026-11-20.*

Finds dealers by name (`q`, case-insensitive, any part of the name), by organization ref (`org`), or both; give at least one. Each dealer comes with the place it is at (the `poi:` ref, address and coordinates `/v2/locations` serves), so `place.kinds` has "charging" when chargers share the place and `place.links.charging` reads them. Covers dealers in Canada that were active in the last 7 days. A name equal to `q` comes first, then shorter names. A name or organization with no match is an empty list, not a 404; for a dealer outside Canada that means not covered, not that the dealer does not exist.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | no | A dealer name or part of one, e.g. "downtown ford" |
| `org` | string | no | A dealer organization's ref, as `sellers.dealers[].org` carries it (e.g. "org:cardog/0b6f…") |
| `limit` | integer | no | Dealer cap |

**Response 200** `LocationDealers`: Dealers, a name equal to `q` first, then shorter names

- `total` (integer): Number of entries in `dealers`, at most `limit`. A dealer at two places is two entries.
- `dealers` (object[]): Dealers active in the last 7 days, in Canada. A name equal to `q` comes first, then shorter names.
  - `dealers[].org` (string): The dealer organization's ref, e.g. "org:cardog/0b6f…"
  - `dealers[].name` (string | null): The dealer's business name. Null when none is on record, which only an `org` lookup can return.
  - `dealers[].place` (object): The place the dealer is at: its ref, address and coordinates. `kinds` has "charging" when chargers share the place. The place's own name is not here, because a place shared with another business can carry that business's name; `GET /v2/locations/{id}` serves it.
    - `dealers[].place.ref` (string): Entity ref ({domain}:{key}) in the "poi" domain. Example: "poi:dpz9cxmmw0"
    - `dealers[].place.id` (string): The place's id: a 10-character geohash of its location, the ref without "poi:" (e.g. "dpz9cxmmw0")
    - `dealers[].place.kinds` ("fuel" | "charging" | "seller"[]): Every kind the place is, e.g. a gas station with chargers is ["fuel", "charging"]
    - `dealers[].place.address` (object)
      - `dealers[].place.address.street` (string | null)
      - `dealers[].place.address.city` (string | null)
      - `dealers[].place.address.state` (string | null): Province or territory code, e.g. "ON"
      - `dealers[].place.address.postalCode` (string | null)
      - `dealers[].place.address.country` (string | null): Country code (ISO 3166-1 alpha-2)
    - `dealers[].place.location` (object)
      - `dealers[].place.location.latitude` (number)
      - `dealers[].place.location.longitude` (number)
    - `dealers[].place.links`? (object): `self`, plus `fuel` and `charging` as on a search hit
- `asOf`? (string): The newest day any place was seen (YYYY-MM-DD)
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/locations/dealers?q=downtown%20ford" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const locationDealers = await client.v2.locations.dealers({ q: "downtown ford" });
console.log(locationDealers.total);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

location_dealers = client.v2.locations.dealers(q="downtown ford")
print(location_dealers.total)
```

### GET /v2/locations/{id}

One place by id, with each kind's detail *Since 2026-10-26.*

The id is the place's 10-character geohash: its ref without "poi:" (e.g. `dpz9cxmmw0`). Anything else is a 404. Each kind's block (`fuel`, `charging`, `sellers`) is in its own group's shape, or null when the place is not that kind. One place can hold several dealers (an auto mall): `sellers.dealers` lists those seen in the last 7 days. The charging block carries the licence attribution (ODbL 1.0); show it wherever station data renders.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Place id: a 10-character geohash, the ref without "poi:" (e.g. "dpz9cxmmw0") |

**Response 200** `LocationDetailResponse`: The place with its fuel, charging and sellers blocks

- `location` (object)
  - `location.ref` (string): Entity ref ({domain}:{key}) in the "poi" domain. Example: "poi:dpz9cxmmw0"
  - `location.id` (string): The place's id: a 10-character geohash of its location, the ref without "poi:" (e.g. "dpz9cxmmw0")
  - `location.kinds` ("fuel" | "charging" | "seller"[]): Every kind the place is, e.g. a gas station with chargers is ["fuel", "charging"]
  - `location.name` (string | null)
  - `location.brand` (string | null)
  - `location.address` (object)
    - `location.address.street` (string | null)
    - `location.address.city` (string | null)
    - `location.address.state` (string | null): Province or territory code, e.g. "ON"
    - `location.address.postalCode` (string | null)
    - `location.address.country` (string | null): Country code (ISO 3166-1 alpha-2)
  - `location.location` (object)
    - `location.location.latitude` (number)
    - `location.location.longitude` (number)
  - `location.fuel` (object | null): Fuel detail, or null when the place is not a fuel station
    - `location.fuel.fuels` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"[]): Fuels the station sells
    - `location.fuel.prices` (object[]): Current prices: the newest post per fuel and payment, at most 7 days old
      - `location.fuel.prices[].fuel` ("regular" | "midgrade" | "premium" | "diesel" | "e85" | "propane"): Fuel: a gasoline grade (regular, midgrade, premium) or diesel, e85, propane
      - `location.fuel.prices[].fuelType` (string): Fuel-type entity ref, e.g. "fuel-type:gasoline"
      - `location.fuel.prices[].payment` ("credit" | "cash"): Price paying by card or by cash; most stations post credit only
      - `location.fuel.prices[].centsPerLitre` (number): Posted price, Canadian cents per litre
      - `location.fuel.prices[].currency` ("CAD")
      - `location.fuel.prices[].postedAt` (string): When the price was posted (ISO 8601)
      - `location.fuel.prices[].reportedBy` (string | null): Who posted it: "owner" (the station) or "member" / "visitor" (a driver). Other values may be added.
    - `location.fuel.amenities` (string[]): e.g. "c_store", "pay_at_pump", "restrooms". Other values may be added.
    - `location.fuel.openingHours` (string | null)
  - `location.charging` (object | null): Charging stations here, or null when there are none
    - `location.charging.stations` (object[])
      - `location.charging.stations[].ref` (string): Entity ref ({domain}:{key}) in the "station" domain. Example: "station:ocm/248113"
      - `location.charging.stations[].id` (string): Station id, the tail of the station ref
      - `location.charging.stations[].name` (string | null)
      - `location.charging.stations[].address` (object)
      - `location.charging.stations[].location` (object)
      - `location.charging.stations[].connectors` (object[])
      - `location.charging.stations[].maxPowerKw` (number | null): Highest rated power of any connector at the station, in kW
      - `location.charging.stations[].numberOfPoints` (integer | null): Number of charge points at the station
      - `location.charging.stations[].operator` (string | null)
      - `location.charging.stations[].status` (string): Station status: "Operational" or "NonOperational". Decommissioned stations are kept in the dataset, so filter on this field.
      - `location.charging.stations[].usage` (string | null): Usage class, e.g. "Public", "Private - Restricted Access"
      - `location.charging.stations[].isMembershipRequired` (boolean | null)
      - `location.charging.stations[].isPayAtLocation` (boolean | null)
      - `location.charging.stations[].dateCreated` (string | null): When the source first recorded the station (ISO 8601)
      - `location.charging.stations[].dateLastVerified` (string | null): Last source verification (ISO 8601)
      - `location.charging.stations[].poi` (string | null): The place this station is at: a `poi:{geohash}` ref, readable at `/v2/locations/{geohash}`. A fuel station or dealer at the same spot shares it. Null when the station has no place.
      - `location.charging.stations[].links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
    - `location.charging.attribution` (string): Licence attribution string (ODbL 1.0). Must be shown wherever station data is displayed.
  - `location.sellers` (object | null): The dealers here seen in the last 7 days, or null when there are none
    - `location.sellers.dealers` (object[])
      - `location.sellers.dealers[].org` (string): The dealer organization's ref, e.g. "org:cardog/0b6f…"
      - `location.sellers.dealers[].name` (string | null)
  - `location.links`? (object): `self`, plus `fuel` and `charging` as on a search hit
- `asOf`? (string): The newest day any place was seen (YYYY-MM-DD)

**Errors** (all use the ErrorEnvelope): 400, 401, 402, 404, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/locations/dpz9cxmmw0" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const locationDetail = await client.v2.locations.byId("dpz9cxmmw0");
console.log(locationDetail.location);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

location_detail = client.v2.locations.by_id("dpz9cxmmw0")
print(location_detail.location)
```

---

## Reference: Agent

Sessions and thread history for the Cardog agent

**Availability: coming soon.** The contract below is frozen. The routes are not mounted yet.

### POST /v2/agent/session

Open an agent session *Since 2026-10-27.*

Mint a short-lived session for the Cardog agent: a signed grant naming who the session acts as, which tools it may see and the ledger a turn debits. Costs 0 credits. Present `token` as the `grant` query parameter when you open the agent socket, and mint a new one on every connect; it lives 120 seconds. The grant is minted from the credential you send: a signed-in session opens a personal session, an API key opens one billed to that key, an anonymous session opens an anonymous one, and an org token from an organization workspace opens an org session. An organization key, or a server with no person behind it, is 403. Tool reads inside a turn run as the grant's subject and are never billed; the turn is the only charge.

**Request body** (`AgentSessionCreateRequest`)

- `surface`? ("web" | "org" | "native" | "mcp" | "sdk"): The surface opening the session: "web" (the consumer site), "org" (an organization workspace), "native" (the mobile app), "mcp" (an MCP server), "sdk" (a program using an API key). Defaults to "sdk".
- `context`? (object)
  - `context.hidden`? (string[]): Tools the person chose to hide. A hide list only: it never shows a tool the grant does not hold.
- `orgToken`? (string): The org token from the organization workspace (a short-lived credential the API minted from your membership). Present it to open an org session; omit it for a personal one.

**Response 200** `AgentSession`: The signed session and the grant it carries

- `token` (string): The signed session. Present it as the `grant` query parameter on the agent socket, or in the X-Cardog-Agent-Grant header on a thread read. It expires with the grant; mint a new one on every connect.
- `grant` (object)
  - `grant.sub` (string): The account the session acts as. Every tool read inside a turn runs as this subject.
  - `grant.kind` ("anonymous" | "user" | "org" | "key"): "anonymous": an anonymous session (no account yet). "user": a signed-in person. "org": a member inside an organization workspace, minted only from an org token. "key": the owner of a personal API key.
  - `grant.class`? (string): The organization's class ("oem", "gov", "dealer", "insurer", "fleet", "internal"), or "technician" for a session at the bench. Present when kind is "org".
  - `grant.role`? (string): The member's role at mint time. Present when kind is "org".
  - `grant.tenantId`? (string): The tenant key, e.g. "oem/example". Present when kind is "org".
  - `grant.orgId`? (string): The organization id. Present when kind is "org".
  - `grant.orgSlug`? (string): The workspace slug in the org surface's URL. Present when kind is "org".
  - `grant.orgName`? (string): The organization's display name. Present when kind is "org".
  - `grant.scopes` (string[]): The tool scopes the session holds, e.g. ["consumer"] or ["org:*", "org:oem"]. A tool outside them is absent, not refused.
  - `grant.credit` (object): The ledger a turn debits
    - `grant.credit.channel` ("session" | "key" | "org"): "session": the person's own account (an anonymous session has no credit account and is bounded by a turn limit). "key": the API key the session was opened with. "org": the organization.
    - `grant.credit.ref` (string): The account on that channel: the user id for a session, the key id for a key, the organization id for an org
  - `grant.model` ("default" | "fixture"): The model chain the session runs on. "default": the conversation chain. "fixture": the scripted sample model, which answers every tool from a recorded example and reaches no live model or data store.
  - `grant.exp` (integer): Expiry, seconds since the epoch
- `surface` ("web" | "org" | "native" | "mcp" | "sdk"): The surface opening the session: "web" (the consumer site), "org" (an organization workspace), "native" (the mobile app), "mcp" (an MCP server), "sdk" (a program using an API key). Defaults to "sdk".
- `context` (object)
  - `context.hidden` (string[]): Tools the person chose to hide. A hide list only: it never shows a tool the grant does not hold.
- `expiresAt` (string (date-time)): The grant's expiry as ISO 8601
- `socket` (string): The agent socket path to open with `?grant={token}`, on the same host as this API
- `links` (object): `self`: this operation. `threads`: the session's threads, when it has a history.

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 429, 500, 503

**Example: cURL**

```bash
curl -X POST "https://api.cardog.app/v2/agent/session" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"surface":"sdk"}'
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentSession = await client.v2.agent.session({ surface: "sdk" });
console.log(agentSession.token);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_session = client.v2.agent.session({"surface": "sdk"})
print(agent_session.token)
```

### GET /v2/agent/threads

List agent threads *Since 2026-10-27.*

The threads (conversations) on the agent instance a grant names, newest activity first. Costs 0 credits. Without a grant this is your own personal history. To read an organization workspace's history, send the session token from POST /v2/agent/session in the X-Cardog-Agent-Grant header; the grant must be your own, or the read is 401. An anonymous session has no thread history (403), and neither does an organization key or a server token.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | no | Keep only threads whose name or newest message contains this text (case-insensitive) |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | no | A session token from POST /v2/agent/session, minted for you. Omit it to read your personal threads. |

**Response 200** `AgentThreadList`: The threads, newest activity first

- `data` (object[]): Newest activity first
  - `data[].id` (string): The thread id
  - `data[].name` (string | null): The name the agent gave the thread, or null until it has one
  - `data[].lastMessage` (string | null): A preview of the newest message, or null
  - `data[].createdAt` (string (date-time)): When the thread was opened, ISO 8601
  - `data[].updatedAt` (string (date-time)): When the thread last changed, ISO 8601
  - `data[].lastMessageAt` (string | null): When the newest message landed, ISO 8601, or null
  - `data[].links` (object): `messages`: this thread's messages.
- `links` (object): `self`: this operation.

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/agent/threads" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentThreadList = await client.v2.agent.threads();
console.log(agentThreadList.data);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_thread_list = client.v2.agent.threads()
print(agent_thread_list.data)
```

### GET /v2/agent/threads/{id}/messages

Read an agent thread *Since 2026-10-27.*

One thread and its stored messages, oldest first, as AI SDK UIMessages. Costs 0 credits. The grant rules are those of GET /v2/agent/threads: your personal history without a grant, the grant's instance with one. A thread id that is not on that instance is a 404.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Thread id from GET /v2/agent/threads, e.g. "3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f" |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | no | A session token from POST /v2/agent/session, minted for you. Omit it to read your personal threads. |

**Response 200** `AgentThreadMessages`: The thread and its messages

- `thread` (object)
  - `thread.id` (string): The thread id
  - `thread.name` (string | null): The name the agent gave the thread, or null until it has one
  - `thread.lastMessage` (string | null): A preview of the newest message, or null
  - `thread.createdAt` (string (date-time)): When the thread was opened, ISO 8601
  - `thread.updatedAt` (string (date-time)): When the thread last changed, ISO 8601
  - `thread.lastMessageAt` (string | null): When the newest message landed, ISO 8601, or null
  - `thread.links` (object): `messages`: this thread's messages.
- `data` (object[]): Oldest first
  - `data[].id` (string)
  - `data[].role` ("system" | "user" | "assistant")
  - `data[].parts` (object[]): The message parts, in order
  - `data[].metadata`? (object)
- `links` (object): `self`: this operation. `threads`: the thread list.

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/agent/threads/3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f/messages" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentThreadMessages = await client.v2.agent.thread("3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f");
console.log(agentThreadMessages.thread);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_thread_messages = client.v2.agent.thread("3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f")
print(agent_thread_messages.thread)
```

### GET /v2/agent/org/directory

Who an organization may name on a thread *Since 2026-11-19.*

The organizations the grant's organization may name as participants when it opens a coordination thread, and the seat the grant acts as (re-read now: a read-only seat has canWrite false). Costs 0 credits. Requires an org grant in the X-Cardog-Agent-Grant header, sent by the grant's own person or by the agent runtime.

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Response 200** `AgentOrgDirectory`: The directory and the seat

- `seat` (object): Who the grant acts as, re-read on this call
  - `seat.organization` (object)
    - `seat.organization.slug` (string)
    - `seat.organization.name` (string)
    - `seat.organization.class` (string)
  - `seat.role` (string): The member's role in the organization, read now, not from the grant
  - `seat.canWrite` (boolean): False for a read-only seat (the viewer role): it may read threads and write none
- `mayOpen` (boolean): False when this organization's class cannot open threads
- `organizations` (object[])
  - `organizations[].name` (string)
  - `organizations[].slug` (string)
  - `organizations[].class` (string)

**Errors** (all use the ErrorEnvelope): 401, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/agent/org/directory" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgDirectory = await client.v2.agent.orgDirectory({ grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgDirectory.seat);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_directory = client.v2.agent.org_directory(grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_directory.seat)
```

### GET /v2/agent/org/keys

An organization's API keys, metadata only *Since 2026-11-20.*

The grant's organization's API keys: name, first characters, state, created and last used, never the key. Readable by every member of an organization whose developer surface is live; the 30-day usage per key and by day is included only for an owner or admin (seat.canManage), otherwise null. Making and revoking keys happens in the browser, never here. Costs 0 credits. Requires an org grant in the X-Cardog-Agent-Grant header, sent by the grant's own person or by the agent runtime.

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Response 200** `AgentOrgKeys`: The keys and the seat

- `seat` (object)
  - `seat.organization` (object)
    - `seat.organization.slug` (string)
    - `seat.organization.name` (string)
    - `seat.organization.class` (string)
  - `seat.role` (string)
  - `seat.canManage` (boolean): True for an owner or admin: may make and revoke keys and read usage
- `keys` (object[])
  - `keys[].id` (string)
  - `keys[].name` (string | null)
  - `keys[].start` (string | null): The key's first characters, as shown on the developer page
  - `keys[].enabled` (boolean)
  - `keys[].createdAt` (string): ISO 8601
  - `keys[].lastUsedAt` (string | null): ISO 8601, or null when never used
  - `keys[].expiresAt` (string | null)
  - `keys[].credits30d` (integer | null): Credits this key spent in the last 30 days; null for a seat that cannot read usage
- `usage` (object | null): The organization's keyed usage over 30 days; null for a seat that cannot read usage
  - `usage.days` (30)
  - `usage.credits` (integer)
  - `usage.units` (integer)
  - `usage.byDay` (object[])
    - `usage.byDay[].day` (string)
    - `usage.byDay[].credits` (integer)
    - `usage.byDay[].units` (integer)

**Errors** (all use the ErrorEnvelope): 401, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/agent/org/keys" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgKeys = await client.v2.agent.orgKeys({ grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgKeys.seat);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_keys = client.v2.agent.org_keys(grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_keys.seat)
```

### POST /v2/agent/org/issues

Open a coordination thread *Since 2026-11-19.*

Open a thread in the grant's organization, as the grant's person, through the same checks as the workspace: the class must open threads, a read-only seat is 403, and every participant must be in GET /v2/agent/org/directory. The body is plain text; blank lines separate paragraphs. Costs 0 credits. The agent runtime calls this only after the person approved the draft.

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Request body** (`AgentOrgIssueCreateRequest`)

- `title` (string)
- `body` (string): Plain text. Blank lines separate paragraphs.
- `participants`? (string[]): Organization slugs from GET /v2/agent/org/directory
- `kind`? ("vin" | "listing" | "seller" | "document" | "delivery" | "campaign" | "data" | "general")
- `subjectRef`? (string | null)

**Response 201** `AgentOrgIssueCreated`: The thread's id, number, key and workspace link

- `issue` (object)
  - `issue.id` (string)
  - `issue.number` (integer)
  - `issue.key` (string)
- `links` (object)
  - `links.issue` (string): The thread's header read, GET /v2/agent/org/issues/{issueId}

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl -X POST "https://api.cardog.app/v2/agent/org/issues" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgIssueCreated = await client.v2.agent.orgCreateIssue({ grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgIssueCreated.issue);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_issue_created = client.v2.agent.org_create_issue(grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_issue_created.issue)
```

### GET /v2/agent/org/issues/{issueId}

A coordination thread's header *Since 2026-11-19.*

One thread the grant's organization takes part in: title, key, state, subject, owning organization and participants, whether this organization may close or reopen it, and whether its words are withheld from the assistant. Never its description or comments. A thread the organization does not take part in is a 404, the same as one that does not exist. Costs 0 credits.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `issueId` | string (uuid) | yes | Thread id from the organization's coordination list, e.g. "3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f" |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Response 200** `AgentOrgIssue`: The thread's header and the seat

- `seat` (object): Who the grant acts as, re-read on this call
  - `seat.organization` (object)
    - `seat.organization.slug` (string)
    - `seat.organization.name` (string)
    - `seat.organization.class` (string)
  - `seat.role` (string): The member's role in the organization, read now, not from the grant
  - `seat.canWrite` (boolean): False for a read-only seat (the viewer role): it may read threads and write none
- `issue` (object)
  - `issue.id` (string)
  - `issue.key` (string)
  - `issue.number` (integer)
  - `issue.title` (string)
  - `issue.state` ("open" | "closed")
  - `issue.kind` ("vin" | "listing" | "seller" | "document" | "delivery" | "campaign" | "data" | "general")
  - `issue.subjectRef` (string | null)
  - `issue.owningOrganization` (object)
    - `issue.owningOrganization.name` (string)
    - `issue.owningOrganization.slug` (string)
    - `issue.owningOrganization.class`? (string)
  - `issue.participants` (object[])
    - `issue.participants[].name` (string)
    - `issue.participants[].slug` (string)
    - `issue.participants[].class`? (string)
  - `issue.steward` (boolean): True when this organization may close or reopen the thread: its own thread, or Cardog staff
  - `issue.textWithheld` (boolean): True when a manufacturer owns or takes part in the thread: its words are not readable by the assistant

**Errors** (all use the ErrorEnvelope): 400, 401, 404, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/agent/org/issues/{issueId}" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgIssue = await client.v2.agent.orgIssue("{issueId}", { grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgIssue.seat);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_issue = client.v2.agent.org_issue("{issueId}", grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_issue.seat)
```

### POST /v2/agent/org/issues/{issueId}/comments

Reply on a coordination thread *Since 2026-11-19.*

Post a reply as the grant's person, through the workspace's own comment checks: a read-only seat is 403, a thread the organization does not take part in is 404. Costs 0 credits. The agent runtime calls this only after the person approved the draft.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `issueId` | string (uuid) | yes | Thread id from the organization's coordination list, e.g. "3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f" |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Request body** (`AgentOrgCommentCreateRequest`)

- `body` (string)
- `parentId`? (string | null)

**Response 201** `AgentOrgCommentCreated`: The reply's id and the thread's workspace link

- `comment` (object)
  - `comment.id` (string)
  - `comment.parentId` (string | null)
- `links` (object)
  - `links.issue` (string): The thread's header read, GET /v2/agent/org/issues/{issueId}

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 404, 429, 500, 503

**Example: cURL**

```bash
curl -X POST "https://api.cardog.app/v2/agent/org/issues/{issueId}/comments" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgCommentCreated = await client.v2.agent.orgComment("{issueId}", { grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgCommentCreated.comment);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_comment_created = client.v2.agent.org_comment("{issueId}", grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_comment_created.comment)
```

### PATCH /v2/agent/org/issues/{issueId}/state

Close or reopen a coordination thread *Since 2026-11-19.*

Compare-and-set the thread's state as the grant's person. Only the thread's own organization (or Cardog staff) may close or reopen it; anyone else gets 404. A state that changed since the draft is 409. Costs 0 credits. The agent runtime calls this only after the person approved the change.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `issueId` | string (uuid) | yes | Thread id from the organization's coordination list, e.g. "3f2b9c1e-7a4d-4e8b-9c0f-1a2b3c4d5e6f" |

**Header parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Cardog-Agent-Grant` | string | yes | An org session token from POST /v2/agent/session (opened from an organization workspace), minted for you. Required. |

**Request body** (`AgentOrgIssueStateRequest`)

- `state` ("open" | "closed")
- `expectedState`? ("open" | "closed")

**Response 200** `AgentOrgIssueState`: The thread's new state

- `issue` (object)
  - `issue.id` (string)
  - `issue.state` ("open" | "closed")
- `links` (object)
  - `links.issue` (string): The thread's header read, GET /v2/agent/org/issues/{issueId}

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 404, 409, 429, 500, 503

**Example: cURL**

```bash
curl -X PATCH "https://api.cardog.app/v2/agent/org/issues/{issueId}/state" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const agentOrgIssueState = await client.v2.agent.orgSetIssueState("{issueId}", { grant: process.env.CARDOG_AGENT_GRANT! });
console.log(agentOrgIssueState.issue);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

agent_org_issue_state = client.v2.agent.org_set_issue_state("{issueId}", grant=os.environ["CARDOG_AGENT_GRANT"])
print(agent_org_issue_state.issue)
```

---

## Reference: Platform

Pricing, spec, meta

**Availability: live** on `https://api.cardog.app`.

### GET /v2/account/usage

Your credits and usage *Since 2026-11-19.*

Your own plan, credits used this cycle, what is left of the allowance, usage by day, by family and by key over the last `days` days, and the next plan up. Costs 0 credits. A signed-in session reads its own account and a personal API key reads its owner's; there is no way to read anyone else's. An organization key or a server token has no personal account (403).

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | integer | no | Trailing window in UTC days (1-90, default 14) |

**Response 200** `AccountUsage`: Your plan, this cycle's credits and the window's usage

- `plan` (object)
  - `plan.id` (string): The rate-card plan id, e.g. "free", "starter"
  - `plan.name` (string)
  - `plan.monthlyPrice` (number | null): USD a month; null = sales-led
  - `plan.allowance` (integer | null): Monthly credit allowance; null = custom
  - `plan.overageBilled` (boolean): true: usage past the allowance is billed, never blocked. false: a hard stop at the allowance.
  - `plan.overagePricePerCredit` (number | null)
- `cycle` (object)
  - `cycle.start` (string): ISO 8601: the start of this billing cycle (UTC month)
  - `cycle.reset` (string): ISO 8601: when the allowance resets; the value of X-Credits-Reset
- `credits` (object)
  - `credits.spent` (integer): Credits used this cycle, from every source (allowance, packs, overage)
  - `credits.allowanceRemaining` (integer | null): The value of X-Credits-Remaining; null on a custom allowance
  - `credits.percentUsed` (integer | null): Allowance used this cycle, 0-100+; null on a custom allowance
  - `credits.packs` (integer): Prepaid pack credits left
- `window` (object)
  - `window.start` (string)
  - `window.end` (string)
  - `window.days` (integer)
- `daily` (object[]): One entry per UTC day in the window, oldest first; a day with no calls is 0
  - `daily[].date` (string): UTC day, YYYY-MM-DD
  - `daily[].credits` (integer)
  - `daily[].requests` (integer)
- `families` (object[]): Usage in the window by family, most credits first
  - `families[].family` (string): The rate-card family (GET /v2/pricing), e.g. vin, recalls, listings
  - `families[].credits` (integer)
  - `families[].requests` (integer)
- `keys` (object[]): Usage in the window by API key, most credits first
  - `keys[].id` (string | null): API key id; null for a deleted key or a session read
  - `keys[].name` (string | null)
  - `keys[].start` (string | null): The first characters of the key as issued (e.g. crdg_a1); never the key
  - `keys[].credits` (integer)
- `nextPlan` (object | null): The plan above this one on the rate card; null at the top
  - `nextPlan.id` (string)
  - `nextPlan.name` (string)
  - `nextPlan.monthlyPrice` (number | null)
  - `nextPlan.allowance` (integer | null)
- `links` (object): `self`: this operation. `pricing`: the rate card.

**Errors** (all use the ErrorEnvelope): 400, 401, 403, 429, 500, 503

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/account/usage" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const accountUsage = await client.v2.platform.usage();
console.log(accountUsage.plan);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

account_usage = client.v2.platform.usage()
print(account_usage.plan)
```

### GET /v2/changelog

What changed on the API *Since 2026-11-19.*

The changelog at cardog.app/changelog as data, newest first: each entry's date, the dated API version it ships in, whether it broke anything and when the old shape stops, the surfaces it touched, its page and the /docs pages it links to. Costs 0 credits. Filter with `since`, `tag` or `breaking`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string | no | Only entries published on or after this date (YYYY-MM-DD) |
| `tag` | string | no | Only entries carrying this tag, e.g. "recalls" |
| `breaking` | boolean | no | true: only entries that broke an existing consumer |
| `limit` | integer | no | Entries to return (1-50, default 10) |

**Response 200** `Changelog`: Entries, newest first

- `data` (object[]): Newest first
  - `data[].slug` (string): Permanent, date-prefixed
  - `data[].date` (string): Publish date, YYYY-MM-DD
  - `data[].version` (string | null): The dated API version the entry ships in (Cardog-Version); null before dated versions
  - `data[].title` (string)
  - `data[].description` (string)
  - `data[].tags` (string[])
  - `data[].breaking` (boolean)
  - `data[].sunset` (string | null): When the pre-change shape stops being served; set on every breaking entry
  - `data[].surfaces` (string[])
  - `data[].url` (string): The entry on cardog.app/changelog
  - `data[].docs` (string[]): The /docs pages the entry links to, as paths
- `total` (integer): Entries matching the filters, before the limit
- `links` (object): `self`: this operation. The page itself is https://cardog.app/changelog (markdown: /changelog.md).

**Errors** (all use the ErrorEnvelope): 400, 401, 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/changelog" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });

const changelog = await client.v2.platform.changelog();
console.log(changelog.data);
```

**Example: Python** (`pip install cardog`)

```python
import os

from cardog import Cardog

client = Cardog(api_key=os.environ["CARDOG_API_KEY"])

changelog = client.v2.platform.changelog()
print(changelog.data)
```

### GET /v2/pricing

The machine-readable rate card *(no auth required)* *Since 2026-07-30.*

Credit rates per family + plan allowances, as JSON. Budget mid-task with this plus the X-Credits-* headers on every metered response. Unauthenticated.

**Response 200** `Pricing`: Rates, plans, credit headers

- `version` (integer): Monotonic rate-card version. Bump it on any price change.
- `asOf` (string): When this card took effect (ISO 8601)
- `currency` (string): ISO 4217, e.g. "USD"
- `rates` (object[]): Only ENFORCED rates appear
  - `rates[].family` (string): Billing family. The route groups (vin, entities, specs, listings, instruments, quotes, tape, recalls, safety, charging, parts, chassis, fuel, locations, feedback, documents, feeds, history, carriers, agent, account, changelog) plus composite products (open set).
  - `rates[].unit` (string): What one metered unit is: "request", "vin" (batch = N units), "check", "image" (one photo), "session", "thread" or "download".
  - `rates[].credits` (number): Credits debited per unit. 0 = unmetered class read.
  - `rates[].description`? (string)
  - `rates[].operations`? (object[]): The operations this line prices. A family can carry several lines (one per unit), and the line is identified by (family, unit); each (method, operationId) appears on exactly one line, so a caller resolves the request it is about to make to one price. HEAD appears only where it is priced apart from its GET.
    - `rates[].operations[].method` ("GET" | "HEAD" | "POST")
    - `rates[].operations[].operationId` (string): An operationId from GET /v2/openapi.json
- `plans` (object[])
  - `plans[].id` (string): Stable plan id, e.g. "free", "starter", "growth", "enterprise"
  - `plans[].name` (string)
  - `plans[].monthlyPrice` (number | null): Monthly base price in `currency`; null = sales-led (contact)
  - `plans[].monthlyCredits` (integer | null): The monthly credit allowance; null = custom (sales-led)
  - `plans[].overage` (object)
    - `plans[].overage.billed` (boolean): true = past-allowance usage is billed, not blocked; false = hard stop (free tier)
    - `plans[].overage.pricePerCredit` (number | null): Overage price per credit in `currency`; null when overage is not billed
  - `plans[].rateLimits`? (object)
    - `plans[].rateLimits.perMinute` (integer | null): Token-bucket rate; null = plan-custom
  - `plans[].selfServe` (boolean): true = instant key, no sales call
  - `plans[].requiresCard`? (boolean): false on the evaluation tier
  - `plans[].description`? (string)
- `packs`? (object[]): Prepaid one-time credit top-ups, all tiers (free included). Spend order per debit: allowance → packs (FIFO by purchase) → overage; packs expire 12 months after purchase.
  - `packs[].id` (string): Stable pack id, e.g. "pack-250"
  - `packs[].credits` (integer): Credits granted by one purchase
  - `packs[].price` (number): One-time price in `currency`
  - `packs[].description`? (string)
- `customTopUp`? (object): Caller-chosen top-up amount at a flat per-credit rate (no volume bonus); mechanics identical to packs.
  - `customTopUp.ratePerCredit` (number): Flat price per credit in `currency`; no volume bonus
  - `customTopUp.minCredits` (integer): Smallest purchasable amount
  - `customTopUp.maxCredits` (integer): Largest purchasable amount
  - `customTopUp.expiryMonths` (integer): Months from purchase until unspent credits expire
- `creditHeaders`? (string[]): The response headers that carry live budget state
- `signupGrant`? (object): Present only while a signup credit grant is running: new accounts created before `endsAt` receive `credits` prepaid credits. Absent when no campaign is open.
  - `signupGrant.credits` (integer): Credits granted to a new account
  - `signupGrant.endsAt` (string): The last moment a signup qualifies (ISO 8601)
  - `signupGrant.expiryMonths` (integer): Months until unspent granted credits expire
  - `signupGrant.description` (string): Human-readable offer, e.g. plan-equivalent framing
- `links`? (object): Related resources, keyed by relation name, each a server-relative path. Example: {"recalls": "/v2/recalls/entity/model-year:toyota/rav4/2021"}
- `docs_url`? (string)

**Errors** (all use the ErrorEnvelope): 429, 500

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/pricing"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient();

const pricing = await client.v2.platform.pricing();
console.log(pricing.version);
```

**Example: Python** (`pip install cardog`)

```python
from cardog import Cardog

client = Cardog()

pricing = client.v2.platform.pricing()
print(pricing.version)
```

### GET /v2/openapi.json

This document *(no auth required)* *Since 2026-07-30.*

**Response 200**: The OpenAPI 3.0 spec for the v2 surface

**Example: cURL**

```bash
curl "https://api.cardog.app/v2/openapi.json"
```

**Example: TypeScript** (`npm install @cardog/api`)

```typescript
import { CardogClient } from "@cardog/api";

const client = new CardogClient();

const result = await client.v2.platform.openapi();
```

**Example: Python** (`pip install cardog`)

```python
from cardog import Cardog

client = Cardog()

result = client.v2.platform.openapi()
```
