One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicCatalogSearchRequest

struct · iOS 15.0+ · SDK 27.1

struct MusicCatalogSearchRequest

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

Members (8)

get · iOS 16.0+

includeTopResults

TypeScript
get includeTopResults(): boolean
Swift declaration
var includeTopResults: Bool

A Boolean value that indicates whether to request top search results.

set · iOS 16.0+

includeTopResults

TypeScript
set includeTopResults(value: boolean)
Swift declaration
var includeTopResults: Bool

A Boolean value that indicates whether to request top search results.

get · iOS 15.0+

term

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

The search term for the request.

get · iOS 15.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 response.

set · iOS 15.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 response.

get · iOS 15.0+

offset

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

An offset for the request.

set · iOS 15.0+

offset

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

An offset for the request.

method · iOS 15.0+

response

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

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

Skipped declarations

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

MusicCatalogSearchRequest.init(term:types:)

Passing a Swift type itself is not supported.

MusicCatalogSearchRequest.types

Passing a Swift type itself is not supported.

All MusicKit types →