> For the complete documentation index, see [llms.txt](https://docs.cloud.deepset.ai/llms.txt)

# Export Search History

`GET /api/v1/workspaces/:workspace_name/search_history/export`

Exports the search history to a downloadable CSV file. The file includes search queries, answers, prompts,feedback, and other metadata. If a single search entry has multiple feedback entries,each feedback entry appears in a separate row.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| workspace_name | path | string | Yes | Type the name of the workspace. |
| columns | query | array of string or null | No | List of columns to include in the CSV. If omitted, all columns are included. Supported fixed columns: query, answer, prompt, feedback_score, feedback_comment, feedback_tags, rank, file_name, file_id, query_id, result_id, created_at, duration, session_id, user_given_name, user_family_name, pipeline_name, pipeline_version_id, api_key_name, filters, params, result_type, result_score, documents, context, feedback_id, feedback_bookmarked, feedback_created_at, feedback_created_by_user_id, labels, service, client_source_path. Dynamic pipeline meta fields can be included using the meta.<key> prefix (for example, meta.model or meta.finish_reason). |
| limit | query | integer | No | Maximum number of search history items to export. Defaults to 10,000. |
| pipeline_id | query | string (uuid) or null | No | Optional pipeline ID to filter search history |
| filter | query | string or null | No | The OData filter you want to use to in your query. It supports exact match and `AND` operations. For example, to filter for a metadata `category:news` and `published_date` greater than or equal to January 1 2025, here's what the URL could look like: 'url = "https://api.cloud.deepset.ai/api/v1/workspaces/production/files?limit=10&filter=category eq 'news' and published_date ge '2025-01-01' "'. OData filters only work with cursor-based pagination (leave the `page_number` field blank to enable it).To learn more about the OData filter syntax, see: [Querying Data](https://www.odata.org/getting-started/basic-tutorial/#queryData).<br/><br/>Supported filter fields:<ul><li>`answer`</li><li>`api_key`</li><li>`client_source_path`</li><li>`created_at`</li><li>`created_by`</li><li>`deployment_id`</li><li>`duration`</li><li>`feedbacks`</li><li>`feedbacks/bookmarked`</li><li>`feedbacks/comment`</li><li>`feedbacks/result_id`</li><li>`feedbacks/score`</li><li>`labels`</li><li>`note`</li><li>`pipeline_version_id`</li><li>`query`</li><li>`query_id`</li><li>`request/filters`</li><li>`request/params`</li><li>`search_session_id`</li><li>`session_id`</li><li>`status`</li><li>`tags/tag_id`</li><li>`trace_id`</li></ul> |

## Responses

### 200

Successful Response

Content type: `application/json`

### 422

Validation Error

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| detail | array of object | No |  |
| detail[].ctx | object | No |  |
| detail[].input |  | No |  |
| detail[].loc | array of string or integer | Yes |  |
| detail[].msg | string | Yes |  |
| detail[].type | string | Yes |  |
