Serverless AI Data Documents Search

AI powered semantic search service that finds the most relevant chunks from a vector collection based on a query. Returns only the chunks that have a similarity score of 0.5 or higher.

Endpoint

Search through vector embeddings in a collection using AI-powered semantic search

POSThttps://api.xtartapp.com/data/loader/search

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
collectionstringYes-The name of the collection to search in. Must be a collection previously created with data-loader-upload.
querystringYes250The search query to find relevant chunks in the collection.
topKnumberYes25The maximum number of results to return. Default is 5, maximum is 25.
scoreThresholdnumberNo1The minimum score threshold for results to be returned. Default is 0.7, minimum is 0, maximum is 1.

Response

NameTypeDescription
dataobjectThe data of the search operation
data.resultsarrayArray of content chunks matching the search query, ordered by relevance
data.collectionNamestringThe name of the collection that was searched
metadataobjectMetadata about the data loader search process
metadata.costnumberThe cost of the data loader search request (fixed at $0.000001 per request)

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400DATA_LOADER_SEARCH_ERROREx: could not search collection | collection not found
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.