Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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 ...

A Good thing to remember is that apple use app ID's in the URL structure, if you want to be able to code a link to your app before your app is live you can create the url yourself by going in to itunes connect, finding your app ID and then creating a URL as bellow.

Apple ID from Itunes Connect

http://itunes.apple.com/app/id439244209

Programatically we search songs by URLs, this is code for that link 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];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top