patgilmour Posted November 2, 2020 Share Posted November 2, 2020 Hi, In Apple Music, I am trying to replicate an Alfred Custom URL search I use to search Spotify's catalog directly in the app (i.e. not in a browser). The Alfred Spotify Custom Search URL search is: `spotify:search:{query}` This will open Spotify in the Mac app and perform the search (screenshot attached). I've tried various modifications for the Apple Music app, like `music:search:{query}` and `spotify:search:term={query}` and various others that are close to the browser-based search query: `https://music.apple.com/us/search?term=[query-here]` The above queries starting in 'music...' don't work. The do open Apple Music directly on the Mac and start playing whatever is next in the queue. Does anyone know of the correct scheme to use to perform the searches in Apple Music via Alfred? Thanks, Pat Link to comment
patgilmour Posted November 2, 2020 Author Share Posted November 2, 2020 Meantime, as I don't need the scheme for anything else, this very simple workflow does the job (see attached screengrab) Note that "Copy to Clipboard" has the option set to paste into frontmost application. Slightly clunky perhaps but it's fast and it works... Link to comment
Chris Messina Posted November 2, 2020 Share Posted November 2, 2020 I don't think Music.app supports deep routes like Spotify does. You can find the available URL schemes in the app's info.plist file: In order to open Music.app to a specific resource, you typically need to generate a full URL with song, album, or artist metadata. You can generate these links using Apple's Services Marketing Tools. With that tool, you can generate links that will open a specific song in Music.app (but won't perform a search). To achieve your desired outcome, however, I would recommend @gingerbeardman's Search Apple Music Workflow, which was discussed here. patgilmour 1 Link to comment
patgilmour Posted November 3, 2020 Author Share Posted November 3, 2020 Thanks for taking the time to reply, @chris! Useful info. I took a look at the dev docs on Apple. Closest I got to what I needed was here: https://developer.apple.com/documentation/applemusicapi/search_for_catalog_resources But you're right, the URL schemes (if that's what they are called) are very limited. I did take a look at the workflow you mention, but my Alfred kludge is closer to what I want so I'll stick with that for now. Link to comment
Chris Messina Posted November 3, 2020 Share Posted November 3, 2020 Cool, sounds good. If what you built works, great! I might also suggest considering writing some AppleScript or build an Automator Workflow that Alfred executes to add more capabilities: Link to comment
patgilmour Posted November 3, 2020 Author Share Posted November 3, 2020 Yeah, I was in there earlier too! But sometimes easiest is best... 😉 Link to comment
gingerbeardman Posted February 26, 2022 Share Posted February 26, 2022 (edited) Since 2016 an iTunes (and now Music) deep search workflow is here:https://www.alfredforum.com/topic/8418-apple-music-search-with-alfred/ Edited February 26, 2022 by gingerbeardman Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now