# Discord Public Server Directory Scraper (`cryptosignals/discord-server-scraper`) Actor

Scrape Discord server discovery pages for community research and competitive analysis. No tokens required - only public data. Find servers by keyword, category, or member count. Extract server name, description, member counts, and invite links from the official Discord server directory.

- **URL**: https://apify.com/cryptosignals/discord-server-scraper.md
- **Developed by:** [Web Data Labs](https://apify.com/cryptosignals) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 15 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 server scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Discord Public Server Directory Scraper

Find and analyze public Discord communities at scale — no bot tokens, no OAuth, no authentication required. This actor extracts structured data from Discord's public server discovery pages so you can research communities, analyze competitors, or build niche directories without writing a single line of scraping code.

### Why this is hard to do yourself

Discord's discovery surface looks simple in a browser, but pulling it programmatically is painful:

- The official Discord API requires bot tokens and explicit server membership — useless for discovery.
- The public discovery page is heavily client-rendered and rate-limited.
- Pagination, category filters, and search behave differently than the visible UI suggests.
- Building this in-house means maintaining yet another scraper that breaks every time Discord ships a redesign.

This actor handles all of that for you. You give it a keyword, a category, or a list of invite codes — you get clean JSON back.

### Features

- **No authentication required** — only public data Discord exposes to anonymous visitors.
- **Search by keyword** — find servers about gaming, Python, crypto, anime, etc.
- **Filter by category** — Gaming, Education, Music, Science & Tech, and more.
- **Direct invite-code lookup** — paste a list of invites and get them resolved in bulk.
- **Member counts and verification status** — for community-size benchmarking.

### Input

```json
{
  "keywords": "python",
  "category": "science-and-tech",
  "maxServers": 50,
  "inviteCodes": [],
  "proxyConfiguration": { "useApifyProxy": true }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `keywords` | string | Search term (e.g. `gaming`, `python`, `crypto`). Leave empty to browse all. |
| `category` | string | Optional category filter. One of `gaming`, `entertainment`, `education`, `science-and-tech`, `music`, `content-creator`, `anime-and-manga`, `movies-and-tv`. |
| `maxServers` | integer | Max servers to return (1–500). |
| `inviteCodes` | array | Optional list of invite codes/URLs (e.g. `python`, `https://discord.gg/gaming`). When set, discovery is skipped. |
| `proxyConfiguration` | object | Proxy settings — recommended for larger runs. |

### Output

Each item in the dataset:

```json
{
  "server_name": "Python",
  "description": "The official Python community on Discord.",
  "member_count": 412503,
  "online_count": 18342,
  "category": "Science & Tech",
  "invite_url": "https://discord.gg/python",
  "is_verified": true,
  "boost_level": 3
}
```

### Use cases

- **Community research** — map the landscape of servers in your niche.
- **Competitive analysis** — track member growth across rival communities.
- **Lead lists** — find communities to partner with or sponsor.
- **Directory building** — power a "best Discord servers for X" site.
- **Academic research** — study online community structure at scale.

### Get started

1. Click **Run** and try the default input.
2. Adjust `keywords`, `category`, or `maxServers` for your use case.
3. Export results to JSON, CSV, or Excel — or pipe them into your own pipeline via the Apify API.

Pay-per-result pricing — you only pay for servers actually returned.

***

*Found this actor useful? [Leave a review](https://apify.com/cryptosignals/discord-server-scraper#reviews) - it helps a lot. Something broken? Report it on the [Issues tab](https://apify.com/cryptosignals/discord-server-scraper/issues).*

# Actor input Schema

## `keywords` (type: `string`):

Search term for finding servers (e.g. 'gaming', 'python', 'crypto'). Leave empty to browse all servers.

## `category` (type: `string`):

Filter by Discord category. Leave empty for all categories.

## `maxServers` (type: `integer`):

Maximum number of servers to scrape.

## `inviteCodes` (type: `array`):

Optional: List of Discord invite codes or URLs to scrape directly (e.g. 'python', 'https://discord.gg/gaming'). If provided, discovery search is skipped.

## `proxyConfiguration` (type: `object`):

Proxy settings. Recommended for large scrapes to avoid rate limiting.

## Actor input object example

```json
{
  "keywords": "",
  "category": "",
  "maxServers": 50,
  "inviteCodes": [
    "discord-developers",
    "minecraft",
    "python"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "keywords": "",
    "category": "",
    "maxServers": 50,
    "inviteCodes": [
        "discord-developers",
        "minecraft",
        "python"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cryptosignals/discord-server-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 = {
    "keywords": "",
    "category": "",
    "maxServers": 50,
    "inviteCodes": [
        "discord-developers",
        "minecraft",
        "python",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("cryptosignals/discord-server-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 '{
  "keywords": "",
  "category": "",
  "maxServers": 50,
  "inviteCodes": [
    "discord-developers",
    "minecraft",
    "python"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call cryptosignals/discord-server-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cryptosignals/discord-server-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/LlnRe5eNzs6Qi40DZ/builds/mSciQrcsFzgBP57yl/openapi.json
