Back to API List This API initiates the export of answer insights data to a file in JSON format. You can apply filters to export specific results.Documentation Index
Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This API can export analytics data for up to one week at most. To download data for a longer period, invoke the API multiple times. For example, to get data for an entire month, call the API four times — once per week.
How to Export Analytics Data
- Use this API to initiate an export job. This creates a job of type
DATA_EXPORT. - Use the Jobs API with the returned job ID to retrieve the exported file details.
- The file URL is only generated after the job completes successfully.
- Once you have the file URL, download it through your browser.
| Method | POST |
| Endpoint | <host_url>/api/public/bot/<AppID>/search/analytics-export |
| Content-Type | application/json |
| Authorization | auth: <JWT Token> |
| API Scope | Answer Insights |
Query Parameters
| Parameter | Description | Mandatory |
|---|---|---|
| AppID | Your application ID. | Yes |
Request Parameters
| Parameter | Description | Mandatory |
|---|---|---|
filters | Date/time range for the export. Accepts from and to in UTC. Use ISO 8601 format when including time (for example, "2025-01-25T07:32:58.611Z"). | Yes |
event | Filter by feedback type. Accepted values: thumbsUp, thumbsDown (case-sensitive). When set, only data matching the event type is exported. | No |
Sample Request
Response
The API returns a job ID (_id) with job type DATA_EXPORT. The fileInfo object indicates the file type being generated. Use the job ID with the Jobs API to retrieve the file.
Sample Response — Creating Export Job
Sample Response — Jobs API (Completed Export)
When invoking the Jobs API for file export, thefileInfo field contains the link to the exported file.
fileInfo field for the exported file details. Download the file from fileUrl. The file includes search query details, generated answers, and debug information such as relevant chunks, LLM request, and response parameters.
For small datasets (fewer than 150 records), data is exported as a single file. For larger datasets, data is split into fragments of 150 records each, available as separate files.
Exporting Large Datasets
When exporting large datasets, the data is split into multiple fragments (default: 150 records per file). The Jobs API response includes the following additional fields for managing fragments:| Field | Type | Description |
|---|---|---|
hasAnalyticsFragments | Boolean | true for multi-file exports, false for single-file exports. |
analyticsFragments | Array | Metadata about all export fragments. Present for both single and multi-file exports. |
store | Object | Meta info including totalRecords and totalFiles. |
percentageDone | Number | Percentage-based progress for the analytics export. |
Sample Response — Large Dataset with Multiple Fragments
Key Notes
- Always check the
hasAnalyticsFragmentsfield to determine if data is segmented. - Date ranges must be within 7 days.
- Use ISO 8601 format for
fromandtotimestamps. - Data is exported in JSON format.