views:

595

answers:

5

Is it possible to create URLs direct to items on the Apple iTunes store programmatically?

I have noticed that last.fm and similar sites have links which take the user directly to a part of the iTunes store, such as an album page.

The URL for the link is created by last.fm. Here's an example of such an URL: http://www.last.fm/affiliate_redirect.php?restype=9&id=3168755&supplier=24

I presume they have some code behind this link, but surely they did not add all of the items manually?

+4  A: 

This page states:

Linking to iTunes How do I create iTunes links?

Use your affiliate user name and password to log in at www.linkshare.com. On the Create Links page for iTunes, you will find banners and text links. As an affiliate, you also have access to the iTunes RSS feeds and the ability to create direct links to any song, artist, album, or audiobook on iTunes, as well as to iMix playlists, podcasts, and iTunes Essentials.

So that sounds like a "no". Of course there's always the brute force approach of screen-scraping the output of a search engine fed from a list of artist names, or from whatever you want to create a link to ...

unwind
+1  A: 

Perhaps you can use this linkmaker somehow

Tom
+5  A: 

There are two aspects. First, you can get deep links by programatically searching the App Store:

http://www.onemanclapping.org/2009/01/itms-link-generator-api.html

Next, you can convert those links to affiliate links using the LinkShare API:

http://brandontreb.com/money-you-might-be-missing-out-on-linkshare-api-integration/

link text

brianegge
+1  A: 

Apple and LinkShare must have a data feed available. Here is basic info about LinkShare Merchandiser data feeds. It looks like you'll need an account to investigate more.

dodgio
A: 

for programatically we will search songs by urls , this is code for that that linka available from itunes api NSString *method=[NSString stringWithFormat:@"http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term=shakira's+waka+waka&entity=musicVideo"]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:method]]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; artist=[[NSMutableArray alloc]init]; url=[[NSMutableArray alloc]init]; album=[[NSMutableArray alloc]init]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

ravula