iTunes Search API Around the Corner?
Could the Apple iTunes Store soon have a fully public API? On Apple's iTunes page, they have a search widget featured in the sidebar. What's interesting is that this AJAX-powered widget is returning a JSON object. How very API friendly!
The script located at http://www.apple.com/itunes/scripts/itmsSearch.php currently accepts two parameters, searchTerm and searchType where the type is one of album, allTrack, musicVideo, movie, tvSeason, audiobookLockup or podcast. Here's a quick example that searches all podcasts for 'web standards':
http://www.apple.com/itunes/scripts/itmsSearch.php?searchTerm=web%20standards&searchType=podcast
A quick attempt to hacking the URL didn't seem to reveal any callback function feature, which means client-side cross-domain calls are still out of the question. In the meantime, however, a service proxy could be easily implemented to pass the information from the API to your application.
Conversation
The error message dumps the entire schema out for you; it looks like there is a callback parameter. Take for instance this invalid search (sorry for the length):
Good catch. Unfortunately, the schema doesn't seem to match what you can pass through the URL. Which leads me to believe it's merely a proxy for the actual web service. Whereever this web service is located, a callback function might be available.
I really hope an API is coming.
That could definitely open up some interesting opportunities.
I would love to see an API, that would offer some 3rd party promotional tools or maybe even a 3D enviroment to search the library similar to what is found in iTunes 7.
If you're interested in taking this further, check out JSON.org and take a look at the languages its avaliable in!
I haven't gotten very far with reading the iTunes data in the article... BUT I believe it has potential!!
(I've tried with Json.NET)
There's some special code that you can use to search the iTunes album art image library. It's pretty cool. It's available in Java, C#, PERL, PHP, Ruby, etc.
http://jroller.com/page/rummage?entry=i7awf_for_java
This seems to have been moved now - unfortunately. The url has changed on the site too. Shame. I just tried to 'curl' it to see what it threw back. Nada.
It seems they've moved it to http://www.apple.com/global/scripts/ajax_proxy.php
There is some nify code on that page. There is a bizare script and a heap of images just to "jiggle" the iPod Shuffle cliped on to the side of the page (hurry up on APNG I say). Apple is getting some super-cool JS ideas on their website now. The store is so much more usable because of it. Good for them!
Hmm.. all gone by now?