Search code examples
apiitunesenterprise

Search artist without artist id Itunes Enterprise API


I'm using the itunes enterprise api and I'm trying to use it to extract information on certain artists.

Reading their little guide on how to use it, they give an example url of

https://itunes.apple.com/artist/scritti-politti/id614113

which returns the exact data I need, the thing is I'm not sure where to find the artist id, is there any way I can do a search based on simply the artist name? Or do a search somewhere based on the artist name to find the artist id and then use it in this url.

Thanks


Solution

  • First I used this url

    http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/itmsSearch?lang=1&output=json&country=US&term=rhianna&media=music&limit=1
    

    were rhianna can be replaced with whatever artist you're looking up,

    from that I can extract the artist id from artistLinkUrl and then make the request using that artist id in the enterprise api.