Wikimedia Commons

App · Images & Design · 20 actions

Search Wikimedia Commons for freely licensed photos, video, audio and documents, and read what each one needs to be reused: its URL, a preview at any size, its licence, author and credit line. Browse by category, find files taken near a place, read a file's structured data and where it is used across Wikipedia, and watch what is being uploaded and changed.

Actions

ActionWhat it does
Browse the category indexWalk the category index alphabetically, with each category's counts beside it.
Browse the file indexWalk the file index by name, or by when files were uploaded.
Get a file's description pageRead the raw wikitext of a file's description page.
Get a file's structured dataRead a file's captions and its Wikidata statements, such as depicts (P180).
Get a file's versionsList the versions of the file itself, newest first.
Get category detailsCount what one category holds, without listing any of it.
Get contributor detailsLook up a Commons contributor: how long they have been here, how active they are and what rights they hold.
Get file detailsEverything about one file, including how it must be credited.
Get random filesPull random files from the whole repository, for a daily picture post, a screensaver feed, or sampling what Commons holds.
Get the categories a file is inList the categories one file is filed under, which is how Commons says what a file is about.
Get thumbnail URLAsk Commons to render one file at a given width and return the URL, for embedding it in an email, a document or a message without moving the original.
Get where a file is usedList the pages across every Wikimedia project that use this file.
List recent changesRead the recent-changes feed, filtered to what a workflow watches for.
List recent uploadsRead the upload log: what was uploaded to Commons, by whom and when.
List subcategoriesList the subcategories of one category.
List the files in a categoryList the files filed directly under one category, each with its URL and a preview.
Search categoriesSearch Commons for categories by subject.
Search filesSearch Wikimedia Commons for freely licensed photos, video, audio, documents and 3D models.
Search files near a locationFind geotagged files taken within a radius of a point, nearest first.
Suggest titlesComplete a partial title the way the search box on Commons does.

Browse the category index

Walk the category index alphabetically, with each category's counts beside it. Where 'Search categories' matches words, this reads the index itself: give it a prefix to see every category beginning with it.

Inputs

Name starts withstarts_withtext
Only categories whose name begins with this text, without the 'Category:' in front.
Start fromstart_fromtext
Begin the listing at this name instead of the start of the alphabet. Pass the last name from a previous run to read the next page.
At least this many membersminimum_membersnumber
Skip categories holding fewer members than this. Set it to 1 to leave out the empty ones.At least 0.
Number of resultslimitnumber
How many rows to return, up to 500.From 1 to 500. Default: 20.

Outputs

categorieslist
countnumber
starts_withtext
Example output
{
  "categories": [
    {
      "file_count": 0,
      "hidden": false,
      "member_count": 32,
      "name": "Eiffel Tower",
      "page_count": 1,
      "subcategory_count": 31,
      "title": "Category:Eiffel Tower",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower"
    },
    {
      "file_count": 41,
      "hidden": false,
      "member_count": 43,
      "name": "Eiffel Tower, Las Vegas",
      "page_count": 0,
      "subcategory_count": 2,
      "title": "Category:Eiffel Tower, Las Vegas",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower,_Las_Vegas"
    }
  ],
  "count": 2,
  "starts_with": "Eiffel Tower"
}

Browse the file index

Walk the file index by name, or by when files were uploaded. Which filters apply depends on the order, because that is how Commons indexes the table: a name prefix needs the name order, and an uploader or a date window needs one of the date orders.

Inputs

Ordersorttext
Read the index by name, or by upload time. The uploader and date filters need one of the time orders.One of: name (By name), newest_first (Newest uploads first), oldest_first (Oldest uploads first). Default: name.
Name starts withstarts_withtext
Only names beginning with this text. Matching is on the file name itself, without the 'File:' in front.
Uploaded byuploaded_bytext
Only files uploaded by this account. Leave empty for everyone's.
Uploaded on or afteruploaded_afterdate and time
Only files uploaded at or after this moment. Leave empty for no earliest date.
Uploaded on or beforeuploaded_beforedate and time
Only files uploaded at or before this moment. Pair it with 'Uploaded on or after' to read a single day or week.
Number of resultslimitnumber
How many rows to return, up to 500.From 1 to 500. Default: 20.

Outputs

countnumber
fileslist
sorttext
starts_withtext
uploaded_bytext
Example output
{
  "count": 1,
  "files": [
    {
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/3/3c/Eiffel_Tower_at_night%2C_16_October_2014.jpg",
      "height": 3456,
      "media_type": "BITMAP",
      "mime": "image/jpeg",
      "name": "Eiffel Tower at night, 16 October 2014.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Eiffel_Tower_at_night,_16_October_2014.jpg",
      "pageid": 38036802,
      "size": 2673059,
      "title": "File:Eiffel Tower at night, 16 October 2014.jpg",
      "uploaded_at": "2015-01-25T23:47:51Z",
      "uploader": "MarielaPerez5",
      "width": 4608
    }
  ],
  "sort": "name",
  "starts_with": "Eiffel Tower at night",
  "uploaded_by": ""
}

Get a file's description page

Read the raw wikitext of a file's description page. Everything Commons knows about a file that is not in its structured data is written here in templates, so read it when a workflow needs something the shaped fields do not carry.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.

Outputs

edit_commenttext
edited_attext
edited_bytext
page_urltext
pageidnumber
revision_idnumber
titletext
wikitexttext
The page source, templates and all.
Example output
{
  "edit_comment": "Adding a category based on EXIF data.",
  "edited_at": "2025-07-15T01:32:49Z",
  "edited_by": "Rkieferbot",
  "page_url": "https://commons.wikimedia.org/wiki/File:MSM_sunset.jpg",
  "pageid": 1697369,
  "revision_id": 1057518898,
  "title": "File:MSM sunset.jpg",
  "wikitext": "== {{int:filedesc}} ==\n{{Information\n|Description=Mont Saint-Michel in Normandy (Manche), France at night.\n|Source={{own}}\n|Date=2006-12-20\n|Author=[[user:Benh]]\n}}\n\n== {{int:license-header}} ==\n{{self|GFDL|Cc-by-sa-3.0-migrated}}\n\n[[Category:Mont Saint-Michel at night]]"
}

Get a file's structured data

Read a file's captions and its Wikidata statements, such as depicts (P180). Commons has been re-describing its files as data rather than prose, and this is the machine-readable half: it says what a photo shows as an item id rather than as a sentence in one language.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.

Outputs

caption_countnumber
captionslist
depictslist
Wikidata items the file is stated to show.
entity_idtext
The file's media-info entity, e.g. 'M6926930'.
page_urltext
pageidnumber
statement_countnumber
statementslist
titletext
Example output
{
  "caption_count": 2,
  "captions": [
    {
      "language": "en",
      "text": "the \"tour Eiffel\", Paris, France"
    },
    {
      "language": "ru",
      "text": "\u042d\u0439\u0444\u0435\u043b\u0435\u0432\u0430 \u0431\u0430\u0448\u043d\u044f"
    }
  ],
  "depicts": [
    {
      "item_id": "Q243",
      "url": "https://www.wikidata.org/wiki/Q243"
    }
  ],
  "entity_id": "M6926930",
  "page_url": "https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons.jpg",
  "pageid": 6926930,
  "statement_count": 2,
  "statements": [
    {
      "count": 1,
      "property": "depicts",
      "property_id": "P180",
      "values": [
        {
          "item_id": "Q243",
          "language": "",
          "latitude": null,
          "longitude": null,
          "type": "item",
          "url": "https://www.wikidata.org/wiki/Q243",
          "value": "Q243"
        }
      ]
    },
    {
      "count": 1,
      "property": "coordinates of the point of view",
      "property_id": "P1259",
      "values": [
        {
          "item_id": "",
          "language": "",
          "latitude": 48.858093,
          "longitude": 2.294694,
          "type": "coordinate",
          "url": "",
          "value": "48.858093, 2.294694"
        }
      ]
    }
  ],
  "title": "File:Tour Eiffel Wikimedia Commons.jpg"
}

Get a file's versions

List the versions of the file itself, newest first. A Commons file can be re-uploaded over with a crop, a higher resolution or a restoration, and each version keeps its own URL, so a workflow can tell whether the file it recorded is still the one being served.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.
Number of versionslimitnumber
How many versions to return, up to 500.From 1 to 500. Default: 10.

Outputs

countnumber
page_urltext
pageidnumber
revisionslist
titletext
Example output
{
  "count": 2,
  "page_url": "https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons.jpg",
  "pageid": 6926930,
  "revisions": [
    {
      "comment": "Filled in a hole.",
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg",
      "height": 5367,
      "is_current": true,
      "mime": "image/jpeg",
      "sha1": "ecddecabc256113d4b17589350de9284b135643c",
      "size": 5279797,
      "uploaded_at": "2009-06-02T21:08:07Z",
      "uploaded_by": "Benh",
      "width": 2900
    },
    {
      "comment": "Eiffel Tower, seen from the champ de Mars, Paris",
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/archive/a/a8/20090602210807%21Tour_Eiffel_Wikimedia_Commons.jpg",
      "height": 5367,
      "is_current": false,
      "mime": "image/jpeg",
      "sha1": "6b1a2c60bd8a0f0a2fbb3e5b2b0e1a4c9d3f7e21",
      "size": 5252798,
      "uploaded_at": "2009-06-02T18:08:12Z",
      "uploaded_by": "Benh",
      "width": 2900
    }
  ],
  "title": "File:Tour Eiffel Wikimedia Commons.jpg"
}

Get category details

Count what one category holds, without listing any of it. The counts are of direct members only, which is how a workflow decides whether a category is worth walking into before asking for its contents.

Inputs

CategorycategorytextRequired
The category on Commons, with or without the 'Category:' in front. Categories are how Commons is organised; find one with 'Search categories' or 'Suggest titles'.

Outputs

file_countnumber
hiddentrue/false
member_countnumber
nametext
page_countnumber
Gallery and other pages filed here.
pageidnumber
subcategory_countnumber
titletext
urltext
Example output
{
  "file_count": 0,
  "hidden": false,
  "member_count": 32,
  "name": "Eiffel Tower",
  "page_count": 1,
  "pageid": 635013,
  "subcategory_count": 31,
  "title": "Category:Eiffel Tower",
  "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower"
}

Get contributor details

Look up a Commons contributor: how long they have been here, how active they are and what rights they hold. Read it to check who is behind an upload before reusing their work, or to credit them by the name their account carries.

Inputs

Account nameusernametextRequired
The contributor's account name on Commons, as it appears on an upload. A link to their user page works too.

Outputs

block_reasontext
edit_countnumber
gendertext
groupslist
Rights granted to this account, beyond an ordinary user's.
is_blockedtrue/false
nametext
registered_attext
uploads_urltext
The list of everything this account has uploaded.
user_page_urltext
useridnumber
Example output
{
  "block_reason": "",
  "edit_count": 8427,
  "gender": "male",
  "groups": [
    "filemover",
    "patroller",
    "rollbacker"
  ],
  "is_blocked": false,
  "name": "Benh",
  "registered_at": "2006-04-20T16:56:09Z",
  "uploads_url": "https://commons.wikimedia.org/wiki/Special:ListFiles/Benh",
  "user_page_url": "https://commons.wikimedia.org/wiki/User:Benh",
  "userid": 37935
}

Get file details

Everything about one file, including how it must be credited. Commons files are free to reuse but nearly all of them ask for attribution, so this returns the licence, the author and the credit line alongside the file's URL, size and dimensions.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.
Description languagelanguagetext
Which language to return the description and credit in. Commons descriptions are written in many languages at once; a file with none in the language chosen falls back to what it has. Defaults to English.Default: en.
Thumbnail widththumbnail_widthnumber
How wide the preview image of each result should be, in pixels. Commons renders it on demand, so nothing is downloaded until the URL is used.From 40 to 4000. Default: 320.

Outputs

artisttext
Who made it, as the credit should name them.
attribution_requiredtrue/false
Whether the licence requires the author to be named.
captiontext
credittext
Where it came from, e.g. 'Own work'.
date_createdtext
descriptiontext
What the file shows, as plain text.
file_urltext
heightnumber
languagetext
latitudenumber
licensetext
Short licence name, e.g. 'CC BY-SA 4.0'.
license_codetext
license_urltext
longitudenumber
media_typetext
mimetext
nametext
page_urltext
pageidnumber
restrictionstext
Non-copyright restrictions, such as a trademark.
sha1text
sizenumber
thumbnail_urltext
titletext
uploaded_attext
uploadertext
usage_termstext
widthnumber
Example output
{
  "artist": "Benh LIEU SONG",
  "attribution_required": false,
  "caption": "Tour Eiffel Wikimedia Commons.jpg",
  "credit": "Own work",
  "date_created": "2009-06-01",
  "description": "Eiffel Tower, seen from the Champ de Mars, Paris, France",
  "file_url": "https://upload.wikimedia.org/wikipedia/commons/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg",
  "height": 5367,
  "language": "en",
  "latitude": 48.858093,
  "license": "Public domain",
  "license_code": "pd",
  "license_url": "",
  "longitude": 2.294694,
  "media_type": "BITMAP",
  "mime": "image/jpeg",
  "name": "Tour Eiffel Wikimedia Commons.jpg",
  "page_url": "https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons.jpg",
  "pageid": 6926930,
  "restrictions": "",
  "sha1": "ecddecabc256113d4b17589350de9284b135643c",
  "size": 5279797,
  "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg/330px-Tour_Eiffel_Wikimedia_Commons.jpg",
  "title": "File:Tour Eiffel Wikimedia Commons.jpg",
  "uploaded_at": "2009-06-02T21:08:07Z",
  "uploader": "Benh",
  "usage_terms": "Public domain",
  "width": 2900
}

Get random files

Pull random files from the whole repository, for a daily picture post, a screensaver feed, or sampling what Commons holds.

Inputs

How manylimitnumber
How many random files to return, up to 50.From 1 to 50. Default: 5.
Thumbnail widththumbnail_widthnumber
How wide the preview image of each result should be, in pixels. Commons renders it on demand, so nothing is downloaded until the URL is used.From 40 to 4000. Default: 320.

Outputs

countnumber
fileslist
Example output
{
  "count": 1,
  "files": [
    {
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/1/18/Pennsylvania_State_Route_61_-_4167588723.jpg",
      "height": 1200,
      "media_type": "BITMAP",
      "mime": "image/jpeg",
      "name": "Pennsylvania State Route 61 - 4167588723.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Pennsylvania_State_Route_61_-_4167588723.jpg",
      "pageid": 141200723,
      "size": 429533,
      "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Pennsylvania_State_Route_61_-_4167588723.jpg/330px-Pennsylvania_State_Route_61_-_4167588723.jpg",
      "title": "File:Pennsylvania State Route 61 - 4167588723.jpg",
      "uploaded_at": "2023-11-21T20:46:32Z",
      "uploader": "Sercactusbot",
      "width": 1600
    }
  ]
}

Get the categories a file is in

List the categories one file is filed under, which is how Commons says what a file is about. Housekeeping categories are hidden on the site and left out here unless asked for.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.
Include housekeeping categoriesinclude_hiddentrue/false
Include the categories Commons uses for its own maintenance, such as licence tracking. Off by default, because they say nothing about the subject.Default: false.
Number of categorieslimitnumber
How many categories to return, up to 500.From 1 to 500. Default: 50.

Outputs

categorieslist
countnumber
include_hiddentrue/false
pageidnumber
titletext
Example output
{
  "categories": [
    {
      "hidden": false,
      "name": "Eiffel Tower in 2009",
      "title": "Category:Eiffel Tower in 2009",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower_in_2009"
    },
    {
      "hidden": false,
      "name": "Blue gradient",
      "title": "Category:Blue gradient",
      "url": "https://commons.wikimedia.org/wiki/Category:Blue_gradient"
    }
  ],
  "count": 2,
  "include_hidden": false,
  "pageid": 6926930,
  "title": "File:Tour Eiffel Wikimedia Commons.jpg"
}

Get thumbnail URL

Ask Commons to render one file at a given width and return the URL, for embedding it in an email, a document or a message without moving the original. Works for video and PDF too, which are rendered as a first frame or a first page. Commons rounds up to its nearest standard size, so the image served can be a little wider than the one asked for.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.
Widthwidthnumber
How wide the rendered image should be, in pixels.From 40 to 4000. Default: 800.

Outputs

file_urltext
heightnumber
Height of the original file.
mimetext
page_urltext
pageidnumber
requested_widthnumber
thumbnail_heightnumber
thumbnail_urltext
thumbnail_widthnumber
titletext
widthnumber
Width of the original file.
Example output
{
  "file_url": "https://upload.wikimedia.org/wikipedia/commons/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg",
  "height": 5367,
  "mime": "image/jpeg",
  "page_url": "https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons.jpg",
  "pageid": 6926930,
  "requested_width": 640,
  "thumbnail_height": 1184,
  "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg/960px-Tour_Eiffel_Wikimedia_Commons.jpg",
  "thumbnail_width": 640,
  "title": "File:Tour Eiffel Wikimedia Commons.jpg",
  "width": 2900
}

Get where a file is used

List the pages across every Wikimedia project that use this file. Commons is the shared repository behind all of them, so one photo can be on a Wikipedia article in forty languages at once. This is the measure of how widely a file is actually used.

Inputs

FilefiletextRequired
The file on Commons. Its name is enough ('Tour Eiffel Wikimedia Commons.jpg'), with or without the 'File:' in front, and a link to the file's page or to the image itself works too.
Number of pageslimitnumber
How many using pages to return, up to 500.From 1 to 500. Default: 50.

Outputs

countnumber
pageidnumber
project_countnumber
How many distinct projects use it.
projectslist
titletext
usageslist
Example output
{
  "count": 2,
  "pageid": 6926930,
  "project_count": 2,
  "projects": [
    "af.wikipedia.org",
    "ar.wikipedia.org"
  ],
  "title": "File:Tour Eiffel Wikimedia Commons.jpg",
  "usages": [
    {
      "page_title": "1889",
      "url": "https://af.wikipedia.org/wiki/1889",
      "wiki": "af.wikipedia.org"
    },
    {
      "page_title": "\u0628\u0631\u062c_\u0625\u064a\u0641\u0644",
      "url": "https://ar.wikipedia.org/wiki/%D8%A8%D8%B1%D8%AC_%D8%A5%D9%8A%D9%81%D9%84",
      "wiki": "ar.wikipedia.org"
    }
  ]
}

List recent changes

Read the recent-changes feed, filtered to what a workflow watches for. Bots do most of the editing on Commons, so they are left out unless asked for, which is what makes this readable as 'what did people change'.

Inputs

Part of the sitenamespacetext
Only changes to pages in this part of Commons. File is the media itself; Category is its subject index.
Kinds of changechange_typeslist
Which kinds of change to include. Leave none chosen for all of them.One or more of: edit (Edits to existing pages), new (New pages), log (Logged actions), categorize (Category changes).
Tagged withtagtext
Only changes carrying this tag. A tag is the mark a tool or a filter leaves on an edit, so this is how 'edits made with HotCat' is asked for.
Changed bychanged_bytext
Only changes made by this account.
Changed on or afterchanged_afterdate and time
Only changes at or after this moment. Commons keeps about 30 days of recent changes.
Changed on or beforechanged_beforedate and time
Only changes at or before this moment.
Include bot editsinclude_botstrue/false
Include changes made by bots. Off by default, because bots make most of the edits on Commons.Default: false.
Ordersorttext
Whether to start from the newest or the oldest.One of: newest_first (Newest first), oldest_first (Oldest first). Default: newest_first.
Number of resultslimitnumber
How many rows to return, up to 500.From 1 to 500. Default: 20.

Outputs

change_typeslist
changeslist
countnumber
include_botstrue/false
namespacenumber
sorttext
tagtext
Example output
{
  "change_types": [
    "edit"
  ],
  "changes": [
    {
      "changed_at": "2026-08-27T20:31:44Z",
      "changed_by": "Eskivor",
      "comment": "Moving to Category:Silver Celtic coins from Gallica",
      "is_bot": false,
      "is_minor": true,
      "is_new": false,
      "name": "Monnaie - Argent, fonds celtique.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Monnaie_-_Argent,_fonds_celtique.jpg",
      "pageid": 137589288,
      "previous_revision_id": 1268426623,
      "revision_id": 1268460772,
      "size_change": 7,
      "tags": [],
      "title": "File:Monnaie - Argent, fonds celtique.jpg",
      "type": "edit"
    }
  ],
  "count": 1,
  "include_bots": false,
  "namespace": 6,
  "sort": "newest_first",
  "tag": ""
}

List recent uploads

Read the upload log: what was uploaded to Commons, by whom and when. The log records the act of uploading, so unlike the file index it can tell a brand new file from a new version of an existing one.

Inputs

Uploaded byuploaded_bytext
Only files uploaded by this account. Leave empty for everyone's.
Uploaded on or afteruploaded_afterdate and time
Only files uploaded at or after this moment. Leave empty for no earliest date.
Uploaded on or beforeuploaded_beforedate and time
Only files uploaded at or before this moment. Pair it with 'Uploaded on or after' to read a single day or week.
Which uploadsupload_kindtext
Whether to include new versions of existing files.One of: any (New files and new versions), new_files (New files only), overwrites (New versions only). Default: any.
Ordersorttext
Whether to start from the newest or the oldest.One of: newest_first (Newest first), oldest_first (Oldest first). Default: newest_first.
Number of resultslimitnumber
How many rows to return, up to 500.From 1 to 500. Default: 20.

Outputs

countnumber
sorttext
upload_kindtext
uploaded_bytext
uploadslist
Example output
{
  "count": 1,
  "sort": "newest_first",
  "upload_kind": "new_files",
  "uploaded_by": "",
  "uploads": [
    {
      "comment": "Uploaded via Curator",
      "kind": "upload",
      "log_id": 406176231,
      "name": "Weimar - Postamt - geo.hlipp.de - 40038.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Weimar_-_Postamt_-_geo.hlipp.de_-_40038.jpg",
      "pageid": 198302429,
      "title": "File:Weimar - Postamt - geo.hlipp.de - 40038.jpg",
      "uploaded_at": "2026-08-27T20:11:11Z",
      "uploaded_by": "PantheraLeo1359531"
    }
  ]
}

List subcategories

List the subcategories of one category. Commons splits a large subject into narrower ones by date, place, medium and condition, so this is how a workflow walks down to the files it actually wants.

Inputs

CategorycategorytextRequired
The category on Commons, with or without the 'Category:' in front. Categories are how Commons is organised; find one with 'Search categories' or 'Suggest titles'.
Ordersorttext
What order to list the members in. 'By name' is the order the category page itself shows.One of: name (By name), newest_first (Most recently added first), oldest_first (First added first). Default: name.
Number of resultslimitnumber
How many rows to return, up to 500.From 1 to 500. Default: 20.

Outputs

categorytext
category_titletext
category_urltext
countnumber
subcategorieslist
Example output
{
  "category": "Eiffel Tower",
  "category_title": "Category:Eiffel Tower",
  "category_url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower",
  "count": 2,
  "subcategories": [
    {
      "added_to_category_at": "2025-06-18T00:34:52Z",
      "name": "Eiffel Tower by decade",
      "pageid": 30353279,
      "title": "Category:Eiffel Tower by decade",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower_by_decade"
    },
    {
      "added_to_category_at": "2025-06-18T00:35:10Z",
      "name": "Eiffel Tower at night",
      "pageid": 3140462,
      "title": "Category:Eiffel Tower at night",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower_at_night"
    }
  ]
}

List the files in a category

List the files filed directly under one category, each with its URL and a preview. Only direct members: Commons categories nest, so a file in 'Eiffel Tower at night' is not in 'Eiffel Tower'. Walk down with 'List subcategories'.

Inputs

CategorycategorytextRequired
The category on Commons, with or without the 'Category:' in front. Categories are how Commons is organised; find one with 'Search categories' or 'Suggest titles'.
Ordersorttext
What order to list the members in. 'By name' is the order the category page itself shows.One of: name (By name), newest_first (Most recently added first), oldest_first (First added first). Default: name.
Number of resultslimitnumber
How many results to return, up to 50.From 1 to 50. Default: 10.
Thumbnail widththumbnail_widthnumber
How wide the preview image of each result should be, in pixels. Commons renders it on demand, so nothing is downloaded until the URL is used.From 40 to 4000. Default: 320.

Outputs

categorytext
category_titletext
category_urltext
countnumber
fileslist
Example output
{
  "category": "Eiffel Tower in 2009",
  "category_title": "Category:Eiffel Tower in 2009",
  "category_url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower_in_2009",
  "count": 1,
  "files": [
    {
      "added_to_category_at": "2025-06-17T19:17:44Z",
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/b/bb/3949ParigiTourEiffel.JPG",
      "height": 600,
      "media_type": "BITMAP",
      "mime": "image/jpeg",
      "name": "3949ParigiTourEiffel.JPG",
      "page_url": "https://commons.wikimedia.org/wiki/File:3949ParigiTourEiffel.JPG",
      "pageid": 18120328,
      "size": 150047,
      "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/3949ParigiTourEiffel.JPG/330px-3949ParigiTourEiffel.JPG",
      "title": "File:3949ParigiTourEiffel.JPG",
      "uploaded_at": "2012-05-06T09:23:11Z",
      "uploader": "Cavagnaro",
      "width": 800
    }
  ]
}

Search categories

Search Commons for categories by subject. Commons files everything into categories rather than folders, so this is usually the first step: find the category, then list what is in it.

Inputs

Search forquerytextRequired
The subject to find categories about.
Number of resultslimitnumber
How many results to return, up to 50.From 1 to 50. Default: 10.

Outputs

categorieslist
countnumber
querytext
total_hitsnumber
Example output
{
  "categories": [
    {
      "name": "Eiffel Tower",
      "pageid": 635013,
      "snippet": "Tour Eiffel; Torre Eiffel; Eiffelturm",
      "title": "Category:Eiffel Tower",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower"
    }
  ],
  "count": 1,
  "query": "Eiffel Tower",
  "total_hits": 655
}

Search files

Search Wikimedia Commons for freely licensed photos, video, audio, documents and 3D models. Each result comes back ready to use: the file's own URL, a preview at the width you ask for, its dimensions and who uploaded it.

Inputs

Search forquerytextRequired
What to search for. Commons searches the file's description, its captions in every language, and its categories.
Kind of filemedia_typetext
Narrow the search to one kind of media. Leave it unset to search all of them.One of: bitmap (Photos and scans), drawing (Drawings and diagrams (SVG)), video, audio, office (Documents (PDF, DjVu)), 3d (3D models).
Ordersorttext
What order to return the matches in.One of: relevance (Best match), newest_first (Newest uploads first), oldest_first (Oldest uploads first), recently_edited (Recently edited first), random. Default: relevance.
Number of resultslimitnumber
How many results to return, up to 50.From 1 to 50. Default: 10.
Thumbnail widththumbnail_widthnumber
How wide the preview image of each result should be, in pixels. Commons renders it on demand, so nothing is downloaded until the URL is used.From 40 to 4000. Default: 320.

Outputs

countnumber
fileslist
media_typetext
querytext
sorttext
total_hitsnumber
How many files match in total, not just on this page.
Example output
{
  "count": 1,
  "files": [
    {
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg",
      "height": 5367,
      "media_type": "BITMAP",
      "mime": "image/jpeg",
      "name": "Tour Eiffel Wikimedia Commons.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons.jpg",
      "pageid": 6926930,
      "size": 5279797,
      "snippet": "the tour Eiffel, Paris, France",
      "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg/330px-Tour_Eiffel_Wikimedia_Commons.jpg",
      "title": "File:Tour Eiffel Wikimedia Commons.jpg",
      "uploaded_at": "2009-06-02T21:08:07Z",
      "uploader": "Benh",
      "width": 2900
    }
  ],
  "media_type": "bitmap",
  "query": "Eiffel Tower",
  "sort": "relevance",
  "total_hits": 16321
}

Search files near a location

Find geotagged files taken within a radius of a point, nearest first. Commons records where a photo was taken, so this answers 'what does this place look like' from coordinates alone.

Inputs

LatitudelatitudenumberRequired
Latitude of the point to search around, in degrees.From -90 to 90.
LongitudelongitudenumberRequired
Longitude of the point to search around, in degrees.From -180 to 180.
Withinradius_metersnumber
How far from the point to search, in metres. Commons will not search wider than 10 kilometres.From 10 to 10000. Default: 1000.
Number of resultslimitnumber
How many results to return, up to 50.From 1 to 50. Default: 10.
Thumbnail widththumbnail_widthnumber
How wide the preview image of each result should be, in pixels. Commons renders it on demand, so nothing is downloaded until the URL is used.From 40 to 4000. Default: 320.

Outputs

countnumber
fileslist
latitudenumber
longitudenumber
radius_metersnumber
Example output
{
  "count": 1,
  "files": [
    {
      "distance_meters": 0,
      "file_url": "https://upload.wikimedia.org/wikipedia/commons/0/07/Eiffel_Tower_by_night%2C_Paris%2C_FRANCE.jpg",
      "height": 2283,
      "latitude": 48.8584,
      "longitude": 2.2945,
      "media_type": "BITMAP",
      "mime": "image/jpeg",
      "name": "Eiffel Tower by night, Paris, FRANCE.jpg",
      "page_url": "https://commons.wikimedia.org/wiki/File:Eiffel_Tower_by_night,_Paris,_FRANCE.jpg",
      "pageid": 56382763,
      "size": 6565407,
      "thumbnail_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Eiffel_Tower_by_night%2C_Paris%2C_FRANCE.jpg/330px-Eiffel_Tower_by_night%2C_Paris%2C_FRANCE.jpg",
      "title": "File:Eiffel Tower by night, Paris, FRANCE.jpg",
      "uploaded_at": "2017-04-30T09:52:32Z",
      "uploader": "Yann",
      "width": 4061
    }
  ],
  "latitude": 48.8584,
  "longitude": 2.2945,
  "radius_meters": 200
}

Suggest titles

Complete a partial title the way the search box on Commons does. Where 'Search files' matches the words on a page, this matches the start of its name, which turns a half-remembered file or category into the exact title the other actions need.

Inputs

Starts withprefixtextRequired
The first part of the title.
Look forscopetext
Which kind of page to suggest titles from.One of: files, categories, galleries. Default: files.
Number of suggestionslimitnumber
How many suggestions to return, up to 100.From 1 to 100. Default: 10.

Outputs

countnumber
prefixtext
scopetext
suggestionslist
Example output
{
  "count": 2,
  "prefix": "Eiffel Tower",
  "scope": "categories",
  "suggestions": [
    {
      "name": "Eiffel Tower",
      "title": "Category:Eiffel Tower",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower"
    },
    {
      "name": "Eiffel Tower at night",
      "title": "Category:Eiffel Tower at night",
      "url": "https://commons.wikimedia.org/wiki/Category:Eiffel_Tower_at_night"
    }
  ]
}

On this page