One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicCatalogSearchSuggestionsRequest

struct · iOS 16.0+ · SDK 27.1

struct MusicCatalogSearchSuggestionsRequest

A request that your app uses to fetch suggestions from the Apple Music catalog using a search term.

Members (5)

init · iOS 16.0+

init

TypeScript
static init(term: string): MusicCatalogSearchSuggestionsRequest
Swift declaration
init(term: String, includingTopResultsOfTypes types: [any MusicCatalogSearchable.Type] = [])

Creates a catalog search suggestions request for a specified search term along with a list of types to include when fetching top results. By default, top results are not fetched.

get · iOS 16.0+

term

TypeScript
get term(): string
Swift declaration
let term: String

The search term for the request.

get · iOS 16.0+

limit

TypeScript
get limit(): (number) | null
Swift declaration
var limit: Int?

A limit for the number of items to return in the catalog search suggestions response.

set · iOS 16.0+

limit

TypeScript
set limit(value: (number) | null)
Swift declaration
var limit: Int?

A limit for the number of items to return in the catalog search suggestions response.

method · iOS 16.0+

response

TypeScript
response(): Promise<MusicCatalogSearchSuggestionsResponse>
Swift declaration
func response() async throws -> MusicCatalogSearchSuggestionsResponse

Fetches suggestions of the requested catalog searchable types that match the search term of the request.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MusicCatalogSearchSuggestionsRequest.typesForTopResults

Passing a Swift type itself is not supported.

All MusicKit types →