Wikimedia Commons Template Scraper avatar

Wikimedia Commons Template Scraper

Pricing

from $3.62 / 1,000 results

Go to Apify Store
Wikimedia Commons Template Scraper

Wikimedia Commons Template Scraper

Scrapes template pages from Wikimedia Commons via the public API. Returns each template's page ID, namespace, and title as a flat row. Filter by search term and set a max items limit.

Pricing

from $3.62 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 hours ago

Last modified

Share

ParseForge

Wikimedia Commons Template Scraper

Scrape template content and metadata from Wikimedia Commons, up to a million per run. Every template comes with its page ID, namespace, and title. No API key or login required. Export to CSV, JSON, Excel, or XML.

Wikimedia Commons hosts thousands of templates that structure its media descriptions, licenses, and navigation. Finding and extracting their raw content or metadata manually is slow and repetitive. This Actor reads the public Wikimedia Commons API directly, filters templates by a search term, and returns each match in one fixed schema.

Who uses itWhat they scrape Wikimedia Commons for
Digital archivistsCatalog which metadata templates are available for a specific media collection.
WikiProject maintainersAudit template usage and naming conventions across a Commons category.
GLAM professionalsIdentify the correct Commons templates for institution-specific upload campaigns.
Bot developersBuild a local index of template titles to automate file description edits.

What it does

This Actor collects Wikimedia Commons template pages by search term or retrieves all templates, and returns each one as a flat row with its page ID, namespace, and title.

  • ๐Ÿ” Search filter: supply a search term to retrieve only templates whose title contains that string.
  • ๐Ÿ“„ Bulk retrieval: leave the search term empty to fetch every template in the Template namespace.
  • โš™๏ธ Max items control: set a hard limit on the number of templates returned, from 1 up to 1,000,000.

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

What you can do with Wikimedia Commons data

๐Ÿ—‚๏ธ Build a template inventory.

A digital archivist runs the Actor without a search term to get a complete list of all Commons templates, then filters the CSV for institution-related names.

๐Ÿ”Ž Find a specific license template.

A GLAM upload coordinator searches for 'CC-BY' to retrieve every Creative Commons license template title and its page ID for a batch upload script.

๐Ÿค– Feed a bot with template metadata.

A bot developer scrapes all template titles and page IDs once a week to keep a local lookup table for automated file description corrections.

๐Ÿ“Š Audit template naming patterns.

A WikiProject maintainer searches for 'Information' to list all information-template variants, then reviews the titles for consistency.

Why choose this scraper

What you get
Template titleThe exact page name of each template in the Commons Template namespace.
Page IDThe stable numeric identifier for every template page.
NamespaceConfirms the page belongs to the Template namespace (ns=10).
Flat outputEvery template is a single row, ready for spreadsheets or databases.

What a Wikimedia Commons record looks like

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

{
"pageId": 3716844,
"namespace": 10,
"title": "Template:!!",
"scrapedAt": "2026-09-04T04:56:51.035Z"
}

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 with an optional search term to filter templates by title, and set a maximum number of items to control the output size. The Input tab lists every parameter.

A first run with the defaults:

{
"maxItems": 10
}

A larger pull:

{
"maxItems": 200
}

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Wikimedia Commons Template Scraper.
  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 (run-sync-get-dataset-items) or the ApifyClient 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:

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

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

Troubleshooting

Why am I getting no results for my search term?

The search does a prefix match on the template title. Check that your term matches the beginning of a template name. Try a shorter or more general prefix.

The run stopped before reaching my max items limit.

The Actor stops when the API returns no more matching templates. If your search term is specific, there may be fewer templates than your max items value.

I get an error about the API request failing.

Wikimedia Commons may occasionally rate-limit or have downtime. The Actor will retry automatically. If the problem persists, wait a few minutes and run it again.

The output only shows 10 items even though I set a higher max.

Free Apify accounts are capped at 10 items for this Actor. Upgrade to a paid plan to scrape more than 10 templates per run.

FAQ

QuestionAnswer
Does this Actor download the template wikitext or the metadata?It returns the metadata for each template page: the page ID, namespace, and title. It does not fetch the raw wikitext content of the template.
Do I need a Wikimedia account or API key to use this?No. The Actor uses the public Wikimedia Commons API, which requires no authentication or API key.
How many templates can I scrape in one run?Free users are limited to 10 items for a preview. Paid users can set the max items up to 1,000,000 per run.
Can I filter templates by namespace other than Template?No, this Actor is hardcoded to the Template namespace (ns=10) on Wikimedia Commons. It cannot retrieve pages from other namespaces.
What format does the output come in?You can export the dataset as CSV, JSON, Excel, or XML from the Apify platform.
Does the search term support wildcards or regular expressions?The search term is passed to the Wikimedia API's 'apfrom' parameter, which does a prefix-based string match. It does not support wildcards or regex.
Will this Actor work for other Wikimedia projects like Wikipedia?No, it is configured specifically for Wikimedia Commons. For Wikipedia templates, you would need a different Actor targeting that site's API.
How often is the template data updated?The Actor fetches data live from the Wikimedia Commons API on each run, so you always get the current state of the templates.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

Pricing

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.

โš ๏ธ 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.