Knowledge Search
POST /v1/knowledge/search
Search your documentation with 1-5 natural language questions in one call. Returns semantically relevant results with answer content, source reference, and unique ID.
https://api.ragionex.com/v1/knowledge/search
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| queries | string[] | required | 1-5 natural-language questions, each 1-128 characters. One question = a one-element array; each item is searched independently and results are merged. |
| project | string | required | The knowledge project name (max 64 characters) |
| results | integer | optional | Number of results to return (1-50) Default: 10 |
Example Request
import requests response = requests.post( "https://api.ragionex.com/v1/knowledge/search", headers={"X-API-Key": "rgx_knowledge_demo_geXuBZJ5O2GltcG63s1LGijGBwlERGlo"}, json={ "queries": ["How to format code in VS Code?"], "project": "vscode-docs", "results": 5 } ) data = response.json()
const res = await fetch("https://api.ragionex.com/v1/knowledge/search", { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": "rgx_knowledge_demo_geXuBZJ5O2GltcG63s1LGijGBwlERGlo" }, body: JSON.stringify({ queries: ["How to format code in VS Code?"], project: "vscode-docs", results: 5 }) }); const data = await res.json();
curl -X POST https://api.ragionex.com/v1/knowledge/search \ -H "Content-Type: application/json" \ -H "X-API-Key: rgx_knowledge_demo_geXuBZJ5O2GltcG63s1LGijGBwlERGlo" \ -d '{ "queries": ["How to format code in VS Code?"], "project": "vscode-docs", "results": 5 }'
Response
Response 200 OK
{
"success": true,
"results": [
{
"answer": "To format your code in VS Code, use the Format Document command (Shift+Alt+F) or configure Format On Save in settings...",
"source": "docs/editor/codebasics.md",
"id": "X1Y2Z3"
},
{
"answer": "VS Code supports automatic formatting through language-specific formatters...",
"source": "docs/languages/javascript.md",
"id": "A4B5C6"
}
]
} Response 401 Unauthorized
{
"success": false,
"error": "Invalid or missing API key"
}