---
title: "Get a graph neighbourhood"
method: GET
path: "/graph/{path}"
---

# Get a graph neighbourhood

`GET /graph/{path}`

## Request

- Base URL: `https://vineverse.bible/api/v1`
- URL: `https://vineverse.bible/api/v1/graph/{path}`
- Auth: none required

Everything within N hops of a document, WITH the edges that connect them and the predicate on each. Useful for asking what a passage, person or theme is connected to without fetching each document.

Filter with `type` to ask a shaped question — the places near an event, the people in an epoch — and with `predicate` to keep only one kind of edge. Depth 1 is direct links; depth 3 gets large quickly and is capped by limit. See /vocabulary for what each predicate means.

## Path parameters

- `path` string, required

## Query parameters

- `depth` integer
- `type` 'Person' | 'Place' | 'Theme' | 'Lexeme' | 'Commandment' | 'Event' | 'Epoch' | 'Book' | 'Chapter' | 'Source' | 'Dataset' | 'Relation Vocabulary'
- `predicate` string
- `limit` integer
- `offset` integer

## Response `200`

Nodes and edges within the requested radius.

- Neighbourhood
  - `root` string, required
  - `depth` integer, required
  - `total` integer: Nodes this walk reached. The walk stops at offset+limit, so while truncated is true the neighbourhood is larger than this.
  - `offset` integer
  - `count` integer, required
  - `truncated` boolean: True when limit cut the walk short.
  - `nodes` object[], required
    - `id` string, required: Site route, e.g. "/people/moses". Strip the leading slash to use it as a path.
    - `title` string, required
    - `type` 'Person' | 'Place' | 'Theme' | 'Lexeme' | 'Commandment' | 'Event' | 'Epoch' | 'Book' | 'Chapter' | 'Source' | 'Dataset' | 'Relation Vocabulary', required: Which collection the document belongs to.
    - `description` string
    - `degree` integer, required: Number of graph edges touching this document.
    - `lat` number: Places only.
    - `lon` number: Places only.
    - `strongs` string: Lexemes only, e.g. "H430".
    - `osis` string: Scripture documents and commandments only.
    - `shareAlike` boolean: Present, and always true, only on CC BY-SA 4.0 documents. A listing has one licence block for many documents and cannot say which are viral, so it says it here instead. Filtering on the "/sa/" id prefix is NOT equivalent — it misses /sources/theographic.
    - `distance` integer: Hops from root.
  - `edgeCount` integer
  - `edges` object[], required: Only edges with both ends inside the returned page of nodes, so an edge across a page boundary appears on neither page.
    - `source` string
    - `target` string
    - `predicate` string: Absent for untyped body links.
    - `kind` 'relation' | 'link' | 'source'
  - `licence` Licence, required: Carried on every response. The obligation is inherited by anyone who redistributes the data, not discharged by us. `document` is the licence of the specific document fetched, which is CC-BY-SA-4.0 for anything under sa/ and is the value to honour over the blanket statement.
    - `text` string
    - `data` string
    - `document` string: SPDX-style id for this document, e.g. "CC-BY-4.0".
    - `shareAlike` string
    - `reason` string
    - `attribution` string, uri

## Other responses

- `400`: The reference or parameter could not be parsed.
- `404`: No such document.
- `429`: Too many requests. Carries Retry-After. See the rate limit note in `info`.

---

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