---
title: "Get entity co-occurrence graph"
method: GET
path: "/v1/default/banks/{bank_id}/entities/graph"
tags: ["Entities"]
---

# Get entity co-occurrence graph

`GET /v1/default/banks/{bank_id}/entities/graph`

## Request

- Base URL: `https://hindsight.vectorize.io` (the document declares no server; this is the origin it was published from)
- URL: `https://hindsight.vectorize.io/v1/default/banks/{bank_id}/entities/graph`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vectorize/apis/hindsight-http-api/docs/v1/default/banks/:bank_id/entities/graph/get.ts> (a function with typed inputs; its response is checked against the schema)

Return a graph of entities (nodes) and their co-occurrences (edges) for visualization.

## Path parameters

- `bank_id` string, required

## Query parameters

- `limit` integer: Maximum number of co-occurrence edges to return
- `min_count` integer: Minimum cooccurrence_count to include an edge
- `tags` string[], nullable: Only count memories carrying these tags. Edges and node mention counts are computed from the matching memories only.
- `tags_match` 'any' | 'all' | 'any_strict' | 'all_strict' | 'exact': How `tags` match (same modes as listing memories).
- `tag_groups` string, nullable: Compound tag filter as a JSON-encoded list of tag groups — the same shape `tag_groups` takes in a recall body (leaves {tags, match, resolve} and {and: [...]}, {or: [...]}, {not: ...}; groups are AND-ed). Mutually exclusive with `tags`.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- EntityGraphResponse: Response model for entity co-occurrence graph endpoint.
  - `nodes` EntityGraphNode[], required
    - `data` EntityGraphNodeData, required: The payload of one entity node in the co-occurrence graph. Extra keys are allowed and passed through: the graph payload has always been an open object, and typing it must not drop a field an older or newer server also returns.
      - `id` string, required: Entity ID
      - `label` string: Entity canonical name
      - `mentionCount` integer: How many times this entity was mentioned
      - `color` string, nullable: Suggested node colour for rendering
  - `edges` EntityGraphEdge[], required
    - `data` EntityGraphEdgeData, required: The payload of one co-occurrence edge.
      - `id` string, required: Edge ID (``<source>-<target>``)
      - `source` string, required: Source entity ID
      - `target` string, required: Target entity ID
      - `linkType` string: Kind of relationship this edge represents
      - `weight` integer: Number of co-occurrences between the two entities
      - `color` string, nullable: Suggested edge colour for rendering
      - `lineStyle` string, nullable: Suggested edge line style for rendering
      - `lastCooccurred` string, nullable: ISO 8601 timestamp of the most recent co-occurrence
  - `total_entities` integer, required
  - `total_edges` integer, required
  - `limit` integer, required

## Other responses

- `404`: The bank does not exist.
- `422`: Validation Error

## Changes

- **2026-10-04** `4fda98b75f63`: 2 warning, 6 info
  - for the `query` request parameter `limit`, the min was set to `0.00`
  - removed the optional property `detail/items/url` from the response with the `422` status
  - added the new optional `query` request parameter `tag_groups`
  - added the new optional `query` request parameter `tags`
  - …4 more
- **2026-05-15** `0d08f271b9db`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vectorize/apis/hindsight-http-api/changes/v1/default/banks/:bank_id/entities/graph/get.md)

---

[API](https://skmtc.dev/vectorize/apis/hindsight-http-api.md) - [All operations](https://skmtc.dev/vectorize/apis/hindsight-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vectorize/apis/hindsight-http-api/revisions/45e711cd0897?raw)
