iTunes Music Store API?

I can’t explain why, at least not yet, but I’m looking for a way to search the iTunes Music Store catalog outside of iTunes. Rumors of an iTunes-Google partnership have been flying lately, but what I really want is a webservice/API I can use. Yes, Apple offers an affiliate program that supports direct links, but again, they don’t offer an Amazon-style API to search their catalog.

All of this has me thinking about reverse-engineering the iTMS to build the webservice I’m looking for. DVD Jon made news not so long ago with PyMusique, now rewritten as SharpMusique, but even before that, Jason Rohrer released iTMS-4-all.

Rohrer’s work is more in line with what I’m trying to do, so I’m exploring that concept a little. iTMS-4-all is a simple web browsing interface to the store. Jean-Yves Stervinou explains:

iTunes 4 is a beautiful example of a “specialized browser”. It uses html to render pages with texts and pictures, but it also uses macosX standard GUI elements when appropriate. When you browse the albums/artists, iTunes in fact gets the contents of these lists from a Web server out there at Apple (phobos is its nickname). The format for these lists is XML [...]. iTunes reads this XML list then uses a standard list browser to show you the content.

Stervinou describes the entire iTunes store as a REST webservice, but one which Apple has chosen to keep private. Rohrer describes the problems of interacting with the ITMS encrypted content. He (and contributors) were successful, but Apple changed the encryption after iTunes 4.7 was released. It didn’t take long for DVD Jon to get around the change, but it (or something else, I haven’t looked yet) has disabled iTMS-4-all. Too bad, too, because there’s a lot we might be able to do with such a webservice. DownhillBattle.org contemplates some of these uses in their iTMS-4-all announcement (Jason Rohrer is somehow involved with Downhill Battle).

More reading: Free Software Magazine did some poking at iTunes, The g4tv Screensavers crew looks into iTunes Hackery, Apple does offer a very limited iTunes RSS feed generator, XMLHead looks at the structure of iTunes affiliate links, and (update) here’s some talk about the iTMS XML interface before they started encrypting it.

tags: , , , , , , , , , ,

12 Comments

  1. cpan for itms_client

  2. As a stop-gap measure until Apple gets back to its senses, you can do what I did: Write a script that connects to the the itunes link maker (http://phobos.apple.com/WebObjects/MZSearch.woa/wa/itmsLinkMaker)
    and supplies the appropriate arguments. The link structure is very simple.

    Not exactly an API, but it does the job. I actually glued it together with Anazon Web Services, allowing people to select favorite albums for their member pages on my site. It works very well, with about 95% of the amazon selected albums matching up with an iTunes playlist. Pretty sweet!

  3. Could you please tell me how can i refresh the song list in iTunes’s libarary whenever i change the content of the folder that storing the songs (mp3 for example) in the list …
    Thanks

  4. Hi How Do You Buy Itunes Songs?

  5. You can close itunes and re-open it. Same ting happens to me if I disconnect my external harddrive that has all my music on it.

    I just close itunes, make sure the external is connected and open iTunes again.

  6. My daughter bought some tunes from your company back in june using my credit card, we cancelled the account but yet you have charged my card
    $1.99 for some reason and now I have a charge for $39.47 when we hven’t used this account since then. Email me how I can see the account, It will be under the name K’Lee Hamilton

  7. Joseph>

    Do you have the code anywhere to parse the search results? I’m actually looking to have individual songs linked to the appropriate iTunes song for download. Want to automate the Affiliate Program process.

    I still can’t believe there isn’t an API for this.

    Apple, get your head out of your asses! This would be a GREAT addition for you guys!

  8. I developed a script that accesses the iTunes Music Store and pulls album information through a web browser. Putting it together with some AJAX, I developed cloudTunes (http://www.petrosalema.com/cloudtunes). Check it out; I think it is the sort of thing you’re talking about.

    cloudTunes simply requests the same information as iTunes software but parses it and displays it as HTML.

    Apple should definitely develop an open API or webservice for the iTMS, I can’t see how it wouldn’t be to their advantage.

  9. i m getting exception on this …..
    SearchDesktopClass msnDS = new SearchDesktopClass();

    exception:
    Retrieving the COM class factory for component with CLSID {1AD68C99-00FB-416D-804B-C38DEE75D55E} failed due to the following error: 80040154.

    Plz help me out

    Thanks

  10. [...] iTunes 9’s interactions with the Store are more web-happy. I’ve been asking where the iTunes Store API was for some time, now I think I’ve got what I need to build one. Others also read: [...]

  11. I think you will find a lot of the information you are looking for in my recently published book, currently the only one about the iTunes Affiliate Program or the iTunes API.

    Check it out at MasteringiTunes.com


Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

itunes api (4811) - itunes store api (718) - itunes webservice (209) - ipod api (198) - itune api (186) - itms api (179) - itunes card generator (173) - music api (172) - itunes music store api (170) - itunes refresh library (162) - iTunes Store XML (160) - itunes affiliate api (155) - napster api (153) - itunes search api (149) - iTunes refresh (144) - itunes web service (134) - api itunes (128) - itunes code generator (123) - itunes web api (114) - amazon music api (113) - iTunes Link Maker API (108) - apple itunes api (99) - phobos itunes (98) - refresh itunes (96) - hack itunes store (95) - itunes link generator (90) - itunes store browser (86) - sharpmusique itunes 6 (86) - itunes store hack (86) - itune com (85) - music store api (77) - amazon mp3 api (77) - hacking itunes store (74) - itunes web services (74) - apple store api (68) - itunes store web service (63) - refresh itunes list (61) - itunes javascript (60) - javascript itunes (56) - api music (54) - refresh itunes library (52) - itunes java api (51) - itunes affiliate script (51) - itms xml (50) - music webservice (50) - itunes store in browser (49) - itunes com api (46) - itunes refresh list (46) - search itunes store (44) - itms-4-all (43) - itunes api php (43) - itunes link API (41) - browse itunes store (41) - itunes api java (38) - itunes library api (37) - iTunes Music API (36) - itunes store search (36) - itunes gift card code generator (35) - itune store (33) - hack itunes music store (31) - itunes web service api (31) - itunes 6 encryption (31) - iTunes card code generator (30) - how to refresh itunes (28) - affiliate api (28) - refresh itunes song list (28) - itune store api (28) - itunes phobos (27) - hacking itunes music store (27) - google music api (27) - itunes 6 hack (27) - itunes refresh tags (27) - itunes apis (27) - amazon mp3 store API (27) - itunes api affiliate (26) - java itunes api (26) - amazon api music (25) - how to hack itunes store (25) - itunes refresh folder (24) - itunes refresh music list (24) - itunes api web (23) - itune affiliate (23) - itunes 7 refresh library (23) - itunes refresh song list (23) - amazon music store api (23) - apple music store api (22) - itune com api (22) - refresh itunes music list (22) - itunes api example (22) - itunes affiliate (22) - itunes gift card generator (22) - itunes store api phobos (21) - itunes (21) - ipod java api (21) - search API itunes music store (21) - apple phobos (21) - itunes store web service search api (21) - PyMusique itunes 6 (20) - itunes webservices (20) - itunes affiliate links (19) - itune javascript (19) - itunes music store web interface (19) - javascript itune (19) - itms hack (18) - refreshing iTunes (18) - google music search api (18) - iTunes Affiliate Links Search (18) - iTunes API javascript (18) - itune java (18) - refresh itunes store (18) - APPLE iTUNE COM (18) - webservice itunes (17) - msn music api (17) - itunes affiliate program api (17) - itunes store search api (17) - sharpmusique video (16) - itunes music store browser (16) - API Itunes Store (16) - itunes link maker podcast (15) - hacking itunes 6 (15) - itunes affiliate links script (15) - itunes affiliate search api (15) - itunes 6 browser hack (15) - sharpmusique itunes 7 (15) - apple itunes store api (15) - itunes api store (15) - itunes store web interface (15) - itunes music store (14) - ITune Java API (14) - itunes affiliate link search (14) - itunes store browse web (14) - sharpmusique (13) - itunes affiliates api (13) - itunes link maker hack (13) - itunes search link affiliate (13) - itunes link maker (13) - itunes api use (13) - itunes affiliate images (13) - itunes affiliate links xml (13) - itunes store refresh (12) - itunes 6 videos hackers (12) - ipod api java (12) - webservice music (12) - refresh library itunes (12) -