Wikimedia Commons APIunofficial
Public Wikimedia Commons image search, file pages and category galleries.
- wikimedia.org
all live 3 operations, checked by the installs that call them.
Seeded by the maintainers.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen ask your agent, which finds this site by itself, or call it from a shell:
api-anything pull commons
api-anything call commons getFile title=File:Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpgOperations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
getFile(title) -> description, date, source, author, licenses, licenseLinks, original, fileInfo, categoriesRead displayed file-page information, visible license templates, original file link and visible categories. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
listCategory(category) -> title, url, thumbnailFiles in the first category gallery page, with filenames, file page links and thumbnails. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
searchMedia(q) -> title, url, thumbnailFirst page of MediaSearch image results, with filenames, file page links and thumbnails. |
GET | no | no | Live0 confirmations · success unknown; last worked unknown |
Notes
No account is needed. Each file has its own license: check the file page and attribute as required before reuse. Do not infer that attribution is unnecessary from missing fields.
searchMediasearches images and returns the first page only. Titles omitFile:; add that prefix when passing a title togetFile. The URL is the file description page, not the original.getFilereads the displayed page. Fields may be absent or incomplete: license templates vary, and an emptylicensesarray does not mean the file has no license. License links can include explanatory links as well as license URLs. Attribution requirements are not returned as a flag.fileInfois displayed text, including dimensions, size and MIME type where present. Categories are visible categories only. The author and description can contain several languages or extra biographical text.listCategorytakes a category name withoutCategory:and returns the first gallery page, not subcategories. A category with no direct files can report input instead of an empty list. Large galleries can be truncated.
About these operations
Each operation is a request learned from Wikimedia Commons's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.