# Wikimedia Commons API

Category: [Image and photo](https://free-web-services.com/web-services/media/images/)  
Page: https://free-web-services.com/web-services/media/images/wikimedia-commons-api.html  
Documentation: https://commons.wikimedia.org/wiki/Commons:API

Wikimedia Commons holds more than 100 million freely licensed images, sounds and videos, used by Wikipedia and many other sites. The MediaWiki API lets you search files, get their URLs in any size, and read their licence, author and description, which you need to credit them correctly. Responses are JSON. Free, no key needed; check the licence of each file before you use it.

- API key: Not needed
- Pricing: Free, no key needed; check the licence of each file before you use it.
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST, HTTP-GET
- Provider: commons.wikimedia.org
- Last checked: Working on November 2nd, 2026

Example request:

```sh
curl 'https://commons.wikimedia.org/w/api.php?action=query&list=search&srsearch=London&srnamespace=6&srlimit=1&format=json&origin=*'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

