Text autocomplete API
autocomplete takes input text and returns possible completions.
Command name: autocomplete
Success status: 200 OK
On this page
Related: Overview, Supported languages
Common parameters
cmd selects the command to run.
cmd
string
Yes
Must be autocomplete.
These parameters work with any cmd.
serviceid
string
Cloud only
Cloud API key. Required for Cloud requests. Not used on-premises.
short_answer
boolean
No
JSON only. When true, shortens JSON keys to reduce payload size.
See Overview for details.
Parameters
These are parameters specific to cmd=autocomplete.
text
string
Yes
Text to complete. The completion is returned as a suffix string. It can start with whitespace.
Request examples
Example: completion found
Request:
Response (200 OK):
Use defaults: format=json, short_answer=false.
Add short_answer=true.
Example: no suggestions
Request:
Response (200 OK):
Response schema
The response is always an object with a single result.
JSON (short_answer=false)
result(object) Always present.result.suggestions(array of strings) May be empty. Each item is a completion suffix to append totext.
Short JSON (short_answer=true)
Key mapping:
result→rsuggestions→s
Errors
Errors use the shared error format from Overview.
Language code not found (400 Bad Request)
Language has no autocomplete support (403 Forbidden)
Last updated
Was this helpful?

