Retrieving artist's image using API

api
relationships
artist
Tags: #<Tag:0x00007fcb4d65f750> #<Tag:0x00007fcb4d65f598> #<Tag:0x00007fcb4d65f390>

#1

Is there an API method to retrieve an artist’s image? Some artists have a picture attribute in their URL relationships and I can get the image by including ‘url-rels’ in my request. But for most artists, there is no picture attribute in the URL relationships, and there seems to be no way to get the artist image. For example, see: 1, 2, 3, 4. How do I retrieve an artist’s image using the API?


#2

Images are from Wikimedia commons.

Do a web service lookup of the artist including url relationships. This will most likely contain a wikidata url.
Look up the wikidata item (it supports json and rdf output).
This will most likely have a commons category relationship that you should use to look up images on that site.
Wikimedia commons has an api where you can get more info about the image and the url where you can download it.