Skip to main content
GET
/
api
/
v1
/
datasets
/
{dataset_id}
/
graph
Get Dataset Graph
curl --request GET \
  --url https://api.cognee.ai/api/v1/datasets/{dataset_id}/graph \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.cognee.ai/api/v1/datasets/{dataset_id}/graph"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "nodes": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "label": "<string>",
      "type": "<string>",
      "properties": {}
    }
  ],
  "edges": [
    {
      "source": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "target": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "label": "<string>"
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dataset_id
string<uuid>
required

Dataset UUID, the id field from GET /api/v1/datasets (not the name)

Example:

"b8a7c3de-4f5a-4b6c-8d9e-0f1a2b3c4d5e"

Response

Successful Response

nodes
GraphNodeDTO · object[]
required
edges
GraphEdgeDTO · object[]
required