-1

Below is the wiki api which gives relevant images from wiki, https://commons.wikimedia.org/w/api.php?action=query&generator=search&gsrnamespace=6&gsrsearch=darwin,%20australia&gsroffset=0&gsrlimit=10&prop=imageinfo&iiprop=user|dimensions|url|mime|thumbmime&iiurlwidth=400px&format=jsonfm

But i notice google is giving best and relevant wiki images than wikipedia own API.

Is there any way in wiki API where i can get wiki images similar to google images?

Thanks in advance!

Tgr
  • 27,442
  • 12
  • 81
  • 118
Vallabh Bothre
  • 621
  • 5
  • 8

1 Answers1

1

The Wikipedia API searches in the text of the page (and some other text fields, like EXIF metadata in images). Google probably uses image recognition to match your search terms with the content of the images. That's going to work better in most cases.

If you are looking for locations specifically, there are better options (there is a geosearch API, among other things); also often you can use (or search in) the category system to find relevant images. Many images are not geotagged or categorized properly, though.

Tgr
  • 27,442
  • 12
  • 81
  • 118