This page is to track the information we learn about databases of images and their APIs. Tracking bug is here.
Wikimedia Commons
I used wimgs to download images from specific categories and it worked for that purpose. It's written in Ruby which is not nice. But it uses the Mediawiki API which is just URLs returning JSON.
Metadata
Download entire collection
Formats
Primarily JPG files (with various extensions), also PNG and GIF (including animated GIF), SVG, and even videos.