> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/knowledge-base/list-nodes.md).

# List Nodes

List a node's direct children, or the organisation's roots.

Omit `parent_id` for the top-level (root) nodes; pass `parent_id` to list a node's direct children (404 if that node does not exist in the caller's organisation). Nodes are ordered by type (folders before documents), then by name A-Z, unless `sort_by=citations` ranks them by citation count instead. Use `GET /nodes/tree` for the full nested hierarchy. Nodes carry no document body.

`citation_count` is how often agents have read a document; for a folder it is the sum over its whole subtree.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"KnowledgeNodeSortField":{"type":"string","enum":["name","citations"],"title":"KnowledgeNodeSortField","description":"What a node listing is ordered by.\n\n`NAME` is the default and means the tree's natural reading order: folders\nbefore documents, then name A-Z. `CITATIONS` orders by how often agents have\nread a node's documents, which deliberately drops the folders-first grouping\n(see `SortDirection`) — ranking by usage is pointless if containers and\nleaves are ranked in separate blocks."},"SortDirection":{"type":"string","enum":["asc","desc"],"title":"SortDirection","description":"Ascending or descending order for a sorted listing."},"KnowledgeNodeListResponseSchema":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/KnowledgeNodeResponseSchema"},"type":"array","title":"Nodes"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["nodes","total_count"],"title":"KnowledgeNodeListResponseSchema","description":"Schema for a flat list of nodes (roots or a node's children)."},"KnowledgeNodeResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"organisation_id":{"type":"integer","title":"Organisation Id"},"node_type":{"$ref":"#/components/schemas/NodeType"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"citation_count":{"type":"integer","title":"Citation Count"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeNodeUserSchema"},{"type":"null"}]},"updated_by":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeNodeUserSchema"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"name_translations":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Name Translations","description":"Per-language display-name overrides (ISO 639-1 keys), for the two system-managed root folders only — null for every other node. `name` always stays the canonical English string; the caller decides which (if any) of these to show."}},"type":"object","required":["id","organisation_id","node_type","name","slug","parent_id","path","summary","citation_count","metadata","created_by","updated_by","created_at","updated_at"],"title":"KnowledgeNodeResponseSchema","description":"Response schema for a knowledge-base node (tree view, no document body)."},"NodeType":{"type":"string","enum":["folder","document"],"title":"NodeType","description":"The node-type discriminator — the single extension point for new types.\n\nOnly the local types exist today (`folder`, `document`); the CTI design\nkeeps adding types additive."},"KnowledgeNodeUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","email","full_name"],"title":"KnowledgeNodeUserSchema","description":"Basic info about a node's creator/updater."}}},"paths":{"/api/v1/knowledge-base/nodes":{"get":{"tags":["knowledge-base","public"],"summary":"List Nodes","description":"List a node's direct children, or the organisation's roots.\n\nOmit `parent_id` for the top-level (root) nodes; pass `parent_id` to list a\nnode's direct children (404 if that node does not exist in the caller's\norganisation). Nodes are ordered by type (folders before documents), then by\nname A-Z, unless `sort_by=citations` ranks them by citation count instead.\nUse `GET /nodes/tree` for the full nested hierarchy. Nodes carry no document\nbody.\n\n`citation_count` is how often agents have read a document; for a folder it is\nthe sum over its whole subtree.","operationId":"knowledge-base-list_nodes","parameters":[{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/KnowledgeNodeSortField","description":"Order by name (folders first, then A-Z) or by citation count. Sorting by citations interleaves folders and documents, since a ranking split into two blocks would not be a ranking","default":"name"},"description":"Order by name (folders first, then A-Z) or by citation count. Sorting by citations interleaves folders and documents, since a ranking split into two blocks would not be a ranking"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDirection","description":"Ascending or descending. Most-cited first is sort_by=citations&sort_order=desc","default":"asc"},"description":"Ascending or descending. Most-cited first is sort_by=citations&sort_order=desc"},{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"List this node's direct children; omit for the organisation's roots","title":"Parent Id"},"description":"List this node's direct children; omit for the organisation's roots"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeNodeListResponseSchema"}}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
