# Wikimedia Commons Quality Images Scraper (`parseforge/wikimedia-commons-quality-scraper`) Actor

Scrapes the official Quality Images category from Wikimedia Commons via the public API. Returns each file's page ID, namespace, and title as a flat row, ready for dataset building or download pipelines.

- **URL**: https://apify.com/parseforge/wikimedia-commons-quality-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Videos, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.62 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Wikimedia Commons Quality Images Scraper

**Scrape Quality Images from Wikimedia Commons via the official API.** Each result includes the page ID, namespace, and file title, ready for download or dataset building. Export to CSV, JSON, Excel, or XML.

Wikimedia Commons hosts millions of freely licensed media files, but finding the subset officially designated as high-quality takes manual browsing through category pages. This Actor reads the Quality Images category directly from the Wikimedia API, returning a clean list of file titles without needing to parse HTML or handle authentication. You get a structured dataset of quality-assured images in minutes.

| Who uses it | What they scrape Wikimedia Commons for |
|---|---|
| Machine learning engineers | Building a high-quality, pre-vetted training dataset of freely licensed images. |
| Content creators | Finding reliably excellent images for articles, presentations, or video projects. |
| Digital archivists | Cataloging and monitoring newly promoted quality images on Wikimedia Commons. |
| SEO specialists | Sourcing unique, high-quality images with clear licensing for web content. |

### What it does

This Actor collects file entries from the Wikimedia Commons Quality Images category and returns each one as a flat row with its page ID, namespace, and title.

- 📋 **Structured API output:** retrieves pageid, ns, and title for every quality image in a consistent schema.
- 📊 **Scalable collection:** set a maxItems limit from 1 up to 1,000,000 entries per run.
- 🔄 **Paginated fetching:** follows the API continuation token automatically to retrieve the full category listing.
- 📁 **Multi-format export:** download your dataset as CSV, JSON, Excel, or XML for direct use in any pipeline.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Wikimedia Commons data

**🤖 Build a clean computer vision dataset.**

A machine learning team scrapes the full Quality Images category to assemble a pre-vetted training set, filtering by title patterns later in their pipeline.

**📝 Source images for a content calendar.**

A content marketer pulls the latest 500 quality images, selects relevant ones by title, and downloads them for blog posts and social media.

**📚 Monitor newly promoted quality images.**

A digital archivist runs the Actor weekly to track additions to the Quality Images category and update an external catalog.

**🔍 Enrich a search index with high-quality visuals.**

An SEO specialist scrapes quality image titles to match against article topics, ensuring every page gets a standout, freely licensed lead image.

### Why choose this scraper

| | What you get |
|---|---|
| **Official quality designation** | Only images reviewed and promoted by the Wikimedia Commons community are included. |
| **No HTML parsing** | Reads the structured API endpoint directly, so the output is clean and predictable. |
| **Free licensing** | All quality images on Wikimedia Commons are freely licensed, simplifying reuse rights. |
| **Bulk extraction** | Retrieve up to a million entries in one run for large-scale projects. |

### What a Wikimedia Commons record looks like

Every record returns as one flat JSON row. Here is a real one from a run:

```json
{
 "imageUrl": "https://upload.wikimedia.org/wikipedia/commons/!/!-/!-tylewice-wiatrak-windmill-abri-2013.jpg",
 "pageid": 35328841,
 "ns": 6,
 "title": "File:!-tylewice-wiatrak-windmill-abri-2013.jpg",
 "scrapedAt": "2026-08-26T16:21:53.894Z"
}
```

Every value above comes from a real run. A field a record does not have comes back as `null`.

### Configure the run

Drive the Actor by setting the maximum number of quality image entries to retrieve, from a single preview up to a full bulk extraction. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Wikimedia Commons Quality Images Scraper](https://apify.com/parseforge/wikimedia-commons-quality-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Wikimedia Commons through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/wikimedia-commons-quality-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting fewer results than my maxItems setting?**

The Actor can only return as many entries as exist in the Quality Images category. If the category contains fewer items than your maxItems value, you will receive all available entries. Check the category size on Wikimedia Commons.

**The run finished but my dataset is empty.**

Ensure your maxItems is set to at least 1. If the Wikimedia API is temporarily unavailable, the run may return no results. Wait a few minutes and retry.

**Can I get image dimensions or EXIF data in the output?**

The basic category listing API does not include image metadata. To get dimensions, EXIF, or other file properties, you would need to make additional API calls per file title using the imageinfo module.

**Why do some titles look like 'File:Example.jpg'?**

Wikimedia Commons file titles include the 'File:' namespace prefix. This is the standard format and can be used directly to construct download URLs or query further metadata.

### FAQ

| Question | Answer |
|---|---|
| Does this Actor download the actual image files? | No, it returns the metadata for each quality image, including the file title. You can use the title to construct the download URL or pass it to a separate image downloader. |
| What is a Quality Image on Wikimedia Commons? | Quality Images are files that meet the Wikimedia Commons quality standards as assessed by the community. They are well-composed, properly exposed, and have no distracting artifacts. |
| Do I need a Wikimedia API key to use this Actor? | No. The Actor uses the public, read-only Wikimedia API endpoint, which requires no authentication or API key. |
| How many quality images can I scrape in one run? | Free users can retrieve up to 10 items as a preview. Paid users can set maxItems up to 1,000,000, limited only by the total number of quality images available on Commons. |
| What fields does the output dataset contain? | Each row includes the imageUrl, pageid, ns, title, scrapedAt, and error fields. |
| Can I filter by image type or upload date? | This Actor retrieves the full Quality Images category listing. For more granular filtering by file type, date, or other metadata, you would need to process the titles through additional API calls. |
| How do I download the actual images after scraping? | Once you have the file titles, you can construct a direct URL in the format https://commons.wikimedia.org/wiki/Special:FilePath/FILETITLE and download them with any HTTP client or a dedicated image downloader Actor. |
| Are the scraped images free to use commercially? | All Quality Images on Wikimedia Commons are available under free licenses, but you should verify the specific license of each file before commercial use. The Actor provides the title, which you can use to check the file description page. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Wikimedia Foundation, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

### 💰 How much does it cost to scrape Wikimedia Commons Quality Images?

This Actor uses **pay-per-result** pricing: **$0.004 per result** collected. You are billed only for the results you receive, so a run that returns nothing costs nothing.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Complete dataset of all scraped records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/wikimedia-commons-quality-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/wikimedia-commons-quality-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parseforge/wikimedia-commons-quality-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/wikimedia-commons-quality-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AsFOf01afPNBhYdw4/builds/vyXidBNZVr0tVmavv/openapi.json
