> ## Documentation Index
> Fetch the complete documentation index at: https://kremis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query: Lookup

> Find a node by entity ID.

<ParamField path="method" type="POST">
  `/query`
</ParamField>

**Authentication:** Required (if enabled)

Find a node by its entity ID.

## Request

```json theme={null}
{
  "type": "lookup",
  "entity_id": 1
}
```

| Field       | Type          | Required | Description         |
| ----------- | ------------- | -------- | ------------------- |
| `type`      | string        | Yes      | Must be `"lookup"`. |
| `entity_id` | integer (u64) | Yes      | Entity to look up.  |

## Response

<CodeGroup>
  ```json Found theme={null}
  {
    "success": true,
    "found": true,
    "path": [0],
    "edges": [],
    "grounding": "fact",
    "error": null
  }
  ```

  ```json Not Found theme={null}
  {
    "success": true,
    "found": false,
    "path": [],
    "edges": [],
    "grounding": "unknown",
    "error": null,
    "diagnostic": "entity_not_found"
  }
  ```
</CodeGroup>

When `found` is `false`, `diagnostic` explains why (e.g. `entity_not_found`).

## Example

```bash theme={null}
curl -X POST http://localhost:8080/query \
     -H "Authorization: Bearer your-api-key" \
     -H "Content-Type: application/json" \
     -d '{"type": "lookup", "entity_id": 1}'
```
