Commons API
An XML (or JSON) summary of Wikimedia Commons files for re-users: URLs, size, descriptions, author, source, location, categories, and licences with their terms.
Usage
/commonsapi/?image=IMAGENAME, without the File: prefix. Several images are separated by |.
| Parameter | Effect |
|---|---|
thumbwidth=XX | Adds the URL of a thumbnail at most XX pixels wide |
thumbheight=YY | … and at most YY pixels high (requires thumbwidth) |
languages=en|de|default | Only descriptions in these languages |
versions | Adds all former versions of the file |
meta | Adds the metadata stored in the file, such as EXIF |
sdc | Adds structured data: captions and “depicts” statements |
format=json | JSON instead of XML |
callback=NAME | With format=json: JSONP |
Examples
- Sa-warthog.jpg, with thumbnail, versions and metadata
- Yarra_Panorama.jpg, with a location
- Sa-warthog.jpg as JSON, with structured data
- Several images, one of them missing
Licence terms come from Commons:Commons API.