# Discord Server Scraper (`magicfingers/discord-server-scraper`) Actor

Scrapes publicly accessible Discord server information from discovery listings, invite pages, disboard.org, and discord.me. Collects server name, description, member count, tags, icons, and more.

- **URL**: https://apify.com/magicfingers/discord-server-scraper.md
- **Developed by:** [abdulrahman alrashid](https://apify.com/magicfingers) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 75 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Server Scraper

Scrapes publicly accessible Discord server information from multiple sources. No login or Discord account required.

### What it does

This actor collects metadata from publicly listed Discord servers, including:

- **Server name** and **description**
- **Member count** and **online count**
- **Categories** and **tags**
- **Server icon**, **banner**, and **splash images**
- **Boost level**, **verification level**
- **Verified** and **partnered** status
- **Invite code** and **vanity URL**

### Data sources

| Source | Description |
|--------|-------------|
| **Discord Discovery** | Official server discovery at discord.com/servers |
| **Discord Invites** | Public invite pages (discord.gg/xxx) |
| **Disboard.org** | Popular third-party server directory |
| **Discord.me** | Third-party server listing site |

### Input configuration

#### Mode

Choose which source(s) to scrape:

- `discovery` — Discord's official server discovery (default)
- `invite` — Scrape specific invite links you provide
- `disboard` — Disboard.org server listings
- `discordme` — Discord.me server listings
- `all` — Scrape all sources

#### Search Keywords

Comma-separated keywords to search for servers. Used in discovery, disboard, and discord.me modes.

Example: `gaming, programming, crypto`

#### Categories

Filter Discord discovery by category. Options include Gaming, Music, Entertainment, Science & Tech, Education, Programming, and more.

#### Invite Codes

List of Discord invite codes or URLs to scrape. Accepts:

- Plain codes: `python`
- Short URLs: `discord.gg/python`
- Full URLs: `https://discord.com/invite/python`

#### Max Results

Maximum number of servers to collect per run. Default: 100. Set to 0 for unlimited.

#### Max Pages

Maximum listing pages to scrape from Disboard and Discord.me. Default: 10.

#### Proxy Configuration

Uses Apify Proxy by default. Recommended for avoiding rate limits.

### Example input

```json
{
    "mode": "all",
    "searchKeywords": "programming, python",
    "categories": ["Programming", "Science & Tech"],
    "inviteCodes": ["python", "discord.gg/reactjs", "https://discord.gg/typescript"],
    "maxResults": 500,
    "maxPages": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Output format

Each result contains:

```json
{
    "name": "Python",
    "description": "The official Python community server.",
    "id": "267624335836053506",
    "memberCount": 350000,
    "onlineCount": 45000,
    "category": "Programming",
    "tags": ["python", "coding", "programming"],
    "iconUrl": "https://cdn.discordapp.com/icons/267624335836053506/abc123.png?size=256",
    "bannerUrl": null,
    "splashUrl": null,
    "inviteCode": "python",
    "inviteUrl": "https://discord.gg/python",
    "boostLevel": 3,
    "verificationLevel": 3,
    "isVerified": true,
    "isPartnered": true,
    "vanityUrl": "https://discord.gg/python",
    "source": "discord_discovery",
    "scrapedAt": "2026-03-19T12:00:00.000Z"
}
```

### Pricing

This actor uses **Pay-Per-Event** pricing at **$1.00 per 1,000 results** ($0.001 per result).

### Legal and ethical notes

- This actor **only** scrapes publicly accessible server metadata
- It does **not** access private channels, messages, or user data
- It does **not** require Discord login or authentication
- All data collected is already publicly visible on the web
- Users are responsible for complying with Discord's Terms of Service and applicable laws

### Technical details

- Built with **Apify SDK v3** and **Crawlee PlaywrightCrawler**
- Uses Playwright with Chromium for JavaScript rendering
- Includes anti-bot detection countermeasures (stealth mode, randomized delays)
- Deduplicates results across sources by server ID
- Handles Cloudflare challenges on third-party sites
- Supports pagination with configurable limits

# Actor input Schema

## `mode` (type: `string`):

Choose what to scrape. 'discovery' scrapes Discord's public server discovery. 'invite' scrapes specific invite links. 'disboard' scrapes disboard.org listings. 'discordme' scrapes discord.me listings. 'all' scrapes all sources.

## `searchKeywords` (type: `string`):

Keywords to search for servers (used in discovery, disboard, and discord.me modes). Separate multiple keywords with commas.

## `categories` (type: `array`):

Filter by Discord server categories. Only used in discovery mode.

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

List of Discord invite codes or full invite URLs (e.g., 'discord.gg/python' or just 'python'). One per line.

## `maxResults` (type: `integer`):

Maximum number of servers to scrape per source. Set to 0 for unlimited.

## `maxPages` (type: `integer`):

Maximum number of listing pages to scrape from third-party directories.

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

Proxy settings for bypassing rate limits and anti-bot measures.

## Actor input object example

```json
{
  "mode": "discovery",
  "searchKeywords": "gaming",
  "categories": [],
  "inviteCodes": [],
  "maxResults": 5,
  "maxPages": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "searchKeywords": "gaming",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("magicfingers/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 = {
    "searchKeywords": "gaming",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("magicfingers/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 '{
  "searchKeywords": "gaming",
  "maxResults": 5
}' |
apify call magicfingers/discord-server-scraper --silent --output-dataset

```

## MCP server setup

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