We can get text extract of different pages in a single wiki api call by using pipe character ( | ).
By using this api call, we can get datas about Google and Yahoo in text format. Here we get datas of both Google and Yahoo in a single api call.
I want to get image urls of both Google and Yahoo in a single wiki api call. Is there any method to get all image urls of different pages in a single wiki api call?
Yes, just switch
prop=extracts
toprop=images
. Works exactly the same way:The full documentation is here: http://www.mediawiki.org/wiki/API:Properties
To get the url of an image, use
prop=imageinfo&iiprop=url
for the corresponding file page.Finally, you can combine it all in one single request, by using the
prop=images
result as a generator for theprop=imageinfo
call: