Class: HintsEndpoint
Defined in: endpoints/Hints/index.ts:23
Provides lightweight typeahead suggestions for search terms.
Methods
hints()
hints(params: HintsEndpointParams): Promise<HintsResponse>;
Defined in: endpoints/Hints/index.ts:54
Retrieve search hints for a partially typed query.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | HintsEndpointParams | HintsEndpointParams including storefront, search term, and optional pagination options. |
Returns
Promise<HintsResponse>
Structured hint results grouped by content type.
Throws
Error When the endpoint has not been initialized or the request fails.
Example
const hints = await appleMusic.Hints.hints({ term: "taylor" });
console.log(hints.hints.map((hint) => hint.displayTerm));