How can I get information about the application / song / video, etc. From the iTunes Store?

I need to get application / song / video information by item id from the iTunes Store.

I found this

But this does not work with applications.

Is there a public API?

UPD: I can get information using this link , but this is not structured data, it's just markup for iTunes to display material. I cannot rely on this - it can be changed at any time and it is difficult to disassemble, since it does not have an agreed structure ...

+6
iphone web-services app-store itunes macos
source share
5 answers

Apple now offers a more convenient search service that returns JSON. NB: documentation stipulates that the API is for use in connection with the promotion of search results (i.e. it is intended for affiliate links).

Example, getting information about the application, if you know its Apple ID:

http://itunes.apple.com/lookup?id=[appleID] 

General keyword search

 http://itunes.apple.com/search?term=[query] 
+7
source share

As far as I know (and I have done a lot), there is no public API.

You are correct that HTML is not semantically structured, so parsing will not be very reliable. But I think this is your only option. Here are some links that might help: -

A Python script that parses reviews.

Ars Technica article: Link to the Stars: hack iTunes to view reviews .

Inside iPhone: Scramble AppStore Reviews .

+4
source share

ITunes has a public API called the iTunes Store Web Services Search API, which returns a lot of information. Some of them are documented here , but this documentation is incomplete.

You can use the API to get information about everything that can be sold in the iTunes Store and the App Store, including URLs for design, links directly to iTunes, all developer applications, etc. It is very reliable, and I would like to find updated documentation.

I am currently writing an article in the iPhone Dev FAQ to show how some things are done and expand the available documentation.

+2
source share

This link you have JSON! You have the right solution here . You just need JSON.framework

+1
source share

I wrote this script for myself. It is not optimized or will not be promising, but it works for me in the meantime ...

 <?php ini_set('display_errors', false); if(isset($_GET['appID']) && isset($_GET['format'])) { $appID = (int)stripslashes($_GET['appID']); $format = stripslashes($_GET['format']); $url = "http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=$appID&mt=8"; $useragent = "iTunes/4.2 (Macintosh; U; PPC Mac OS X 10.2"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); $result = curl_exec($ch); curl_close($ch); $temp = str_replace("&#189;","",strip_tags(substr($result, strpos($result,"Average rating for the current version:"), strpos($result,"Rate this application:")-strpos($result,"Average rating for the current version:")))); $temp1 = explode("ratings",$temp); if(strpos($temp1[2], "Average rating for all versions:")) $temp1[2] = substr($temp1[2],0,stripos($temp1[2],"Average rating for all versions:")); $temp1[2] = preg_replace('/\s\s+/', ' ', $temp1[2]); $temp2 = explode(" ",$temp1[2]); $ratings[0] = $temp2[1]; $ratings[1] = $temp2[2]; $ratings[2] = $temp2[3]; $ratings[3] = $temp2[4]; $ratings[4] = $temp2[5]; if($format == "prettyPrint") printRatings($ratings); else if($format == "XML"); getXML($ratings); } else { echo "Enter the app id and format (http://iblackjackbuddy.com/getAppRatings.php?appID=###&format=###"; } function printRatings($ratings) { echo "Five stars: " . $ratings[0]; echo "<br>Four stars: " . $ratings[1]; echo "<br>Three stars: " . $ratings[2]; echo "<br>Two stars: " . $ratings[3]; echo "<br>One star: " . $ratings[4]; echo "<hr>Total ratings: " . getTotalRatings($ratings); echo "<br>Average rating: " . getAverageRating($ratings); } function getTotalRatings($ratings) { $temp = 1; for($i=0; $i < count($ratings); ++$i) $temp+=$ratings[$i]; return $temp; } function getAverageRating($ratings) { $totalRatings = getTotalRatings($ratings); return round(5*($ratings[0]/$totalRatings) + 4*($ratings[1]/$totalRatings) + 3*($ratings[2]/$totalRatings) + 2*($ratings[3]/$totalRatings) + 1*($ratings[4]/$totalRatings),2); } function getXML($ratings) { header('Content-type: text/xml'); header('Pragma: public'); header('Cache-control: private'); header('Expires: -1'); echo '<?xml version="1.0" encoding="utf-8"?>'; echo '<Rating>'; echo '<FiveStars>'.$ratings[0].'</FiveStars>'; echo '<FourStars>'.$ratings[1].'</FourStars>'; echo '<ThreeStars>'.$ratings[2].'</ThreeStars>'; echo '<TwoStars>'.$ratings[3].'</TwoStars>'; echo '<OneStar>'.$ratings[4].'</OneStar>'; echo '<TotalRatings>'.getTotalRatings($ratings).'</TotalRatings>'; echo '<AverageRating>'.getAverageRating($ratings).'</AverageRating>'; echo '</Rating>'; } ?> 
+1
source share

All Articles