Get iOS iTunes App Store ID of an app itself?

48,056

Solution 1

Here is the answer.

  1. The app requests http://itunes.apple.com/lookup?bundleId=com.clickgamer.AngryBirds
  2. 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.

Docs: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

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.

Share:
48,056

Related videos on Youtube

est
Author by

est

I speak Python and develop Django projects. I also hack a wide range of platforms.

Updated on August 08, 2020

Comments

  • est
    est over 3 years

    Could an iOS app get the iTunes link of itself? Is there an API for this?

    • Aleksejs Mjaliks
      Aleksejs Mjaliks about 12 years
      What is your goal? What do you want to achieve by getting this link?
    • est
      est about 12 years
      @AleksejsMjaliks By checking for self-updates of course!
  • Stephen Darlington
    Stephen Darlington about 12 years
    Not 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
    est about 12 years
    search is not exactly a reliable way to get accurate IDs, right?
  • Aleksejs Mjaliks
    Aleksejs Mjaliks about 12 years
    Right! Under some circumstances results may not contain your app's ID. E.g., your app hasn't been indexed yet.
  • est
    est almost 12 years
    Check out what I found! stackoverflow.com/a/11626157/41948
  • Koraktor
    Koraktor over 9 years
    This API is (no longer) undocumented. – apple.com/itunes/affiliates/resources/documentation/…
  • est
    est over 9 years
    @Koraktor Yes, lookup by id is documented, however, lookup by bundleId is not.
  • canibeanartist
    canibeanartist over 4 years
    Old 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.