Is there any appstore with an API? [closed]
-
28-05-2021 - |
문제
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.
제휴하지 않습니다 StackOverflow