# Export Search History

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Export Search History"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/workspaces/{workspace_name}/search_history/export"}
  context={"endpoint"}
>
  
</MethodEndpoint>

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.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}},{"description":"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, api_key_name, filters, params, result_type, result_score, documents, context, feedback_id, feedback_bookmarked, feedback_created_at, feedback_created_by_user_id, labels. Dynamic pipeline meta fields can be included using the meta.<key> prefix (for example, meta.model or meta.finish_reason).","in":"query","name":"columns","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"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, api_key_name, filters, params, result_type, result_score, documents, context, feedback_id, feedback_bookmarked, feedback_created_at, feedback_created_by_user_id, labels. Dynamic pipeline meta fields can be included using the meta.<key> prefix (for example, meta.model or meta.finish_reason).","title":"Columns"}},{"description":"Maximum number of search history items to export. Defaults to 10,000.","in":"query","name":"limit","required":false,"schema":{"default":100000,"description":"Maximum number of search history items to export. Defaults to 10,000.","title":"Limit","type":"integer"}},{"description":"Optional pipeline ID to filter search history","in":"query","name":"pipeline_id","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Optional pipeline ID to filter search history","title":"Pipeline Id"}},{"description":"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>","in":"query","name":"filter","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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>","title":"Filter"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
