4

I'm using iTunes API to get some informations about apps in App Store.

Reading the documentation I saw that "artworkUrl100" parameter, taken from JSON request, will get me a 100x100 icon of the app.

I notice that this not works always, and sometimes it contains the url of a biggest icon.

Is there a way to get with certainty this icon (100x100 px)?

Kara
  • 6,115
  • 16
  • 50
  • 57
Francesco
  • 149
  • 1
  • 12

1 Answers1

8

You can do that like this. Let say this is your link: http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png

(from "artworkUrl512").

You just have to add .100x100-75 before .png like this http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.100x100-75.png

Also ju can adjust icon size you need by adding different values like .150x150-75. Only problem is that this -75 part depends on icon size. it can also be -50 for smaller or -65 for middle size icons. I still did not figure that out.

Hope this helps you.

EDIT: You do not have to worry about .jpg or .jpeg. You can replace all with .png it will work.

Ante Braovic
  • 457
  • 4
  • 13
  • Have you or has anybody found out how exactly to determine that part? – Tobias Timpe Mar 28 '13 at 14:25
  • I think it is DPI, but I am not sure – Ante Braovic Apr 07 '13 at 14:53
  • 1
    This option is no longer 100% garantueed to work, ie: http://a420.phobos.apple.com/us/r30/Purple5/v4/44/46/2f/44462f9a-0b1e-4713-799c-b6aba6cbfbcb/mzl.btczfoqy.jpg – Marcel Mar 05 '15 at 22:05
  • 1
    Hi, it seems that this way is no longer valid for all the apps... Is there a way to solve this? – Francesco Apr 03 '15 at 12:36
  • I have also encountered a few recent or semi-recent apps that this no longer works for (I use it for my portfolio, have a look at http://jonnystuffs.appspot.com/portfolio - some icons fail to load for this error). Some of them seem to have "normal" artwork512url:s, and one of them looks like pr_source.png?downloadKey=xxxxxxxx (long string). If doing the .100x100-75 or something else as described above, a **404 error** is returned. – Jonny Apr 16 '15 at 05:22
  • Posted a new question: http://stackoverflow.com/questions/29666002/itunes-api-artwork512url-method-of-getting-different-icon-sizes-no-longer-work – Jonny Apr 16 '15 at 05:27