Search knowledge
Semantic search over owned knowledge chunks, optionally filtered by source ids.
POST
/v1/knowledge/searchAuthorization
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonquerystringrequiredmin length 1 · max length 2000
limitintegermin 1 · max 20 · default: 8
sourceIdsstring[]Responses
200Search results.
Array of
KnowledgeSearchResultchunkIdstringrequiredmin length 1
contentstringrequiredmin length 1
documentIdstringrequiredmin length 1
scorenumberrequiredmin 0 · max 1
sourceIdstringrequiredmin length 1
sourceNamestringrequiredmin length 1
Request
curl -X POST "https://api.hackathon.space/v1/knowledge/search" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "string",
"limit": 8,
"sourceIds": [
"string"
]
}'const response = await fetch("https://api.hackathon.space/v1/knowledge/search", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"query": "string",
"limit": 8,
"sourceIds": [
"string"
]
})
});import requests
response = requests.post(
"https://api.hackathon.space/v1/knowledge/search",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"query": "string",
"limit": 8,
"sourceIds": [
"string"
]
},
)Response
[
{
"chunkId": "string",
"content": "string",
"documentId": "string",
"score": 0,
"sourceId": "string",
"sourceName": "string"
}
]