Make a Query
Learn how to make your first query to the API
The most important part of the SID API is the query endpoint,
available at https://api.sid.ai/v1/users/me/query
.
This is the endpoint that allows you to query the user’s data that has been indexed by SID.
In this section, we’ll discuss basic usage examples of the endpoint, and limitations
that you should keep in mind when using it.
In its simplest form, a query is a JSON object with a single key, query
, whose value is a string,
for example:
This query will return a list of documents that are relevant to the query, along with a score and certain metadata. An example response is shown below:
Assuming the original query comes from a user, you could, for example, feed the results into an LLM to further refine them, and then display them to the user.
Tips for Querying
Querying the SID API is akin to using a search engine like Google. You can use natural language queries to get good results. For instance, a query like
would yield relevant results. However, if you’re looking for something specific, using keywords can yield better results. For example, if you have a document titled “SID primary features”, then a query like
would have a higher likelihood of finding this document than a more complex query in natural language.
API Reference
Learn more about the query endpoint
Was this page helpful?