# Wikimedia Commons License Templates Scraper (`parseforge/wikimedia-commons-license-scraper`) Actor

Scrapes license template metadata from Wikimedia Commons categories using the MediaWiki API. Returns each template as a flat row with pageid, namespace, and title. Supports any category and up to one million items per run.

- **URL**: https://apify.com/parseforge/wikimedia-commons-license-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Business, Developer tools
- **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 License Templates Scraper

**Scrape license templates from any Wikimedia Commons category, up to a million per run.** Each template comes with its page ID, namespace, and title. No login or API key required. Export to CSV, JSON, Excel, or XML.

Wikimedia Commons hosts thousands of license templates across multiple categories, but browsing them manually page by page is slow and you cannot export a structured list. This Actor reads the category members directly from the MediaWiki API, so you get every license template name and its metadata in one dataset. It works for the main License tags category, Copyright templates, and any other category you specify.

| Who uses it | What they scrape Wikimedia Commons for |
|---|---|
| Digital archivists | Building a complete inventory of license templates available on Wikimedia Commons. |
| Compliance officers | Auditing which Creative Commons and free-culture licenses are in active use across a media collection. |
| Data analysts | Creating a structured dataset of license template metadata for research on open-content licensing trends. |
| Tool developers | Populating a license picker or upload wizard with the canonical list of Commons license tags. |

### What it does

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

- 📂 **Category-driven extraction:** point the Actor at any category like Category:License\_tags or Category:Copyright\_templates and it returns every member template.
- 🔢 **Flexible volume control:** set a max items limit from a quick 10-item preview up to 1,000,000 templates for full-scale extraction.
- 📋 **Fixed flat schema:** every result delivers pageid, ns, and title so your dataset is consistent across runs.

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

### What you can do with Wikimedia Commons data

**📋 Audit license template coverage.**

A compliance officer runs the Actor on Category:License\_tags to get a full list of recognized license templates, then cross-references it against the licenses used in their organization's Commons uploads.

**🏗️ Build a license chooser tool.**

A developer extracts all templates from Category:Copyright\_templates and uses the structured title list to populate a dropdown in an upload wizard, so users always pick a valid Commons license tag.

**📊 Analyze open-license adoption.**

A researcher scrapes the full license template catalog and joins it with file usage data to study which Creative Commons variants are most common on Wikimedia Commons over time.

**🗂️ Create a master license reference.**

A digital archivist runs the Actor periodically to maintain an up-to-date, machine-readable registry of every license template available on Commons, stored as CSV for integration with cataloging software.

### Why choose this scraper

| | What you get |
|---|---|
| **Direct API access** | Reads the live MediaWiki API, the same endpoint that powers the Commons website, with no scraping of HTML pages. |
| **Structured output** | Every license template is returned as a clean row with pageid, namespace, and title, ready for analysis or import. |
| **No authentication** | Uses the public API with no OAuth, no app registration, and no API key to manage. |
| **Scalable volume** | From a 10-item free preview to a million items for paid users, the same Actor scales to your project size. |

### What a Wikimedia Commons record looks like

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

```json
{
 "pageId": 2996815,
 "namespace": 4,
 "title": "Commons:Image copyright tags visual",
 "url": "https://commons.wikimedia.org/wiki/Commons%3AImage_copyright_tags_visual",
 "scrapedAt": "2026-08-26T15:56:13.508Z"
}
```

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 single category title and set a maximum number of items to return, so you control exactly how many license templates land in your dataset. The Input tab lists every parameter.

A first run with the defaults:

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

A larger pull:

```json
{
 "categoryTitle": "Category:License_tags",
 "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 with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Wikimedia Commons License Templates Scraper](https://apify.com/parseforge/wikimedia-commons-license-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-license-scraper"
```

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

### Troubleshooting

**Why am I getting no results?**

Check that the categoryTitle input is spelled exactly as it appears on Commons, including the Category: prefix. Also verify that the category contains pages. An empty or misspelled category will return zero results.

**Why does the Actor stop before reaching my maxItems limit?**

The Actor returns every member of the category. If the category contains fewer templates than your maxItems value, the run finishes after returning all available items. This is expected behavior, not an error.

**I am a free user and I cannot set maxItems above 10.**

Free accounts are limited to 10 items per run as a preview. Upgrade to a paid plan to increase the limit up to 1,000,000 items.

**The output contains unexpected page titles that are not license templates.**

The Actor returns every page in the specified category. If the category contains subcategories, redirects, or other non-template pages, they will appear in the output. Use the namespace field (10 for templates) to filter the dataset after the run.

### FAQ

| Question | Answer |
|---|---|
| What exactly does this Actor return? | It returns a list of license template pages from the Wikimedia Commons category you specify. Each row contains the pageid, namespace, and title of one template. |
| Can I scrape categories other than License\_tags? | Yes. The categoryTitle input accepts any valid Wikimedia Commons category name, such as Category:Copyright\_templates or any subcategory you need. |
| Do I need a Wikimedia API key or login? | No. The Actor uses the public MediaWiki API endpoint, which requires no authentication, no app registration, and no API key. |
| How many license templates can I scrape in one run? | Free users can scrape up to 10 items as a preview. Paid users can set maxItems up to 1,000,000, limited only by the actual number of templates in the category. |
| Does this Actor download the license template content or images? | No. It returns only the metadata (pageid, namespace, title) for each template page. It does not fetch the wikitext, rendered HTML, or any images. |
| What output formats are supported? | You can export your dataset to CSV, JSON, Excel, or XML directly from the Apify platform. |
| Is this Actor scraping the Commons website HTML? | No. It calls the official MediaWiki API, the same structured endpoint that powers the Commons web interface, so the data is clean and reliable. |
| Can I filter templates by license type or keyword? | The Actor returns all members of the specified category. If you need a subset, you can filter the output dataset by title after the run using your own tools. |
| How often is the data refreshed? | Every run queries the live Wikimedia Commons API, so you always get the current list of templates as they exist at that moment. |
| What is the namespace field in the output? | The namespace is a numeric code that identifies the type of page. For license templates, this is typically 10 (Template namespace), confirming each result is a template. |

### 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 License Templates?

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

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

The Wikimedia Commons category to scrape license templates from, such as Category:License\_tags or Category:Copyright\_templates.

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

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

## Actor input object example

```json
{
  "categoryTitle": "Category:License_tags",
  "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 = {
    "categoryTitle": "Category:License_tags",
    "maxItems": 10
};

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

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

```

## MCP server setup

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