Daily Dish of Dominey Design
{  April 30, 2003  }

How to Link to Items in the iTunes Store

If you've been wondering how to create hyperlinks to items within the iTunes Store, and haven't found an answer in any of the iTunes help documents, you're in luck. Thanks to Fuse, we have an answer.

The basic structure of the hyperlink is:
itms://phobos.apple.com/WebObjects/MZSearch.woa/
wa/advancedSearchResults

From there, there are four possible variables that can be passed in the query - songTerm, artistTerm, albumTerm, and composerTerm.

So say you wanted to link to music by Beck. You would enter:
itms://phobos.apple.com/WebObjects/MZSearch.woa/
wa/advancedSearchResults?artistTerm=Beck

If your artist name has two or more words in it, insert %20 in place of the white space.

If you wanted to link directly to Beck's new album Sea Change, you would do the following:
itms://phobos.apple.com/WebObjects/MZSearch.woa/
wa/advancedSearchResults?artistTerm=Beck
&albumTerm=Sea%20Change

The general rule is to insert an ampersand (&) between variables in your query string.

There are some great things you could do with the links, including wrapping your "listening" lists from Kung-Tunes (or other shareware iTunes related apps) so you can automatically link your published playlists to the iTunes Store.

Also of interest is that the interface, and all content, is completely XML driven. So by providing hyperlinks in this manner, Apple has indirectly set up a web service. Third party developers - though they aren't licensed to - could also use the query to return raw data for their own purposes. Insert a standard "http" in place of "itms" in the above URLs, run it through your web browser, and you'll receive live links to the album info, cover art, track previews, and other content that could easily be marked up for other purposes. Whether it is legal to do so, is another matter.

Comments

at the risk of ineloquence: dude, you rock. thanks for the info.

Posted by: jeremyw at April 30, 2003 10:26 AM

I meant to sniff my network for this info, but it's nice to see it posted here.

I love how the future of the internet is shaping up. This is easily huger than when eToys IPO'd, but only the geeks seem to have noticed this time. Which is how it should be.

Posted by: Jon at April 30, 2003 12:21 PM

I second Jeremy up there. You rock!

Posted by: Paul Burdick at April 30, 2003 12:37 PM

Aye, was looking for something like this. You rule, man.

Posted by: phil at April 30, 2003 1:12 PM

There's a relevant thread on www-tag:
http://lists.w3.org/Archives/Public/www-tag/2003Apr/0151.html

I'm wary of linking heavily to their search results pages as pseudo-album, since search results could return more than intended (not so bad), but also because search implementations (a la MSDN) seem most among the most volatile URLs.

Posted by: Jeremy Dunck at April 30, 2003 3:27 PM

Sorry.. that should be:
Apple Music Store & Web Architecture.

Posted by: Jeremy Dunck at April 30, 2003 3:29 PM

Of course, all of this was blogged nearly a full day before you covered it:
http://nslog.com/archives/2003/04/29/itms_links.php

:-P

Oh well. There it is.

Posted by: Erik J. Barzeski at April 30, 2003 3:46 PM

not to overstate the painfully obvious. but, of course this only works on macs.

can't get very far in life not saying IS.
-TKWSN

Posted by: cudaboy_71 at April 30, 2003 3:49 PM

It's a somewhat eerie coincidence that your example (Beck, Sea Change) is exactly what I'm listening to at the moment. Indeed, I just switched over to it before hitting your site.

Posted by: Stv, at April 30, 2003 4:19 PM

(re: Sea Change) One of the best albums I’ve heard in a long time. Okay, I don’t really have anything relevant to add to the conversation… I just feel the need to get that point across as often as I can. Love it, love it, love it.

Posted by: James at April 30, 2003 6:29 PM

Well, it works well with Kung-Tunes.

listening to...

Posted by: tim at April 30, 2003 8:20 PM

...you pc guys have probably figured this out by now, but replace the itms:// with http://

Posted by: amit at May 1, 2003 10:46 AM

Speaking of windows, it is worth mentioning that iTunes 4 with the Music Store is coming to Windows by the end of this year.

Posted by: Todd Dominey at May 1, 2003 11:18 AM

btw, folks should encode ampersands in urls as '&'.

Posted by: billy at May 2, 2003 1:22 AM

archives

You are reading "How to Link to Items in the iTunes Store" in the individual archives.

Check out other recent posts in the Apple category

Return to the front page.