curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/kg-search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"coverage": {
"labels_required": [
"<string>"
],
"request_access_hint": "<string>",
"restricted_candidates": 0
},
"nodes": [
{
"degree": 123,
"facts": [
{
"evidence": {
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"relevance_score": 123,
"snippet": "<string>",
"why": "<string>",
"component": "<string>",
"locator": {
"char_end": 123,
"char_start": 123,
"kind": "text_range",
"page": 123,
"pages": [
123
]
},
"page": 123
},
"predicate": "<string>",
"value": "<string>"
}
],
"node_id": "<string>",
"node_type": "<string>",
"source_files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>"
}
],
"title": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}kg_search
Search the workspace knowledge graph by semantic similarity to a query.
Cost class: medium.
Returns graph nodes whose embedded representations are closest to the query,
with their facts and source-file provenance. Use this to find entities,
relationships, or concepts by description when you do not yet have specific
node IDs. Once you have IDs, use kg_walk to traverse their neighbourhood.
path_prefix filters by node provenance — only nodes sourced from files
under the prefix are returned. node_types narrows to a subset of the
types listed by kg_info.
curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/tools/kg-search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"coverage": {
"labels_required": [
"<string>"
],
"request_access_hint": "<string>",
"restricted_candidates": 0
},
"nodes": [
{
"degree": 123,
"facts": [
{
"evidence": {
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"relevance_score": 123,
"snippet": "<string>",
"why": "<string>",
"component": "<string>",
"locator": {
"char_end": 123,
"char_start": 123,
"kind": "text_range",
"page": 123,
"pages": [
123
]
},
"page": 123
},
"predicate": "<string>",
"value": "<string>"
}
],
"node_id": "<string>",
"node_type": "<string>",
"source_files": [
{
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>"
}
],
"title": "<string>"
}
]
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}Authorizations
Path Parameters
Workspace identifier.
Body
Response
Successful Response
Response body for kg-search.
What the access gate withheld, in counts and label names only.
Never a name, path, or fragment of withheld content. Naming the labels leaks nothing the caller cannot already read from the workspace config, and it turns "some results were withheld" into an actionable request.
Show child attributes
Show child attributes
Show child attributes
Show child attributes