Get iOS iTunes App Store ID of an app itself?
Solution 1
Here is the answer.
- The app requests http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds
- Find the
"version": "2.1.0"
and"trackId": 343200656
in the JSON response.
Warning: This API is undocumented, Apple could change it without notice.
References:
[1] https://github.com/nicklockwood/iVersion/blob/master/iVersion/iVersion.m#L705
[2] https://stackoverflow.com/a/8841636/41948
[3] http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsLookup?id=343200656&mt=8
[4] http://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/wsSearch?term=+Angry+Birds&country=US&media=software&entity=softwareDeveloper&limit=6&genreId=&version=2&output=json&callback=jsonp1343116626493
Solution 2
You way use iTunes Search API to look up your and other apps on the App Store.
Example: http://itunes.apple.com/search?media=software&country=us&term=raining%20weather
iTunes may return more then one result, but you can filter results by bundleId
.
trackViewUrl
will contain iTunes URL to your app. trackId
will contain app's ID.
Related videos on Youtube
est
I speak Python and develop Django projects. I also hack a wide range of platforms.
Updated on August 08, 2020Comments
-
est over 3 years
Could an iOS app get the iTunes link of itself? Is there an API for this?
-
Aleksejs Mjaliks about 12 yearsWhat is your goal? What do you want to achieve by getting this link?
-
est about 12 years@AleksejsMjaliks By checking for self-updates of course!
-
-
Stephen Darlington about 12 yearsNot completely true. Once you have an appId (i.e., after your app has been created in iTC) you can create one of the long, unreadable URLs. The shorter, human readable itunes.com ones probably won't work until the app is on the App Store.
-
est about 12 yearssearch is not exactly a reliable way to get accurate IDs, right?
-
Aleksejs Mjaliks about 12 yearsRight! Under some circumstances results may not contain your app's ID. E.g., your app hasn't been indexed yet.
-
est almost 12 yearsCheck out what I found! stackoverflow.com/a/11626157/41948
-
Koraktor over 9 yearsThis API is (no longer) undocumented. – apple.com/itunes/affiliates/resources/documentation/…
-
est over 9 years@Koraktor Yes, lookup by
id
is documented, however, lookup bybundleId
is not. -
canibeanartist over 4 yearsOld and closed question but I wanted to contribute a way to get the ID from iOS itself. From either the homescreen or the app store, you can ‘share’ apps which will present the share sheet which has an option to copy the url.