I'm trying to build a gallery of sorts so that my user can search for images on various topics that are in the public domain. I'm trying to pull down a list of images from wikimedia but with their descriptions or "alt" descriptions. I can't figure out from the docs how to do that. Here's the api url I've managed to piece together so far from research. For example all images of "Lewis Hayden":
action=query&prop=imageinfo|categories&generator=search&gsrsearch="Lewis Hayden"&origin=*
From this I get the url from which I can then build an tag for the images. But I can't get the description or the title of the picture. Is there a better way to do this?
Try something like
The File: search keyword will make it search images instead of pages; iiprop=extmetadata
will expose image metadata (like description).