| Method | POST |
| Endpoint | https://{{host}}/api/public/bot/<AppId>/search/v2/advanced-search |
| Content-Type | application/json |
| Authorization | auth: <JWT Token> |
| API Scope | Answer Generation |
Query Parameters
| Parameter | Description | Mandatory |
|---|---|---|
| AppID | Your application ID. To view your App ID, go to Dev Tools under App Settings. The AppID is listed under API scopes. | Yes |
Request Parameters
| Parameter | Description | Mandatory |
|---|---|---|
query | Query string for search. | Yes |
answerSearch | Set to true to include an answer in the response. | No |
searchResults | Set to true to include search results in the response. | No |
metaFilters | Array of rules to filter results from the Answer Index before generating the answer. For example, to use only web pages: "metaFilters": [{"condition": "AND", "rules": [{"fieldName": "sourceType", "fieldValue": ["web"], "operator": "contains"}]}] | No |
isFacetsEnable | Set to true to enable facets configured in the Search AI application. | No |
customData | Custom data to send with the request. Use this to pass previous conversations as context, set user context (identity, location, etc.), or filter search results. | No |
raclEntityIds | Array of RACL values specifying Role-Based Access Control List values to determine accessible content. Can include user identities (email addresses) and permission entity IDs (user groups). When provided, Search AI uses only these values and ignores RACL Resolver API configurations. | No |
dynamicPromptSelection | Specifies the prompt and model to use for answer generation. Overrides the default model and prompt set at the application level. Accepts integrationName, model, and promptName. Supported integrationName values: "openai", "azure", "korexo", or a custom integration name. All values are case-sensitive. For Kore XO GPT, set model to "XO-GPT" and promptName to "Default". | No |
includeMetaDataAnswers | Array of specific chunk metadata fields to include in the response. Fields are returned as part of graph_answer. For metadata fields, use the root name prefix (for example, "chunkMeta.author"). Missing fields are returned as null. | No |
includeChunksInResponse | Set to true to include the list of qualified chunks in the response. Chunk data is stored in the chunk_result field. | No |
Response
The response is in JSON format. Key fields within thetemplate field:
results: Search results grouped by source type. Chunks from the same document are grouped together.
answer_details: The answer to the query along with metadata.
chunk_result: Array of all chunks used for answers or search results. Each item contains chunk details and metadata.
facets: Filter information. Each unique value of the selected filter field creates a bucket with a key, chunk count, and document count.
tabFacet: Content for the static filter used to create tabs. Each bucket corresponds to a unique value of the tab field.
template):
llmResponseTime: Time (in milliseconds) taken by the language model to generate the response.retrievalResponseTime: Time (in milliseconds) taken by Search AI to retrieve and process relevant chunks.