I am trying to set up an application in which users will be able to stream music. When the user is streaming a MP3, I\'d like to set up a link to the iTunes store to buy the
You can experiment with the iTMS Link Maker that Apple provides and see how the links are formed. In addition, here is the iTMS Link Maker FAQ.
See this blog post about how to query the iTMS Link Maker automatically. Basically, you can query the iTMS Link Maker and get an XML document back that your application can process.
The iTunes Store Web Service Search API (pdf), although old and incomplete, documents how to search for content in the iTunes store and returns a JSON string with results.
The iTunes Store Web Service Search API allows you to place search fields in your website to search for content within the iTunes Store. You can search for a variety of iTunes Store content; including movies, podcasts, music, music videos, audiobooks, and TV shows. You can also call an ID-based lookup request to create mappings between your content library and the iTunes Store content library.
Queries are sent to base url:
http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?parameterkeyvalue
Where parameterkeyvalue can be one or more parameter key and value pairs indicating the details of your query.
Ok, I had this same problem and the answers here did not give me enough info. So I asked this question again with different wording, and continued to search for an answer. I ended up answering my own question in the other question, and have posted the code to do this over there.
You can find the question at:
Opening iTunes Store to specific song
It contains all the code you will need to open the iTunes Store to the specific song specified by song name and song artist.
I hope this helps someone.
Creating a link to the app store could be very problematic. I suggest you use a simple library called iLink that I found when searching for a solution for this exact issue. It would figure out everything and create the link you need that would work always. Another great thing is that it is super easy to use.