API Reference/Search/Suggestions

Get search suggestions

GET
/api/search/suggestions
AuthorizationBearer <token>

In: header

Query Parameters

qstring
type?string
Default"all"
Value in"all" | "documents" | "tags" | "users"
limit?integer
Default10

Response Body

curl -X GET "http://localhost:3000/api/search/suggestions?q=string&type=all&limit=10"
fetch("http://localhost:3000/api/search/suggestions?q=string&type=all&limit=10")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:3000/api/search/suggestions?q=string&type=all&limit=10"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:3000/api/search/suggestions?q=string&type=all&limit=10"

response = requests.request("GET", url)

print(response.text)
{
  "query": "string",
  "suggestions": [
    {
      "suggestion": "string",
      "type": "string"
    }
  ]
}