Wikimedia Commons Image Downloader: Files with License & Credit avatar

Wikimedia Commons Image Downloader: Files with License & Credit

Pricing

from $1.36 / 1,000 files

Go to Apify Store
Wikimedia Commons Image Downloader: Files with License & Credit

Wikimedia Commons Image Downloader: Files with License & Credit

Download images from Wikimedia Commons by search, category or file title. Get the files plus license, author, attribution text and description page URL for every image. Filter by license and minimum size, dedupe, convert or resize, and get public links plus one ZIP.

Pricing

from $1.36 / 1,000 files

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

20 hours ago

Last modified

Features

Limited permissions

Share

Use this tool to download images from Wikimedia Commons by search query, category or exact file title, and keep the license, author and attribution text next to every file. It is a Wikimedia Commons image downloader and a free image downloader with license data: you filter by license group (public domain, CC BY, CC BY-SA) and by minimum size, the files are saved with a public link, and every dataset row carries the credit line you need when you reuse the picture. It uses the official Wikimedia Commons API: no browser, no login, no API key.

What it does NOT do. It only reads Wikimedia Commons (not Wikipedia articles, Flickr or other sites) and only downloads images (JPG, PNG, GIF, SVG, TIFF, WebP). It does not download video, audio or PDF files. The license and author fields are what the uploader entered on Commons: this is not legal advice, and some files carry extra restrictions (trademarks, personality rights, freedom-of-panorama limits) that a license label does not show. Check the file's pageUrl before commercial use. It does not scrape the Wikimedia sites (no HTML pages) and does not work around any block.

What you get

  • The files: saved in the run's key-value store, one public link per file (fileUrl), optionally converted and resized, optionally one ZIP.
  • The credit data: author, license, licenseUrl, licenseGroup, attributionText, description, dateCreated, categories and the Commons page of each file (pageUrl).
  • A clear account of what happened: one row per file with status (downloaded, duplicate, skipped, failed) and a reason, plus a SUMMARY record that counts what was left out before download (wrong license, too small, too large, not an image) so a small result is never a silent zero.

How to download images from Wikimedia Commons

  1. Put a topic in Search queries (searchQueries), for example lighthouse sunset, and/or category names in categories, and/or specific files in fileTitles.
  2. Set Max files (maxFiles) and, if you need it, the license filter and a minimum width.
  3. Run it. The dataset lists every file with its link and credit data. Turn on zip to also get images.zip with manifest.csv and ATTRIBUTION.txt.

How to download only public domain or CC0 images from Commons

Set "licenses": ["public-domain"]. The group covers CC0 and public domain marks. Files whose license Commons does not list are left out when any license filter is set (counted in SUMMARY).

How to download a whole Wikimedia Commons category

Give the category name in categories (with or without Category:) and raise categoryDepth to 1, 2 or 3 to include sub-categories (up to 100 categories per run). Many Commons categories hold only sub-categories, so depth 0 can return nothing; the row for that category tells you so.

How to get the attribution text for a Commons image

Every row has attributionText, for example: "Cape May Lighthouse September 2020 002" by King of Hearts, CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons (https://commons.wikimedia.org/wiki/File:...). It is built from the Commons data; check the license text for how the credit must be shown in your case. When you use zip, the same lines are in ATTRIBUTION.txt in the ZIP.

Input example

{
"searchQueries": ["lighthouse sunset"],
"licenses": ["public-domain", "cc-by", "cc-by-sa"],
"minWidth": 800,
"maxFiles": 5,
"convertTo": "webp",
"maxWidth": 1200,
"zip": true
}

Input

FieldDefaultWhat it does
searchQueriesnoneWords searched in Commons file names, descriptions and categories.
categoriesnoneCommons categories, with or without Category:.
fileTitlesnoneExact File:Name.jpg titles or commons.wikimedia.org page links. Handled first.
maxFiles20Most files processed in the run (max 5,000). Only downloaded files are charged.
categoryDepth0Sub-category levels to read (0 to 3).
maxFileSizeMb25Larger files are left out (size as listed by Commons).
licensesallpublic-domain, cc-by, cc-by-sa, other.
minWidth, minHeight0Skip smaller images. Used in the Commons search and again on the file.
fileTypesall sixjpg, png, gif, svg, tiff, webp.
convertTooriginaljpg, png or webp (Pillow). SVG stays SVG. Animations keep the first frame.
maxWidth0Shrink wider images (never upscales). 0 = original.
quality85JPG and WebP quality.
dedupetrueIdentical files (SHA-256) are delivered once; copies are free.
zip, zipMaxMbfalse, 100Also make images.zip with a manifest and attribution list.
outputStoreNamenoneSave files in a named key-value store that you keep.
concurrency3Parallel downloads (max 8). Low on purpose.
perHostDelayMs300Minimum gap between requests to one Wikimedia host.
timeoutSecs60Time allowed per download attempt (3 attempts).
proxyConfigurationoffOptional proxy. Usually not needed.

Output example

One row per file (shortened; taken from a real run):

{
"title": "File:Phareétoilé (14542438125).jpg",
"pageUrl": "https://commons.wikimedia.org/wiki/File:Phare%C3%A9toil%C3%A9_(14542438125).jpg",
"status": "downloaded",
"reason": "converted jpg to webp; resized to 1600px wide",
"fileUrl": "https://api.apify.com/v2/key-value-stores/Gyv5JP0PMRBx9JPgH/records/88c463eb6b11e17d2583f45a90aaf7246d9b8f91debb453270986a9698d0c122.webp",
"contentType": "image/webp",
"sizeBytes": 118894,
"width": 1600,
"height": 930,
"author": "maxime raynal from France",
"license": "CC BY 2.0",
"licenseCode": "cc-by-2.0",
"licenseUrl": "https://creativecommons.org/licenses/by/2.0",
"licenseGroup": "cc-by",
"attributionRequired": true,
"attributionText": "\"Phareétoilé (14542438125)\" by maxime raynal from France, CC BY 2.0 (https://creativecommons.org/licenses/by/2.0), via Wikimedia Commons (https://commons.wikimedia.org/wiki/File:Phare%C3%A9toil%C3%A9_(14542438125).jpg)",
"dateCreated": "2014-06-30 02:34",
"categories": ["Lighthouses in France", "Flickr images reviewed by FlickreviewR"],
"source": "Category:Lighthouses in France",
"index": 1
}

The license, author and description fields describe the original Commons file, also when you convert or resize it.

How much does it cost

Pay per event, nothing for failed, skipped or duplicate files and nothing to start a run:

  • file: $0.0017 per file delivered (status downloaded).
  • megabyte: $0.0002 for every started megabyte of a delivered file beyond its first MB (1 MB = 1,000,000 bytes of the stored file, after any resize or conversion).

Examples:

  • 1,000 files of 1 MB or less: 1,000 x $0.0017 = $1.70.
  • 10,000 original photos averaging 3 MB: $17.00 for files + 10,000 x 2 x $0.0002 = $4.00, about $21.
  • 100,000 files resized to WebP under 1 MB (convertTo + maxWidth): 100,000 x $0.0017 = $170.

Set the run's maximum charge in Apify to cap the spend: the Actor stops cleanly at the limit and says so in the status message.

Use cases

  • Collect free-to-use pictures for an article, blog or presentation, with the credit line ready.
  • Build an image dataset (for example for ML) from public domain Commons categories.
  • Mirror the images of a Commons category with their license metadata for an archive or catalogue.
  • Check the license of a list of Commons files and download only the ones you may reuse.
  • Fill a CMS or product database with illustrated entries that each carry an attribution text.

FAQ

Is every image free to use? No. Commons holds free-licensed and public domain files, but each license has conditions (CC BY needs credit, CC BY-SA needs credit and sharing alike). The data here is as entered on Commons and can be wrong or incomplete. Use the license filter and read the file page.

Why did I get fewer files than maxFiles? The query or category had fewer matches, or the filters (license, size, type) removed them. SUMMARY lists how many files were left out and why. A single source reads at most 40 API pages.

Does it search by meaning or only by words? By the Commons search engine (words in titles, descriptions and categories). Relevance is Commons' own order.

Which sites does it contact? Only commons.wikimedia.org (API) and upload.wikimedia.org (files), with a descriptive User-Agent, low concurrency and a delay per host, as the Wikimedia policy asks. Files from any other host are never downloaded.

Can it download video, audio or PDFs? No, only the six image types.

Does it need an API key or login? No.

Use with the Apify API, MCP, n8n and Make

Python:

from apify_client import ApifyClient
run = ApifyClient("<APIFY_TOKEN>").actor("<username>/wikimedia-commons-image-downloader").call(
run_input={"searchQueries": ["red fox"], "licenses": ["public-domain"], "maxFiles": 10})
for row in ApifyClient("<APIFY_TOKEN>").dataset(run["defaultDatasetId"]).iterate_items():
print(row["fileUrl"], row["attributionText"])

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<username>/wikimedia-commons-image-downloader').call({ searchQueries: ['red fox'], maxFiles: 10 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();

The same input works from the Apify MCP server, the n8n and Make Apify modules and the REST API.

  • Download Images from URLs: Bulk Image & File Downloader for direct image links and web pages.
  • Batch Image Converter & Resizer: WebP, AVIF, PNG & JPEG to convert the delivered files further.
  • Image Info Checker: Dimensions, Format & Size from URLs to check image URLs without downloading them.

Credits

Data and files come from Wikimedia Commons (commons.wikimedia.org) under the license shown on each file page. Wikimedia and Wikimedia Commons are trademarks of the Wikimedia Foundation; this Actor is not affiliated with or endorsed by it.