I need to download the icon of an application from the windows phone marketplace. I have the id of the app, and for a WP7 app I was doing so form http://catalog.zune.net/v3.2/en-US/apps/{0}/primaryImage?width=200, where {0} is the app id. This does not seem to work for WP8 apps, and I can't find any way to do it. Is it possible, and if yes - how?
1 Answers
It is slightly more complicated for WP8. Given the app id, you need to first get the icon id and then you can get the icon. For example - Angry Birds has app id e4571a02-0b87-e011-986b-78e7d1fa76f8
, so you get the app details on URL http://marketplaceedgeservice.windowsphone.com/v8/catalog/apps/e4571a02-0b87-e011-986b-78e7d1fa76f8?os=8.0&cc=US&lang=en-US.
You get back an XML response (Atom feed format), look for <image><id>
element, which gives you id of the image - urn:uuid:3b32ef92-dba1-4e4f-867a-ee439349f698
.
With that in hand, you can get the high quality icon (big size PNG) on http://cdn.marketplaceimages.windowsphone.com/v8/images/3b32ef92-dba1-4e4f-867a-ee439349f698. There are some additional arguments to get a smaller image size in JPG high compression. For example http://cdn.marketplaceimages.windowsphone.com/v8/images/3b32ef92-dba1-4e4f-867a-ee439349f698?hw=469838851&imagetype=icon_small.