> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snorbe.deskrex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Entity Detail

> Retrieve detailed information about a specific entity including linked agent runs and relationships

# Get Entity Detail

Returns detailed information about a specific entity, including its linked agent runs, relationships to other entities, and metadata.

## Request

```
GET /api/v1/graph/entity/{entityId}
```

### Path Parameters

| Parameter  | Type     | Description |
| ---------- | -------- | ----------- |
| `entityId` | `string` | Entity ID   |

### Headers

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | API key in `Bearer snorbe_...` format |

<Note>
  The workspace is automatically resolved from your API key. No `workspaceId` parameter required.
</Note>

## Response

```json theme={null}
{
  "id": "clxxx001",
  "label": "Lithium-Ion Battery",
  "category": "technology",
  "kind": "entity",
  "description": "A type of rechargeable battery...",
  "metadata": {
    "url": { "value": "https://example.com/battery", "type": "text" }
  },
  "communityId": 3,
  "pagerank": 0.045,
  "createdAt": "2026-01-15T10:30:00.000Z",
  "updatedAt": "2026-03-20T14:22:00.000Z",
  "linkedEntities": [
    {
      "id": "clxxx002",
      "label": "Solid-State Electrolyte",
      "category": "technology",
      "kind": "material",
      "relationships": [
        { "direction": "outgoing", "type": "related_to", "weight": 0.85 }
      ]
    }
  ],
  "agentRuns": [
    {
      "id": "clrun001",
      "status": "completed",
      "process": [],
      "createdAt": "2026-04-01T09:00:00.000Z",
      "updatedAt": "2026-04-01T09:05:00.000Z",
      "agentId": "clagent001",
      "agentName": "research-agent",
      "linkedSources": [
        {
          "id": "clsrc001",
          "url": "https://example.com/paper",
          "title": "Research Paper",
          "sourceType": "public"
        }
      ],
      "linkedEntityIds": ["clxxx001", "clxxx002"],
      "linkedEntities": [
        {
          "id": "clxxx002",
          "label": "Solid-State Electrolyte",
          "category": "technology",
          "kind": "material"
        }
      ]
    }
  ]
}
```

Returns `null` if the entity is not found in the workspace.

### Response Fields

| Field                                        | Type             | Description                                                                                            |
| -------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------ |
| `id`                                         | `string`         | Entity ID                                                                                              |
| `label`                                      | `string`         | Entity name                                                                                            |
| `category`                                   | `string`         | Category (e.g., `technology`, `company`)                                                               |
| `kind`                                       | `string`         | Node kind (`entity`, `ghost`)                                                                          |
| `description`                                | `string`         | Entity description                                                                                     |
| `metadata`                                   | `object \| null` | Key-value metadata attached to the entity. Each value has a `value` (string) and `type` (string) field |
| `communityId`                                | `number`         | Community cluster ID                                                                                   |
| `pagerank`                                   | `number`         | PageRank score                                                                                         |
| `createdAt`                                  | `string`         | Creation timestamp (ISO 8601)                                                                          |
| `updatedAt`                                  | `string`         | Last update timestamp (ISO 8601)                                                                       |
| `linkedEntities`                             | `object[]`       | Entities directly connected to this entity via graph edges                                             |
| `linkedEntities[].id`                        | `string`         | Linked entity ID                                                                                       |
| `linkedEntities[].label`                     | `string`         | Linked entity name                                                                                     |
| `linkedEntities[].category`                  | `string`         | Linked entity category                                                                                 |
| `linkedEntities[].kind`                      | `string`         | Linked entity kind                                                                                     |
| `linkedEntities[].relationships`             | `object[]`       | Relationship descriptors between the two entities                                                      |
| `linkedEntities[].relationships[].direction` | `string`         | Edge direction (`outgoing` or `incoming`)                                                              |
| `linkedEntities[].relationships[].type`      | `string`         | Relationship type (e.g., `related_to`)                                                                 |
| `linkedEntities[].relationships[].weight`    | `number`         | Edge weight (0-1)                                                                                      |
| `agentRuns`                                  | `object[]`       | Agent runs linked to this entity                                                                       |
| `agentRuns[].id`                             | `string`         | Agent run ID                                                                                           |
| `agentRuns[].status`                         | `string`         | Run status (`completed`, `running`, `error`, etc.)                                                     |
| `agentRuns[].process`                        | `object[]`       | Array of process events from the agent run                                                             |
| `agentRuns[].createdAt`                      | `string`         | Run creation timestamp (ISO 8601)                                                                      |
| `agentRuns[].updatedAt`                      | `string`         | Run last update timestamp (ISO 8601)                                                                   |
| `agentRuns[].agentId`                        | `string`         | Agent ID that executed this run                                                                        |
| `agentRuns[].agentName`                      | `string`         | Agent name                                                                                             |
| `agentRuns[].linkedSources`                  | `object[]`       | Sources used in this agent run                                                                         |
| `agentRuns[].linkedSources[].id`             | `string`         | Source ID                                                                                              |
| `agentRuns[].linkedSources[].url`            | `string`         | Source URL                                                                                             |
| `agentRuns[].linkedSources[].title`          | `string`         | Source title                                                                                           |
| `agentRuns[].linkedSources[].sourceType`     | `string`         | Source type (`public` or `private`)                                                                    |
| `agentRuns[].linkedEntityIds`                | `string[]`       | Entity IDs linked to this agent run                                                                    |
| `agentRuns[].linkedEntities`                 | `object[]`       | Entity summaries linked to this agent run                                                              |
| `agentRuns[].linkedEntities[].id`            | `string`         | Entity ID                                                                                              |
| `agentRuns[].linkedEntities[].label`         | `string`         | Entity name                                                                                            |
| `agentRuns[].linkedEntities[].category`      | `string`         | Entity category                                                                                        |
| `agentRuns[].linkedEntities[].kind`          | `string`         | Entity kind                                                                                            |

<Note>
  The `process` field in each agent run is an array of process events. See the [SSE streaming docs](/en/api-reference/stream-agent-run) for the full list of event types and their payloads.
</Note>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001" \
    -H "Authorization: Bearer snorbe_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001",
      headers={"Authorization": "Bearer snorbe_your_api_key_here"},
  )
  data = resp.json()
  if data:
      print(f"Entity: {data['label']} ({data['category']})")
      print(f"Agent Runs: {len(data['agentRuns'])}")
      print(f"Linked Entities: {len(data['linkedEntities'])}")
  else:
      print("Entity not found")
  ```

  ```typescript TypeScript theme={null}
  const resp = await fetch(
    "https://app.snorbe.deskrex.ai/api/v1/graph/entity/clxxx001",
    { headers: { Authorization: "Bearer snorbe_your_api_key_here" } },
  );
  const data = await resp.json();
  if (data) {
    console.log(`Entity: ${data.label} (${data.category})`);
    console.log(`Agent Runs: ${data.agentRuns.length}`);
    console.log(`Linked Entities: ${data.linkedEntities.length}`);
  }
  ```
</CodeGroup>

## Error Responses

| HTTP Status | Description                            |
| ----------- | -------------------------------------- |
| 401         | Invalid, expired, or missing API key   |
| 404         | Entity not found (returns `null` body) |
