Query Knowledgebase

Search your project's trained knowledgebase using semantic search.

Search your project's trained knowledgebase using semantic search. Returns the most relevant document chunks matching your query.

Authorization

Your API token must have one of the following:

  • Access Role: Owner, Editor, Viewer, or Trainer (broad access), OR
  • Fine-grained Permission: Debugging module with Read enabled
POST
/searchIndexDocument

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/json

project_uid*string

The project UID.

query*string

Search query text. Maximum 5000 characters.

limit*integer

Number of results to return.

Range1 <= value <= 100
offset?integer

Number of results to skip for pagination.

Range0 <= value
node_id?string

Filter results by a specific document node ID.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/searchIndexDocument" \  -H "Content-Type: application/json" \  -d '{    "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "query": "How do I reset my password?",    "limit": 10  }'
{
  "type": "RXSUCCESS",
  "message": "Data Fetched Successfully!",
  "data": [
    {}
  ]
}
{
  "type": "RXERROR",
  "message": "string"
}
{
  "type": "RXERROR",
  "message": "string"
}
{
  "type": "RXERROR",
  "message": "string"
}