Domanda

I want to read app names and reviews from an appstore. Can be any appstore: Apple appstore, Google market/play, Amazon... Anyone aware of any appstore that exposes a public API for this?

È stato utile?

Soluzione

Yes, it's possible to fetch Data from the Apple AppStore. The page returns all information about the app in JSON, so you simply have to decode the output:

$context = stream_context_create(array('http' => array('header'=>'Connection: close')));
$inh = file_get_contents("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsLookup?id=$appid&country=us");
$inh = json_decode($inh);
$rs = $inh->results["0"];
$ituneslink = $rs->trackViewUrl;
$price = $rs->price;
$appname = $rs->trackName;
$screens = $rs->screenshotUrls;
...

Be sure to insert the App-ID.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top