# Wikimedia Commons Media Search API

> Search 100M+ freely licensed images and media on Wikimedia Commons and get file URLs and licenses

- Vendor: `wikimediacommonsmediasearchapi` · version 1.0 · category Video & Images · tags free images api, wikimedia commons api, public domain images api, creative commons images api, media search api, stock photos api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/wikimediacommonsmediasearchapi
- This document: https://apiclay.com/docs/wikimediacommonsmediasearchapi.md
- OpenAPI 3.1: https://apiclay.com/api/wikimediacommonsmediasearchapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `wikimediacommonsmediasearchapi`
- Updated: 2026-11-18

## About

## Wikimedia Commons Media Search API

Search Wikimedia Commons, the free media repository behind Wikipedia, for images, audio and video, and get a file's original and thumbnail URLs, size, MIME type and license, author and description metadata.

Data comes from **commons.wikimedia.org** (https://commons.wikimedia.org). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/search?srsearch=eiffel tower&amp;srlimit=10`, then `/file?titles=File:Tour Eiffel Wikimedia Commons.jpg`.

### Routes

#### GET `/search` - Search files
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| srsearch | query | string | yes | Search words. |
| srlimit | query | number | no | Up to 500. |
| sroffset | query | number | no | Offset. |

Returns: `query.searchinfo.totalhits`, `query.search[]` with `title` (`File:...`), `snippet`, `timestamp`.

#### GET `/file` - File details
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| titles | query | string | yes | `File:...` title(s), `|`-separated. |

Returns: `query.pages..imageinfo[]` with `url`, `descriptionurl`, `width`, `height`, `mime`, `extmetadata` (`LicenseShortName`, `Artist`, `ImageDescription`).

### Caveats

- Each file keeps its own free license; credit the author as its license requires.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by commons.wikimedia.org.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /search — Search files
- Gateway: `GET https://api.apiclay.com/v1/api/wikimediacommonsmediasearchapi/search`
- Public query params: `srsearch` (string, required), `srlimit` (number), `sroffset` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /file — File details
- Gateway: `GET https://api.apiclay.com/v1/api/wikimediacommonsmediasearchapi/file`
- Public query params: `titles` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/wikimediacommonsmediasearchapi/search?srsearch=<srsearch>" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
