Search served knowledge
Searches the documents currently served from the app's buckets. Combines keyword and semantic ranking and returns at most one hit per document. When semantic search is unavailable the response has `mode: "keyword"` and a `note` saying so. Documents in review or still being scanned are not searched; the previously served version keeps answering until the new one is released.
Searches the documents currently served from the app's buckets. Combines keyword and semantic ranking and returns at most one hit per document. When semantic search is unavailable the response has mode: "keyword" and a note saying so. Documents in review or still being scanned are not searched; the previously served version keeps answering until the new one is released.
Your API key as a bearer token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/knowledge/search" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{
"mode": "hybrid",
"note": "string",
"results": [
{
"doc_id": "c8561737-9a40-4d91-8958-e405c0ad8596",
"title": "string",
"bucket": "string",
"snippet": "string",
"score": 0,
"provenance": {
"status": "served",
"redacted": true,
"engine": "string",
"scanned_at": "2019-08-24T14:15:22Z"
}
}
]
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}{
"error": "Invalid API key",
"code": "INVALID_API_KEY",
"retryAfter": 0
}Read a served document GET
Returns the served text of one document, in parts of up to 60,000 characters. While `next_offset` is not null, call again with `offset=next_offset` to read the next part.
Scan a single retrieved chunk POST
Scan one retrieved document chunk before it enters the assembled context.