Get neighborhood
Return all memories within N hops of a given memory.
GET
/api/v1/graph/neighborhoodQuery Parameters
memory_idstringrequiredCenter memory ID
hopsnumberNumber of hops to expand
Max length: 2
API Key
Stored locally, never sent to servers
Get neighborhood
const options = { method: 'GET', headers: {'X-API-Key': 'mb_live_xxx'},};fetch('https://api.mem-brain.io/api/v1/graph/neighborhood', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));{ "center": "mem_abc123", "nodes": [ { "id": "mem_001" }, { "id": "mem_002" } ], "edges": [ { "source": "mem_abc123", "target": "mem_001" } ]}