# Wikimedia Commons Valued Images Scraper (`parseforge/wikimedia-commons-valued-images-scraper`) Actor

Scrape valued images from any Wikimedia Commons category via the MediaWiki API. Returns page ID, namespace, and title for each image. No login required.

- **URL**: https://apify.com/parseforge/wikimedia-commons-valued-images-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Education, 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 Valued Images Scraper

**Scrape valued images from Wikimedia Commons.** Every image entry comes with its page ID, namespace, and title. No login or API key. Export to CSV, JSON, Excel, or XML.

Wikimedia Commons hosts millions of freely licensed images, but its API requires technical setup and pagination handling. This Actor reads the MediaWiki API directly, pulling every image in a category such as Valued images, and returns each entry in a clean, flat schema. No authentication, no rate-limit headaches.

| Who uses it | What they scrape Wikimedia Commons for |
|---|---|
| Researchers | Build datasets of valued images for analysis or archival. |
| Content curators | Discover high-quality, community-recognized images for reuse. |
| Developers | Populate image galleries or train models with a curated image list. |

### What it does

This Actor collects image entries from any Wikimedia Commons category, defaulting to Category:Valued\_images, and returns each one as a row with page ID, namespace, and title.

- 🖼️ **Category targeting:** Pull from any Wikimedia Commons category, including subcategories like Valued\_images\_by\_subject.
- 🔢 **Max items control:** Set a limit to match your dataset size.

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

### What you can do with Wikimedia Commons data

**📚 Build a valued images dataset.**

Researchers scrape the full Valued images category to analyze trends in image quality or compile a reference set.

**🖼️ Curate a gallery of recognized images.**

Content teams pull valued images by subject to feature high-quality visuals on their platforms.

**🤖 Train image recognition models.**

Developers collect a large list of valued image titles to use as training data or for benchmarking.

### Why choose this scraper

| | What you get |
|---|---|
| **Clean schema** | Each image entry is a flat row with page ID, namespace, and title. |
| **No login** | Uses the public MediaWiki API, no authentication required. |
| **Scalable** | Scrape up to a million entries in a single run for paid users. |
| **Export ready** | Get results as CSV, JSON, Excel, or XML. |

### 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/6/66/Balbuzard_pecheur_Lac_de_Tunis.jpg?utm_source=commons.wikimedia.org&utm_campaign=imageinfo&utm_content=original",
 "pageId": 148285587,
 "namespace": 6,
 "title": "File:Balbuzard pecheur Lac de Tunis.jpg",
 "pageUrl": "https://commons.wikimedia.org/wiki/File%3ABalbuzard%20pecheur%20Lac%20de%20Tunis.jpg",
 "type": "file",
 "imageDescription": "Balbuzard pêcheur (Pandion haliaetus) au lac sud de Tunis",
 "author": "<a href=\"//commons.wikimedia.org/wiki/User:El_Golli_Mohamed\" title=\"User:El Golli Mohamed\">El Golli Mohamed</a>",
 "credit": "<span class=\"int-own-work\" lang=\"en\">Own work</span>",
 "licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0",
 "licenseShortName": "CC BY-SA 4.0",
 "dateOriginal": "2023-10-20 09:40:43",
 "uploader": "El Golli Mohamed",
 "mimeType": "image/jpeg",
 "width": 4384
}
```

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 from a category title and a maximum item count. The category determines which images are scraped, and the limit controls how many entries are returned. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10,
 "categoryTitle": "Category:Valued_images"
}
```

A larger pull:

```json
{
 "maxItems": 200,
 "categoryTitle": "Category:Valued_images"
}
```

### 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 Valued Images Scraper](https://apify.com/parseforge/wikimedia-commons-valued-images-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-valued-images-scraper"
```

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

### Troubleshooting

**Why am I getting no results?**

Verify the category title is spelled exactly as it appears on Wikimedia Commons, including the 'Category:' prefix. Also check that the category is not empty.

**The run stops at 10 items even though I set a higher maxItems.**

Free users are limited to 10 items. Upgrade to a paid plan to scrape up to 1,000,000 items.

**The output contains duplicate titles.**

The API may return duplicate entries if the category has subcategories. Use the page ID to deduplicate, or target a specific category without subcategories.

**The category title I entered is not found.**

Make sure the category exists on Wikimedia Commons. You can browse categories at commons.wikimedia.org to confirm the exact title.

### FAQ

| Question | Answer |
|---|---|
| What are valued images on Wikimedia Commons? | Valued images are images that are considered the most valuable illustration of their subject within Wikimedia Commons, as judged by the community. |
| Do I need an API key? | No, the Actor uses the public MediaWiki API, which does not require authentication. |
| Can I scrape subcategories? | Yes, you can specify any category title, including subcategories like Category:Valued\_images\_by\_subject. |
| How many items can I scrape? | Free users are limited to 10 items for preview. Paid users can scrape up to 1,000,000 items per run. |
| What data is returned for each image? | Each image entry returns the page ID, namespace, title, imageUrl, pageUrl, type, imageDescription, author, credit, licenseUrl, licenseShortName, dateOriginal, uploader, mimeType, width, height, fileSize, and scrapedAt. |
| Can I export the data to Excel? | Yes, the Actor supports export to CSV, JSON, Excel, and XML. |
| Is the data up to date? | The Actor fetches live data from the Wikimedia Commons API at the time of the run, so results reflect the current category membership. |
| What if I get no results? | Check that the category title is correct and that it exists on Wikimedia Commons. Also ensure the maxItems is set above zero. |

### 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 Valued 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

## `categoryTitle` (type: `string`):

The MediaWiki category to pull valued images from. Defaults to Category:Valued\_images. You can target subcategories like Valued\_images\_by\_subject.

## Actor input object example

```json
{
  "maxItems": 10,
  "categoryTitle": "Category:Valued_images"
}
```

# 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,
    "categoryTitle": "Category:Valued_images"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/wikimedia-commons-valued-images-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,
    "categoryTitle": "Category:Valued_images",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/wikimedia-commons-valued-images-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,
  "categoryTitle": "Category:Valued_images"
}' |
apify call parseforge/wikimedia-commons-valued-images-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/wikimedia-commons-valued-images-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/8yA9F9rwLIgMuKeWh/builds/Hq2VIMc8mrvhegLBn/openapi.json
