# Wikipedia Category Members Scraper (`parseforge/wikipedia-category-members-scraper`) Actor

Scrapes all page titles and IDs that belong to a Wikipedia category. Provide a category name like 'Physics' and get a flat list of every member page, subcategory, and file. Uses the public MediaWiki API with no authentication required.

- **URL**: https://apify.com/parseforge/wikipedia-category-members-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, AI, Education
- **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)

### Wikipedia Category Members Scraper

**Scrape every page title inside any Wikipedia category, up to a million members per run.** Each row returns the page ID, namespace, and full title. No API key, no login. Export to CSV, JSON, Excel, or XML.

Wikipedia's category system groups millions of articles, but browsing page by page is slow and the official API paginates 500 members at a time. This actor walks the entire category tree for you, resolving continuation tokens automatically, so you get a clean list of every member page in one dataset. Feed it a category name like 'American\_rock\_singers' or 'Physics' and it returns the complete membership roster.

| Who uses it | What they scrape Wikipedia for |
|---|---|
| SEO analysts | Building topic clusters from Wikipedia category hierarchies. |
| Data scientists | Creating knowledge graph nodes from structured Wikipedia category memberships. |
| Content strategists | Auditing which pages Wikipedia groups under a subject to find content gaps. |
| Academic researchers | Compiling bibliographic or entity lists from curated Wikipedia categories. |

### What it does

This Actor collects all page titles and IDs that belong to a given Wikipedia category and returns each member as a flat row.

- 📋 **Flat member list:** every subpage, file, and subcategory title the category contains, delivered as one row per member.
- 🔄 **Automatic pagination:** the actor follows the API continuation token until the category is exhausted or your max items limit is reached.
- 🌐 **Namespace awareness:** each row includes the namespace ID so you can separate articles from talk pages, templates, or category pages.
- ⚡ **Zero auth:** uses the public MediaWiki Action API with no app registration, OAuth, or proxy required.

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

### What you can do with Wikipedia data

**📚 Build a topic index.**

A content strategist scrapes 'Category:Artificial\_intelligence' to get every article Wikipedia groups under AI, then maps them to their own content plan.

**🧠 Populate a knowledge graph.**

A data engineer extracts all members of 'Category:Quantum\_mechanics' to seed a graph database with verified entity names and Wikipedia page IDs.

**🔍 Audit category coverage.**

An SEO analyst pulls the member list of 'Category:American\_rock\_singers' and cross-references it with their site's artist pages to find missing profiles.

**📊 Compile research corpora.**

An academic scrapes 'Category:World\_Heritage\_Sites\_by\_country' to assemble a clean list of pages for textual analysis.

### Why choose this scraper

| | What you get |
|---|---|
| **Complete membership** | Every page, subcategory, and file listed in the category, not the first 500. |
| **Structured output** | Fixed schema with pageid, namespace, and title so every run is predictable. |
| **No rate-limit headaches** | The actor handles continuation and polite request timing for you. |
| **Free tier ready** | Preview up to 10 members on the free plan; paid users can pull up to 1,000,000. |

### How it compares

This actor focuses exclusively on Wikipedia category membership lists, while the competitors below either bundle category lookup inside broader article-fetching tools or use Wikipedia as one of many company research sources.

| Feature | ParseForge | Wikipedia Articles Scraper | Wikipedia Article Scraper |
|---|---|---|---|
| Dedicated category member list output | Yes, returns only the member roster | Not listed | Not listed |
| Automatic pagination through full category | Yes, follows continuation tokens | Not listed | Not listed |
| Namespace field to separate articles from subcategories | Yes | Not listed | Not listed |
| No API key or login required | Yes | Yes | Yes |
| Full article text or HTML | No, member list only | Yes | Yes |
| Multi-language Wikipedia support | English only | Not listed | Yes, 250+ editions |

### What a Wikipedia record looks like

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

```json
{
 "pageid": 25496169,
 "ns": 0,
 "title": "Chad Ackerman",
 "url": "https://en.wikipedia.org/wiki/Chad_Ackerman",
 "scrapedAt": "2026-09-06T16:05:56.595Z"
}
```

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 a single Wikipedia category name and an optional item limit. The category name is the part after 'Category:' in the URL, with spaces replaced by underscores. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "categoryName": "American_rock_singers",
 "maxItems": 10
}
```

A larger pull:

```json
{
 "categoryName": "American_rock_singers",
 "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 [Wikipedia Category Members Scraper](https://apify.com/parseforge/wikipedia-category-members-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 Wikipedia 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/wikipedia-category-members-scraper"
```

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

### Troubleshooting

**I get an error saying 'Invalid category name'.**

Make sure you are not including the 'Category:' prefix. Only provide the part after it, like 'Physics' or 'American\_rock\_singers'. Also check for typos and ensure spaces are replaced with underscores.

**The run completes but returns zero items.**

The category name may be correct but the category itself might be empty or contain only subcategories that are themselves empty. Visit the category page on Wikipedia to confirm it lists members.

**My dataset contains pages I did not expect.**

Categories often include subcategories, talk pages, and file pages. Use the 'ns' (namespace) field to filter: ns=0 gives only articles, ns=14 gives only subcategories.

**The actor stops before reaching my maxItems limit.**

The category likely has fewer members than your limit. The actor stops automatically when the API signals there are no more members to fetch.

### FAQ

| Question | Answer |
|---|---|
| What is a Wikipedia category name? | It is the part of the URL after 'Category:'. For example, the category at https://en.wikipedia.org/wiki/Category:Physics has the name 'Physics'. Replace spaces with underscores, so 'American rock singers' becomes 'American\_rock\_singers'. |
| Does this actor get subcategories too? | Yes. The MediaWiki API returns subcategories as members of the parent category. They appear in your dataset with their namespace ID so you can filter them out if you only want articles. |
| How many members can I scrape in one run? | Free users can preview up to 10 members. Paid users can set maxItems up to 1,000,000. The actor stops when it hits your limit or the category is exhausted. |
| Do I need a Wikipedia API key or login? | No. This actor uses the public, unauthenticated MediaWiki Action API. No app registration, OAuth, or proxy is needed. |
| What output formats are supported? | Your dataset can be exported to CSV, JSON, Excel, XML, or RSS from the Apify platform. |
| Can I scrape categories from non-English Wikipedias? | This actor targets the English Wikipedia at en.wikipedia.org. To scrape other language editions, you would need a modified actor pointing to that language's API endpoint. |
| What is a namespace ID? | Wikipedia organizes pages into namespaces: 0 for articles, 1 for talk pages, 14 for categories, 6 for files, and so on. The namespace field lets you separate article titles from other page types. |
| Why am I getting fewer results than expected? | Check that your category name is spelled correctly and uses underscores for spaces. Also, some categories contain only subcategories, not articles. Try browsing the category page on Wikipedia to verify its contents. |
| Does the actor follow 'see also' or related category links? | No. It only returns the direct members of the single category you provide. It does not traverse the category graph laterally or upward. |
| Can I get the full page text or summary? | This actor returns only the member list (page ID, namespace, title). For full article content, use a Wikipedia article scraper like Wikipedia Articles Scraper. |

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

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

# Actor input Schema

## `categoryName` (type: `string`):

The Wikipedia category to scrape, without the 'Category:' prefix. For example, 'American rock singers' or 'Physics'.

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

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

## Actor input object example

```json
{
  "categoryName": "American_rock_singers",
  "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 = {
    "categoryName": "American_rock_singers",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/wikipedia-category-members-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 = {
    "categoryName": "American_rock_singers",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/wikipedia-category-members-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 '{
  "categoryName": "American_rock_singers",
  "maxItems": 10
}' |
apify call parseforge/wikipedia-category-members-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/wikipedia-category-members-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/kegxHsVMarTl5aqsn/builds/4FXeEitySSIr52p4Z/openapi.json
