POST
/
v1
/
namespace
/
{namespaceId}
/
search
curl --request POST \
  --url https://api.agentset.ai/v1/namespace/{namespaceId}/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "topK": 10,
  "rerank": true,
  "rerankLimit": 50.5,
  "filter": {},
  "minScore": 0.5,
  "includeRelationships": false,
  "includeMetadata": true
}'
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "score": 0.5,
      "text": "<string>",
      "relationships": {},
      "metadata": {
        "file_directory": "<string>",
        "filename": "<string>",
        "filetype": "<string>",
        "link_texts": [
          "<any>"
        ],
        "link_urls": [
          "<any>"
        ],
        "languages": [
          "<any>"
        ],
        "sequence_number": 123
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Headers

x-tenant-id
string

The tenant id to use for the request. If not provided, the default tenant will be used.

Path Parameters

namespaceId
string
required

The id of the namespace to search.

Body

application/json
query
string
required

The query to search for.

topK
number
default:10

The number of results to fetch from the vector store. Defaults to 10.

Required range: 1 <= x <= 100
rerank
boolean
default:true

Whether to rerank the results. Defaults to true.

rerankLimit
number

The number of results to return after reranking. Defaults to topK.

Required range: 1 <= x <= 100
filter
object

A filter to apply to the results.

minScore
number

The minimum score to return.

Required range: 0 <= x <= 1
includeRelationships
boolean
default:false

Whether to include relationships in the results. Defaults to false.

includeMetadata
boolean
default:true

Whether to include metadata in the results. Defaults to true.

Response

200
application/json
The retrieved namespace
success
boolean
required
data
object[]
required