MKLocalSearch missing Music Venues from response

I have created an MKLocalSearch request as follows:

        let reqVenue = MKLocalSearch.Request()
        reqVenue.naturalLanguageQuery = "Music Venue"
        reqVenue.resultTypes = .pointOfInterest
        reqVenue.region = .init(center: mockCoord, latitudinalMeters: 150, longitudinalMeters: 150)

I have made sure mockCoord is the exact location coordinate of the example music venue I want to get back in the response. I have noticed that all Music Venues I can find on Apple Maps do not come back as results in MKLocalSearch. I would love an explanation as to why and what I can do to make them appear in MKLocalSearch results please!

best, nick

Answered by niclego in 799033022

Thank you! This is what I was looking for.

Hello Nick,

It looks like you're trying to find specific types of places without necessarily having a name to search for. Rather than using MKLocalSearch.Request, which is primarily tailored for use cases where you search for the name of a place, I would encourage you to use MKLocalPointsOfInterestRequest.

MKLocalPointsOfInterestRequest is designed for finding points of interest near a specific location. To narrow down the types of places you get from your search, you can apply an MKPointOfInterestFilter and with iOS 18 and macOS 15 we are introducing a Music Venue category to our list of supported categories!

Here's an example of how you would create the request:

let venueRequest = MKLocalPointsOfInterestRequest(center: mockCoord, radius: 150)
venueRequest.pointOfInterestFilter = .init(including: [.musicVenue])

The request is then used with MKLocalSearch just like MKLocalSearch.Request.

Accepted Answer

Thank you! This is what I was looking for.

MKLocalSearch missing Music Venues from response
 
 
Q