Autocomplete API
info
- client read secret or client write secret is required for searching.
Overview
Path
POST/v1/search/collections/autocomplete
- Searches for Documents with appropriate titles based on the provided string.
Example
curl -X POST https://api.invector.co/v1/search/collections/autocomplete \
-H "Content-Type: application/json" \
-H "Authorization: Basic base64({CLIENT_ID}:{CLIENT_READ_SECRET})" \
-d '{
"query": "search",
"collectionsNames": [],
}'
curl -X POST https://api.invector.co/v1/search/collections/autocomplete \
-H "Content-Type: application/json" \
-H "Authorization: Basic base64({CLIENT_ID}:{CLIENT_READ_SECRET})" \
-d '{
"query": "search",
"collectionsNames": ["Results", "Docs"],
}'
Authorization
Authorization
BasicBasic authorization at Header. Base64 encoding required
client_id
string
client_secret
string
example
curl -X POST https://api.invector.co/v1/search/collections/autocomplete \
-H "Content-Type: application/json" \
-H "Authorization: Basic base64({CLIENT_ID}:{CLIENT_READ_SECRET})" \
...
Request Body
query
string (required)The search query string.
collectionNames
array of stringNames of collections to search. If empty array, searches all collections.
example
["Results", "Docs"] or []
Response Body
suggestions
array of stringAutocomplete results. Returns an empty array if no results. Returns a maximum of 10 results.
example
[
"History of Search",
"Search API",
"Search Engine",
"Search Query",
"Search Result",
"Search Term",
"Search Token",
"Searchable",
"Searchable Field",
"Searchable Fields"
]