I would like to start with the package name (or google play store URL) of an existing Android app (e.g., https://play.google.com/store/apps/details?id=com.google.android.gm), and programmatically obtain the list of permissions it asks for.
Before I go using JSoup on the HTML code on the “Permissions” tab on the above URL, I wanted to know if a cleaner way exists. Is there, for example, a JSON API for this?
There is no official API for Google Play that does what you’re looking for.
You might, however, be able to use this unofficial API, although it does seems to have been abandoned:
http://code.google.com/p/android-market-api/
I think your best option is possibly to fetch the source code, parse it and pray that it doesn’t break.