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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top