How to search images in Wikimedia Commons by API?

Just add redirects=1 to your request.

https://commons.wikimedia.org/w/api.php?action=query&prop=images&imlimit=500&redirects=1&titles=Cat

Update: To get the image info for each one returned image use query with generator=images and prop=imageinfo:

https://commons.wikimedia.org/w/api.php?action=query&generator=images&prop=imageinfo&gimlimit=500&redirects=1&titles=Cat&iiprop=timestamp|user|userid|comment|canonicaltitle|url|size|dimensions|sha1|mime|thumbmime|mediatype|bitdepth

where iiprop includes some of imageinfo properties (check API documentation for all them)