title: How to search images in Wikimedia Commons by API?
body: <p>I'm trying to query all images of cats (as an example) from Wikimedia Commons.</p>
  
  <p>The way I thought about going about this is first search for the Cat page which is here (I don't know how to find this out programmatically, maybe redirects?):</p>
  
  <p><a href="https://commons.wikimedia.org/wiki/Felis_silvestris_catus" rel="noreferrer">https://commons.wikimedia.org/wiki/Felis_silvestris_catus</a></p>
  
  <p>Hence to get the images I would just need to do this:</p>
  
  <p><a href="https://commons.wikimedia.org/w/api.php?action=query&amp;prop=images&amp;imlimit=500&amp;titles=Felis_silvestris_catus" rel="noreferrer">https://commons.wikimedia.org/w/api.php?action=query&amp;prop=images&amp;imlimit=500&amp;titles=Felis_silvestris_catus</a></p>
  
  <p>This would return what I want. However the same search for Cat returns nothing even though Cat redirects to Felis_silvestris_catus.</p>
  
  <p>Does anyone know if there is any simple way to do an image search on Wikimedia Commons just starting with "Cat" that would return Cat images and if there isn't what's the best that can be done?</p>
  
  <p>I've been looking at the API for hours but I can't seem to figure it out.</p>