---
title: "Return entities connected to entity_id."
method: GET
path: "/v1/graph/entities/{entity_id}/neighbors"
tags: ["graph"]
---

# Return entities connected to entity_id.

`GET /v1/graph/entities/{entity_id}/neighbors`

## Request

- Base URL: `https://api.andish.ru` (the document declares no server; this is the origin it was published from)
- URL: `https://api.andish.ru/v1/graph/entities/{entity_id}/neighbors`
- Auth: none declared

Returns direct (hop=1) or transitive (hop=2) neighbors of the given entity within the tenant workspace.

**hop=2 cap:** total neighbors are capped by `limit` parameter.

**Isolation:** 404 is returned when entity_id exists in another tenant's workspace (uniform; no information leakage).

## Path parameters

- `entity_id` string, required: Stable entity id.

## Query parameters

- `hop` integer: Hop depth (1 or 2).
- `limit` integer: Maximum number of neighbors.

## Response `200`

Successful Response

- NeighborResponse: 200 response for GET /v1/graph/entities/{entity_id}/neighbors.
  - `entity` EntityRef, required: A reference to a single entity node. ``id`` — stable node_id (opaque string, workspace-scoped). ``label`` — human-readable entity label (same as node_id in LightRAG adjacency storage; node_id IS the canonical label). ``type`` — entity sub-type (e.g. "PERSON", "ORGANIZATION"); None when the node was created as a stub endpoint without entity_type. ``weight`` — degree from the degree column (migration 011); None when the degree column has not been refreshed yet.
    - `id` string, required: Stable entity identifier (node_id in graph storage).
    - `label` string, required: Human-readable entity label.
    - `type` string, nullable: Entity sub-type (may be absent).
    - `weight` number, nullable: Degree weight (may be absent).
  - `neighbors` EntityRef[], required: Neighboring entity references.
    - `id` string, required: Stable entity identifier (node_id in graph storage).
    - `label` string, required: Human-readable entity label.
    - `type` string, nullable: Entity sub-type (may be absent).
    - `weight` number, nullable: Degree weight (may be absent).
  - `edges` EdgeRef[], required: Edges incident to the seed entity (hop=1 only).
    - `source` string, required: Source entity id.
    - `target` string, required: Target entity id.
    - `type` string, nullable: Relationship type label.
  - `hop` integer, required: Hop depth that was used.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/andish/apis/mnemo-api.md) · [All operations](https://skmtc.dev/andish/apis/mnemo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/andish/apis/mnemo-api/revisions/d5449f23414c?raw)
