On 2016-04-26 11:06, Oleksiy Muzalyev wrote:
I wish in future there would be in addition to "prop=images" an option in the API "prop=illustrations" to retrieve images in a Wikipedia article which are actually illustrations such as:
[[File:Grandson-Castle.JPG|thumb|Grandson Castle, aerial photo]]
There kind of is, "prop=pageimages" (provided by an extension: https://www.mediawiki.org/wiki/Extension:PageImages). It seems that it only returns one image, though (the one it decides is the most prominent on the page).
https://en.wikipedia.org/w/api.php?action=query&format=jsonfm&prop=i...
https://en.wikipedia.org/w/api.php?action=query&format=jsonfm&prop=p...