## 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)
```

---

Previous: [Chassis](https://cardog.app/docs/reference/chassis.md) (API reference)
Next: [Specs](https://cardog.app/docs/reference/specs.md) (API reference)
