Suggestions

Service that returns search suggestions based on a search term. This service can be called as soon as the user begins to type a search term.

Implementation

To implement suggestions, read our guide on Suggestions.

Path Params
string
required

Instance specific key.

Query Params
string
required

Search term entered by the user.

Maximum length: 100

string
required

The category that should contain the filtered results. If you want to provide the entire path, you should include the categories divided by a hyphen (-).

Example: ?tn_cid=100-150

string

Specify the language to use for the search algorithms.

All available languages can be retrieved with the catalog call: /catalog/languages/{instancekey}

Example: ?tn_lang=nl

boolean

Whether or not navigation urls returned in the response use the tn_filters parameter (?tn_filters=brand%3DCoca%20Cola%26volume%3D1L, instead of ?tn_fk_brand=Coca%20Cola&tn_fk_volume=1L).

Example: ?tn_use_filters=true

string

Hidden parameters can be added to the URL by using the parameter 'tn_parameters'.
The key is the facet URL-name. The value is the facet value that should be applied.

Important: double URL-encoding is required.

  1. Build the parameter string — combining keys and values:

    • encode special characters inside values (spaces, +, &, =, etc.)
    • concatenate multiple values using a pipe (|)
      example: brand=Coca%20Cola%7CPepsi&volume=1L%7C1.5L
  2. URL-encode the entire filter string — because the whole string is passed as a single query parameter value, encode it a second time:
    brand%3DCoca%2520Cola%257CPepsi%26volume%3D1L%257C1.5L

  3. Append to the URL:
    ?tn_parameters=brand%3DCoca%2520Cola%257CPepsi%26volume%3D1L%257C1.5L

string

Hidden exclusion parameters can be added to the URL by using the parameter 'tn_parameters_except'.
This is used to exclude certain parameters from the results (show everything except specified parameters).
The key is the facet URL-name. The value is the facet value that should be applied.

Important: double URL-encoding is required.

  1. Build the parameter string — combining keys and values:

    • encode special characters inside values (spaces, +, &, =, etc.)
    • concatenate multiple values using a pipe (|)
      example: brand=Coca%20Cola%7CPepsi&volume=1L%7C1.5L
  2. URL-encode the entire filter string — because the whole string is passed as a single query parameter value, encode it a second time:
    brand%3DCoca%2520Cola%257CPepsi%26volume%3D1L%257C1.5L

  3. Append to the URL:
    ?tn_parameters_except=brand%3DCoca%2520Cola%257CPepsi%26volume%3D1L%257C1.5L

string

Specify the keyboard to use for the search algorithms.

All available options are: 'qwerty', 'azerty' or 'qwertz'

Example: ?tn_keyboard=azerty

Headers
string
Defaults to Tweakwise API docs

The source of the request. See the article on the request source for more information.

Responses

401

Invalid instancekey supplied

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json