MusicCatalogSearchRequest does not find Albums that are found when using the Music app with the same search string

I am using the MusicKit library for Swift.

With this:

let searchString = “led zeppelin iv deluxe edition”
var albumSearchRequest = MusicCatalogSearchRequest(term: searchString, types: [Album.self])

The response from: let response = try await albumSearchRequest.response() returns no albums; however searching manually for that exact string in the Music App on either iOS or macOS will return results.

This is really weird and problematic if one is trying to search for albums or tracks specific to certain albums.

Accepted Reply

Hello @Kimfucious,

Thank you very much for reaching out to us about this issue. We can indeed reproduce it very easily, and we have reported it to our search team.

That said, let me share one small bit of information you could use as a temporary workaround. We found that our catalog search logic wasn't returning some albums when you only search for albums. But if you search for both Album and Song in the same request, then you'll get an album result, just like the Music app.

Nevertheless, we'd much prefer for developers not to have to resort to such workarounds, so we will keep investigating this issue.

Best regards,

  • It is a weird workaround, but thank you for it nonetheless!

  • Thanks for the reply, @JoeKun. If things ever get fixed, it would be nice to know; otherwise, I'll keep trying with hope first and the workaround second.

Add a Comment

Replies

Hello @Kimfucious,

Thank you very much for reaching out to us about this issue. We can indeed reproduce it very easily, and we have reported it to our search team.

That said, let me share one small bit of information you could use as a temporary workaround. We found that our catalog search logic wasn't returning some albums when you only search for albums. But if you search for both Album and Song in the same request, then you'll get an album result, just like the Music app.

Nevertheless, we'd much prefer for developers not to have to resort to such workarounds, so we will keep investigating this issue.

Best regards,

  • It is a weird workaround, but thank you for it nonetheless!

  • Thanks for the reply, @JoeKun. If things ever get fixed, it would be nice to know; otherwise, I'll keep trying with hope first and the workaround second.

Add a Comment

Hello @Kimfucious and @snuff4,

This issue was actually addressed a few weeks ago via a new deployment on the server-side.

You should be able to remove that workaround now.

I hope this helps!

Best regards,

Add a Comment