Web Service Endpoint

Get Catalog Search Hints

Fetch the search term results for a hint.

URL

GET https://api.music.apple.com/v1/catalog/{storefront}/search/hints

Path Parameters

storefront
string
(Required)

An iTunes Store territory, specified by an ISO 3166 alpha-2 country code. The possible values are the id attributes of Storefront objects.

Query Parameters

term
string

The entered text for the search with ‘+’ characters between each word, to replace spaces (for example term=james+br).

l
string

The localization to use, specified by a language tag. The possible values are in the supportedLanguageTags array belonging to the Storefront object specified by storefront. Otherwise, the storefront’s defaultLanguageTag is used.

limit
number

The limit on the number of objects, or number of objects in the specified relationship, that are returned.

types
[string]

The list of the types of resources to include in the results.

Response Codes

200 OK
OK

The request was successful.

Discussion

If successful, the HTTP status code is 200 (OK) and the results object contains a single terms array. This array contains a list of possible valid search queries determined from the search hint. If unsuccessful, the HTTP status code indicates the error and the details are in the errors array. See Handle a Response.

These results are autocompletion options for the hint and are potential search terms. See Search for Catalog Resources.

Example

https://api.music.apple.com/v1/catalog/us/search/hints?term=love&limit=10
{ "results": { "terms": [ "love on the brain", "love me now", "love yourself", "loverboy", "love songs", "love triangle", "love shack", "love", "love me like you do", "love on me" ] }}

See Also

Search

Search for Catalog Resources

Search the catalog by using a query.

Search for Library Resources

Search the library by using a query.