Semantic searching of documents

Last updated: 28 October 2022

Searching vs Querying

Viko supports two types of query - question answering and searching. This document relates to searching. Read more about question answering vs searching

The examples in this document use the stubbed endpoint. Remember to switch over to the real endpoint !

Search for a relevant document and snippet.

Filters can be applied to restrict the document sources (context)



Request headers

Content-Type: application/json (required)
X-Api-Key (required)

Request body

  text: string (required)
  filter: {
    folders: Array<string> (optional)

Note: The context used to answer a question is a union of all those documents matching a filter. Put another way - we apply an implicit OR clause to filters i.e. documents within any of the specified folders.


Status: 200

Response body

  "results": [
      context: string (optional) // snippet
      title: string (optional)
      link: string (optional)
      confidence: float (required) // 0 to 1


$ curl \
  --header 'X-Api-Key: replaceme' \
  --header 'Content-Type: application/json' \
  --request GET '' \
  --data-raw '{
      "text": "shipping prices",
      "filter": {
          "folders": [
    "results": [
            "context": "Lorem ipsum next day shipping is available for $4.95 Lorem ipsum",
            "title": "Shipping prices",
            "link": "",
            "confidence": 0.85

Try Viko

Want to see Viko in action? Try our interactive demos