Search endpoints
POST - /search
Search for similar documents
Body
filters
required
array of string
An array of string filters. Those filters can be used both to have multiple use cases (eg: search on your landing page, search on your app) and to separate documents from multiple tenants. Ex: filter by userID:123; filter by website:https://example.com; filter by case:abc
Minimum items: 1
maxResults
required
number
The maximum number of results to return
Default: 100
Maximum: 500
query
required
string
A search query to search for similar documents
Responses
200
results
required
array of object
content
required
string
The original document content as a single string
documentID
required
string
The document's ID. You can use any way to uniquely identify your document such as UUIDs or canonical urls
filters
required
array of string
An array of string filters. Those filters can be used both to have multiple use cases (eg: search on your landing page, search on your app) and to separate documents from multiple tenants. Ex: filter by userID:123; filter by website:https://example.com; filter by case:abc
Minimum items: 1
highlights
optional
string
(Optional) the highlight of the document/Closest match. This is to be used in RAG or to display the relevant part of the document to the user
metadata
required
object
Any metadata associated with the document (you can put anything you want in here)
score
required
number
The search score of the document. This score can be higher than 1
title
required
string
The title of the document
POST - /search/upsert
Create or update a document to be searched for later.
**Note:**
By default the server will reject any request that have a body larger than 1Mb. This limit can be increased on paid plans.
Body
content
required
array of string
The text of the document. If the array has only one item, the document will be split in chunks automatically
documentID
required
string
The document's ID. You can use any way to uniquely identify your document such as UUIDs or canonical urls
filters
required
array of string
An array of string filters. Those filters can be used both to have multiple use cases (eg: search on your landing page, search on your app) and to separate documents from multiple tenants. Ex: filter by userID:123; filter by website:https://example.com; filter by case:abc
Minimum items: 1
metadata
required
object
Any metadata associated with the document (you can put anything you want in here)
title
required
string
The title of the document
Responses
200
422
DELETE - /search/delete
Delete a document from the search
URL Parameters
documentID
required
string
The document's ID. You can use any way to uniquely identify your document such as UUIDs or canonical urls
Responses
200