---
title: "Run a Text AI Based Search on Trained Datasets"
method: POST
path: "/api/ai/search/v2"
tags: ["AI Dataset Management"]
---

# Run a Text AI Based Search on Trained Datasets

`POST /api/ai/search/v2`

Run a Text AI Based Search on Trained Datasets. You can run a Text AI Based Search on Trained Datasets using this endpoint. You can pass in the Dataset ID and the Search Query and we will run the search for you.

## Request body

- object
  - `question` string — The Search Query that you want to search for.
  - `training_data` string — The ID of the Trained Dataset that you want to search in.

## Response `200`

Successful response

- object
  - `status` string — Status indicating the success of the request.
  - `result` object[]
    - `sId` string — The ID of the item.
    - `type` string — The type of the item.
    - `name` string — The name of the item.
    - `ppu` number — The price per unit of the item.
  - `processing_time` integer — The time taken to process the request, in milliseconds.
  - `processing_id` string — A universally unique identifier for the request. This can be used to track the request in the logs.
  - `processing_count` integer — The number of times the request has been processed. This is what is considered in the Billing Process.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized
- `404` — Not Found
- `406` — Not Acceptable
- `500` — Internal Server Error

---

[API](https://skmtc.net/worqhat/apis/worqhat-ai-api-endpoints-2.md) · [All operations](https://skmtc.net/worqhat/apis/worqhat-ai-api-endpoints-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worqhat/worqhat-ai-api-endpoints-2/versions/fc369f69a3e6/schema)
