# Discord Scraper | Servers, Member Counts and Invites (`silentflow/discord-scraper`) Actor

Discord scraper that turns the public server directory and any invite link into structured data: member and online counts, boosts, category, tags, language, creation date, invite link, icon and banner for every server. No Discord account needed, built for partnership research and market mapping.

- **URL**: https://apify.com/silentflow/discord-scraper.md
- **Developed by:** [SilentFlow](https://apify.com/silentflow) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.38 / 1,000 servers

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?

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 Scraper

**Turn Discord's server directory and any invite link into a table: every public server with its member and online counts, boosts, category, tags, language, creation date, invite link, icon and banner.** 100 servers in 14 seconds, no Discord account needed.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/YXm81xySHg6uRkewS/records/discord-scraper-how-it-works-v1.png)

1. **You type a keyword, pick a category, or paste links.** A keyword (`minecraft`, `anime`, `crypto`) searches Discord's own directory of 52,000 discoverable servers, largest first. A category (Gaming, Music, Entertainment, Education) lists it or narrows the search. A server page, a directory search URL, an invite link (`discord.gg/python`) or a bare invite code reaches one server, listed in the directory or not.
2. **Each server is read from Discord itself.** Member and online counts as the directory shows them at run time, boosts, primary category and all categories, tags, enabled features, language, the vanity invite, icon, banner and splash. Switch on the server page and the row also carries the long description, the reasons to join, the social links and the full feature list.
3. **One row comes back per server.** 35 fields, flat, with `null` where Discord has nothing: numbers as numbers, dates in RFC 3339, a stable `id` and `url`, the creation date computed from the id, and how the row was found (`foundBy`, `keyword`, `position`, `totalResults`). Ready for a spreadsheet, a database or an AI pipeline.

### ✨ Why teams choose this over other Discord scrapers

Clicking through the directory 12 servers at a time to build a partnership list? Paying a fee per run start for a scraper that reads a third-party index with last month's counts? Getting back raw nested blobs with 29 translations per category and no creation date?

- 🔢 **28 fields filled on every row, not 22 keys of raw output.** Measured on the default run of 100 Minecraft servers: 28 of the 35 fields carry a value on every row, among them `memberCount`, `onlineCount`, `boostCount`, `locale`, `createdAt`, `inviteUrl`, `category`, `categories`, `keywords`, `features` and five flat flags such as `isVerified` and `isPartnered`. The most used directory scraper returns the raw directory hit: 22 keys, several of them search-highlighting noise and translation tables, no creation date, no flat flags.
- 🔀 **Four ways in, one run.** Keywords, a category browse, a server page or directory search URL, and an invite link or code. The most used directory scraper takes keywords and a category; none of the three most used ones resolves an invite.
- 🌍 **Every public server, not only the directory.** The directory lists 52,816 discoverable servers (23 Sep 2026). An invite link reaches any public server beyond it, with fields the directory does not show: verification level, NSFW level and boost tier. The most used scrapers read the directory, or a third-party index, only.
- 🏷️ **A lower price per server than the most used Discord server scraper, and nothing per run start.** Two of the three most used scrapers add a fee every time a run starts. Here a run that finds nothing bills nothing. The exact figure is on the Monetization tab of this page.
- ⚡ **100 servers in 14 seconds, 30 in 5.** No browser loads a page: the run reads the data Discord's own pages carry and moves on. A whole category of 500 servers takes about a minute and a half.
- 📅 **Server age on every row.** `createdAt` comes from the server id itself, so every row says when the server was created, with no extra request. A young server with 100,000 members and a ten-year-old one read differently in an outreach list.
- 🧹 **Clean rows an integrator can trust.** `memberCount` is a number, not `"1.2M"`; `createdAt` and `scrapedAt` are RFC 3339 in UTC; `id` is the server id and `url` its permanent directory page; a field Discord does not have is `null`, never an empty string. Field names follow the ones the market already uses: `memberCount`, `onlineCount`, `boostCount`, `inviteUrl`, `vanityUrl`, `iconUrl`, `bannerUrl`, `features`, `keywords`.
- 🔓 **No account, no token, no login.** Type a keyword and run. Your own Discord account is never involved.

### 🎯 What you can do with Discord data

| Team | What they build |
|---|---|
| Partnerships | The 200 largest gaming or anime servers with their online counts and invite links, ranked for sponsorship outreach |
| Game and product marketing | A weekly scheduled run over the servers around a title, with member and online counts compared week to week |
| Community management | A map of a category by size, language and creation date, to find where a community is missing |
| Web3 and crypto research | Every server matching a token, exchange or protocol name with its size, activity and age, to separate live communities from dead ones |
| Influencer and creator agencies | Servers of the Content Creator and Fandom categories with member counts and social links, to match creators with sponsors |
| Data and AI | A dataset of thousands of servers with descriptions, tags, categories, features and languages, for classification or research |
| Sales | A list of invite links from a CRM enriched with server names, ids, counts, verification levels and creation dates |
| Trust and safety research | NSFW flags, verification levels and boost tiers of a set of servers resolved from their invites |

### 📥 Input parameters

#### Essentials

| Parameter | Type | Description |
|---|---|---|
| `keywords` | array | Words to search in the directory: `minecraft`, `anime`, `crypto`, `study`. Matched against names, descriptions and tags, largest servers first. Up to 3,000 servers per keyword (the directory's limit). |
| `category` | string | `gaming`, `music`, `entertainment`, `education`, or empty for all categories. Narrows a keyword search, or lists the category when there is no keyword and no link. |
| `startUrls` | array | Server pages (`https://discord.com/servers/midjourney-662267976984297473`), directory search pages (`https://discord.com/servers/gaming?query=rpg`), invite links (`https://discord.gg/python`, `discord.com/invite/xyz`) or bare invite and vanity codes (`python`). Objects `{"url": ...}` work too. |

#### 🔢 Limits

| Parameter | Type | Description |
|---|---|---|
| `maxItems` | integer | Servers to deliver in total across keywords, categories and links. Default `100`. No fixed limit. |

#### 📄 Output

| Parameter | Type | Description |
|---|---|---|
| `includeDetails` | boolean | Read each server's own page for `about`, `reasonsToJoin`, `socialLinks` and the full `features` list. One page per server, about two seconds each. Default `false`. |

#### ⚙️ Advanced

| Parameter | Type | Description |
|---|---|---|
| `debugMode` | boolean | Detailed logs of every request and connection change. Default `false`. |

With no keyword, no category and no link, the run lists the whole directory, largest servers first.

### 📊 Output data

A server found by keyword in the directory:

```json
{
  "id": "143852930036924417",
  "url": "https://discord.com/servers/wynncraft-mmorpg-minecraft-server-143852930036924417",
  "name": "Wynncraft • MMORPG Minecraft Server",
  "description": "Full-Fat MMORPG Minecraft Server. No mods required! Join at (IP): play.wynncraft.com",
  "slug": "wynncraft-mmorpg-minecraft-server-143852930036924417",
  "category": "Gaming",
  "categories": ["Fandom", "Entertainment", "Memes", "Gaming", "General Chatting"],
  "keywords": ["grian", "minecraft", "minecraft mmorpg", "minecraft rpg", "minecraft server", "mmo", "mmorpg", "rpg", "winncraft", "wynn"],
  "features": ["COMMUNITY", "DISCOVERABLE", "ENABLED_DISCOVERABLE_BEFORE", "PARTNERED", "PREVIEW_ENABLED", "WELCOME_SCREEN_ENABLED"],
  "isVerified": false,
  "isPartnered": true,
  "isDiscoverable": true,
  "isCommunity": true,
  "isNsfw": false,
  "verificationLevel": null,
  "nsfwLevel": null,
  "memberCount": 218859,
  "onlineCount": 73515,
  "boostCount": 60,
  "boostTier": null,
  "locale": "en-US",
  "createdAt": "2016-02-01T23:00:11Z",
  "inviteUrl": "https://discord.gg/wynncraft",
  "vanityUrl": "https://discord.gg/wynncraft",
  "iconUrl": "https://cdn.discordapp.com/icons/143852930036924417/a_8f1e212da56e0f5b02ed58d65cdcf6cb.png?size=256",
  "bannerUrl": "https://cdn.discordapp.com/banners/143852930036924417/a_e9bb762b9c20ab5b83658671a70b3b28.gif?size=1024",
  "splashUrl": "https://cdn.discordapp.com/discovery-splashes/143852930036924417/9de202132b04423ac657c9716a11d8b1.jpg?size=2048",
  "socialLinks": null,
  "reasonsToJoin": null,
  "about": null,
  "foundBy": "keyword",
  "keyword": "minecraft",
  "position": 1,
  "totalResults": 4457,
  "scrapedAt": "2026-09-23T15:25:58Z"
}
```

A server resolved from an invite link:

```json
{
  "id": "267624335836053506",
  "url": "https://discord.com/servers/python-267624335836053506",
  "name": "Python",
  "description": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
  "slug": "python-267624335836053506",
  "category": null,
  "categories": [],
  "keywords": [],
  "features": ["ANIMATED_ICON", "BANNER", "COMMUNITY", "DISCOVERABLE", "NEWS", "VANITY_URL", "VERIFIED", "WELCOME_SCREEN_ENABLED"],
  "isVerified": true,
  "isPartnered": false,
  "isDiscoverable": true,
  "isCommunity": true,
  "isNsfw": false,
  "verificationLevel": 2,
  "nsfwLevel": 0,
  "memberCount": 431765,
  "onlineCount": 43054,
  "boostCount": 28,
  "boostTier": 3,
  "locale": null,
  "createdAt": "2017-01-08T12:03:33Z",
  "inviteUrl": "https://discord.gg/python",
  "vanityUrl": "https://discord.gg/python",
  "iconUrl": "https://cdn.discordapp.com/icons/267624335836053506/95a69567efa60a48b8d9840cb38b106b.png?size=256",
  "bannerUrl": "https://cdn.discordapp.com/banners/267624335836053506/ed3be5b67371fe219d7006152087afdb.png?size=1024",
  "splashUrl": "https://cdn.discordapp.com/splashes/267624335836053506/b7099fe221153a7faff76048dc2e63ef.jpg?size=2048",
  "socialLinks": null,
  "reasonsToJoin": null,
  "about": null,
  "foundBy": "invite",
  "keyword": null,
  "position": null,
  "totalResults": null,
  "scrapedAt": "2026-09-23T15:27:41Z"
}
```

The `features` list above is shortened; a real row lists every feature the server has enabled, often 40 or more.

### 🗂️ Data fields

35 fields per server. A directory row fills 28 of them on every row; an invite row adds `verificationLevel`, `nsfwLevel` and `boostTier`; a server page adds `about`, `reasonsToJoin` and `socialLinks`.

| Group | Fields |
|---|---|
| Identity | `id` (server id, stable), `url` (directory page, or the invite link for a server outside the directory), `name`, `description`, `slug` |
| Content | `category` (primary), `categories[]`, `keywords[]` (tags set by the server), `features[]` (Discord feature flags), `isVerified`, `isPartnered`, `isDiscoverable`, `isCommunity`, `isNsfw`, `verificationLevel` (0 to 4, invites only), `nsfwLevel` (0 to 3, invites only) |
| Measures | `memberCount`, `onlineCount` (members present when the page was read), `boostCount` (Nitro boosts), `boostTier` (0 to 3, invites only) |
| Place and time | `locale` (server language, `en-US`, `pt-BR`), `createdAt` (RFC 3339, from the server id) |
| Links and media | `inviteUrl` (vanity invite of a directory server, or the invite you gave), `vanityUrl`, `iconUrl`, `bannerUrl`, `splashUrl`, `socialLinks[]`, `reasonsToJoin[]`, `about` (the last three with `includeDetails` or a server page) |
| Meta | `foundBy` (`keyword`, `category`, `directory`, `url`, `invite`), `keyword`, `position` (rank in the listing, 1 = largest), `totalResults` (servers matching the search), `scrapedAt` |

Usability facts:

- `url` is permanent for a directory server: any page address ending with the server id resolves, and the row carries the canonical one.
- `iconUrl`, `bannerUrl` and `splashUrl` stay valid as long as the server keeps that image; an animated icon or banner is a `.gif`.
- `inviteUrl` of a directory server is its vanity link, which Discord grants to every discoverable server. An invite you paste may expire; a dead one gives no row and is counted in the run summary.
- `memberCount` and `onlineCount` are the approximate counts Discord shows; `onlineCount` is a snapshot of the moment the page was read.
- The `keywords` field is the server's own tags. Your search keyword is in `keyword`.

### 🚀 Examples

#### Get the largest Minecraft servers

```json
{
  "keywords": ["minecraft"],
  "maxItems": 100
}
```

#### List the top 500 gaming servers

```json
{
  "category": "gaming",
  "maxItems": 500
}
```

#### Search anime servers inside Entertainment with their full pages

```json
{
  "keywords": ["anime"],
  "category": "entertainment",
  "includeDetails": true,
  "maxItems": 50
}
```

#### Resolve a list of invite links

```json
{
  "startUrls": [
    "https://discord.gg/python",
    "https://discord.com/invite/discord-developers",
    "midjourney"
  ],
  "maxItems": 50
}
```

#### Read a directory search copied from the browser

```json
{
  "startUrls": ["https://discord.com/servers/music?query=lofi"],
  "maxItems": 30
}
```

#### Cover a market with several keywords in one run

```json
{
  "keywords": ["crypto", "trading", "nft"],
  "maxItems": 300
}
```

#### Map the whole directory, largest servers first

```json
{
  "maxItems": 1000
}
```

### 🤖 Copy to your AI assistant

Paste this block into Claude, ChatGPT or Cursor to give it full context about this scraper:

```
You have access to the Discord Scraper on Apify: silentflow/discord-scraper

Input schema:
- keywords (array of strings, optional): words searched in Discord's server directory, largest servers first, up to 3,000 servers per keyword
- category (string, optional): "gaming", "music", "entertainment", "education" or "" for all; narrows keywords or lists the category alone
- startUrls (array of strings, optional): server pages (https://discord.com/servers/<slug>-<id>), directory search pages, invite links (https://discord.gg/<code>, discord.com/invite/<code>) or bare invite codes
- maxItems (integer, default 100): total servers to deliver
- includeDetails (boolean, default false): read each server's page for about, reasonsToJoin, socialLinks and the full features list
- debugMode (boolean, default false)
With no keyword, category or URL the run lists the whole directory by member count.

Output per server (35 fields):
- id (string), url (string), name (string), description (string|null), slug (string|null)
- category (string|null), categories (string[]), keywords (string[]), features (string[])
- isVerified, isPartnered, isDiscoverable, isCommunity, isNsfw (boolean)
- verificationLevel (int|null), nsfwLevel (int|null): invites only
- memberCount (int|null), onlineCount (int|null), boostCount (int|null), boostTier (int|null, invites only)
- locale (string|null), createdAt (RFC 3339 string|null)
- inviteUrl, vanityUrl, iconUrl, bannerUrl, splashUrl (string|null)
- socialLinks (string[]|null), reasonsToJoin (string[]|null), about (string|null): server page only
- foundBy ("keyword"|"category"|"directory"|"url"|"invite"), keyword (string|null), position (int|null), totalResults (int|null), scrapedAt (RFC 3339 string)

One event per server row. No Discord account needed. Use apify-client for Python or JS.
```

### 💻 Integrations

#### Build a partnership outreach list in Python

```python
from apify_client import ApifyClient
import csv

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("silentflow/discord-scraper").call(run_input={
    "keywords": ["anime", "manga"],
    "category": "entertainment",
    "maxItems": 300,
})
rows = client.dataset(run["defaultDatasetId"]).list_items().items

## Active communities only: at least 2,000 members online, ranked by online count
active = sorted(
    (r for r in rows if (r["onlineCount"] or 0) >= 2000),
    key=lambda r: r["onlineCount"], reverse=True,
)
with open("anime-outreach.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["name", "members", "online", "boosts", "created", "invite", "page"])
    for r in active:
        w.writerow([r["name"], r["memberCount"], r["onlineCount"], r["boostCount"], r["createdAt"][:10], r["inviteUrl"], r["url"]])
print(f"{len(active)} active servers out of {len(rows)}")
```

#### Track the growth of your market's servers every week in Node.js

```javascript
import { ApifyClient } from "apify-client";
import fs from "node:fs";

const client = new ApifyClient({ token: "YOUR_APIFY_TOKEN" });
const run = await client.actor("silentflow/discord-scraper").call({
    startUrls: ["https://discord.gg/python", "https://discord.gg/discord-developers", "midjourney"],
    maxItems: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

const previous = fs.existsSync("servers.json") ? JSON.parse(fs.readFileSync("servers.json")) : {};
for (const s of items) {
    const before = previous[s.id]?.memberCount;
    const delta = before ? s.memberCount - before : 0;
    console.log(`${s.name}: ${s.memberCount} members (${delta >= 0 ? "+" : ""}${delta} since last week), ${s.onlineCount} online`);
    previous[s.id] = { memberCount: s.memberCount, onlineCount: s.onlineCount, at: s.scrapedAt };
}
fs.writeFileSync("servers.json", JSON.stringify(previous, null, 2));
```

#### Export a category to CSV from the command line

```bash
apify call silentflow/discord-scraper --input '{"category": "gaming", "maxItems": 500}' --wait-for-finish
apify datasets get-items --format csv --output gaming-servers.csv
```

### 📈 Performance

| Run | Result | Time measured |
|---|---|---|
| Default input, keyword `minecraft`, 100 servers | 100 rows, 28 fields filled on every row | 14 seconds |
| Category `music`, 30 servers | 30 rows | 5 seconds |
| Keyword `anime` in Entertainment with `includeDetails`, 15 servers | 15 rows with `about`, social links and full features | 28 seconds |
| Two invites, one server page and a directory search, 30 servers | 30 rows | 9 seconds |
| A whole category, 500 servers | 500 rows | about 90 seconds |
| The whole directory, 1,000 servers | 1,000 rows | about 3 minutes |

Memory: 256 MB is enough for any run. The directory serves 12 servers per page and stops at 3,000 servers per search; the run reads one page every second or two, which is the rhythm the directory accepts from one connection.

### 💾 Data export

Every run's dataset is available on the Storage tab of the run as JSON, CSV, Excel, XML, HTML table or RSS, and through the API:

```
https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=csv&token=YOUR_TOKEN
```

Replace `csv` with `json`, `xlsx` or `xml`. Add `&fields=name,memberCount,onlineCount,inviteUrl` to keep only the columns you need, and `&clean=true` to drop empty values.

### 💡 Tips for best results

1. **Start with a category when the keyword is broad.** `minecraft` alone matches 4,457 servers and `gaming` 38,454; the directory stops at 3,000 per search, so `keywords: ["rpg"]` with `category: "gaming"` reaches deeper than `rpg` alone.
2. **Use several precise keywords instead of one vague one.** `["genshin", "honkai", "zenless"]` in one run returns each franchise's servers, deduplicated across the three searches.
3. **Rank on `onlineCount`, not only `memberCount`.** A server with 500,000 members and 3,000 online is quieter than one with 60,000 members and 8,000 online. `position` gives the directory's own ranking by members.
4. **Leave `includeDetails` off for discovery, on for the shortlist.** The directory row already carries counts, tags, language and the invite link; the page adds the long description, reasons to join and social links at about two seconds per server. Discover with 1,000 rows, then run the 50 servers you keep with details.
5. **Schedule the same input weekly and compare `memberCount` by `id`.** The id never changes, the name sometimes does. `createdAt` tells you whether a fast-growing server is new or established.

### ❓ FAQ

**What does this scraper extract?**
Public Discord servers, one row each: name, description, member and online counts, boosts, category and categories, tags, enabled features, language, creation date, invite link, icon, banner and splash, plus the reasons to join, social links and long description when a server page is read.

**How do I find servers?**
Four ways: a keyword searched in Discord's directory, a category browsed by size, a server page or a directory search URL pasted from the browser, and an invite link or code. They combine in one run and the rows are deduplicated by server id.

**Do I need a Discord account?**
No. The scraper reads the public server directory and the public invite preview. No login, no token, nothing of yours is used.

**How fresh are the numbers?**
Live: every run reads the directory pages and invite previews at run time, nothing is cached. `memberCount` and `onlineCount` are the approximate counts Discord shows at that moment.

**Which servers can it find?**
Every server Discord lists in its directory, 52,816 on 23 September 2026, by keyword or category. Any other public server is reachable through its invite link, including servers that never applied to the directory.

**Is there a limit per search?**
The directory answers at most 3,000 servers for one keyword or category, 12 per page. Narrow a broad keyword with a category or split it into precise ones. `maxItems` caps the run and has no fixed limit.

**Why is `category` empty on some rows?**
A server resolved from an invite carries no category: the invite preview does not include it. Directory rows always have one. The same goes for `keyword`, `position` and `totalResults`, which describe a search.

**Which categories exist?**
The directory has four browseable categories: Gaming, Music, Entertainment and Education. Other categories such as Science & Tech, Creative Arts or Finance appear in `categories` on every row but have no page of their own; search them with a keyword.

**Can I get member lists or messages?**
No. This scraper delivers servers. Member lists and message history need a logged-in Discord account and are out of scope.

**Do keyword and category combine?**
Yes. `keywords: ["rpg"]` with `category: "gaming"` returns the RPG servers of the Gaming category only, largest first, and reaches past the 3,000-server limit of a plain `rpg` search.

**Do the links expire?**
`url`, `iconUrl`, `bannerUrl` and `splashUrl` stay valid as long as the server keeps its page and images. The vanity `inviteUrl` of a directory server is permanent; an invite you paste may expire, in which case the run reports it and delivers no row for it.

**Can I run several keywords at once?**
Yes. Every keyword is searched in turn, the rows are deduplicated across searches, and `maxItems` applies to the whole run.

**What is discord.com/servers?**
Discord's own server directory, where community servers apply to be discoverable. It is public, ranked by member count, and searchable by keyword and category. This scraper reads it directly.

### ⚖️ Legal

This Actor extracts publicly available data from Discord's server directory and public invite previews. It does not bypass any login, paywall or CAPTCHA, and never uses a user account. Users are responsible for complying with Discord's terms of service and applicable data protection laws (GDPR, CCPA, and PIPL where relevant). The output describes servers, not people; server names and descriptions may mention individuals, and users must handle such data accordingly. The data returned is informational; verify accuracy for regulated use cases.

### 🔗 Related scrapers

- [YouTube Channel Scraper](https://apify.com/silentflow/youtube-channel-scraper): channels with subscribers, views and recent videos, for the same creators' other communities.
- [TikTok Scraper](https://apify.com/silentflow/tiktok-scraper): videos, profiles and hashtags with engagement counts.
- [Instagram Engagement Scraper](https://apify.com/silentflow/instagram-engagement-scraper): likes and comments of any public post.
- [Facebook Search Scraper](https://apify.com/silentflow/facebook-search-scraper): pages, groups and posts found by keyword.

### 📬 Support

Need something this scraper doesn't do yet? We ship features fast.

- Feature requests go straight to our backlog
- Enterprise needs? We do custom integrations and high-volume plans
- Pricing questions? Check the Monetization tab on the actor page

Response time: usually under 24 hours.

Check out our other scrapers: [silentflow on Apify](https://apify.com/silentflow)

# Actor input Schema

## `keywords` (type: `array`):

Words to search in Discord's server directory: <code>minecraft</code>, <code>anime</code>, <code>crypto</code>, <code>study</code>. Each keyword is matched against server names, descriptions and tags, largest servers first, and every match becomes one row. A common word returns a few thousand servers; the directory stops at 3,000 per keyword, so add a category to narrow a broad one.

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

Limit the keyword search to one directory category, or browse it: with no keyword and no link, the run lists the category's servers largest first. <b>All categories</b> with nothing else lists the whole directory, 52,000 servers ranked by members.

## `startUrls` (type: `array`):

One row per server for a server page (<code>https://discord.com/servers/midjourney-662267976984297473</code>), an invite link (<code>https://discord.gg/python</code>, <code>discord.com/invite/xyz</code>) or a bare invite or vanity code (<code>python</code>). An invite reaches any public server, listed in the directory or not, and adds its verification level, NSFW level and boost tier. A directory page with its search (<code>https://discord.com/servers/gaming?query=rpg</code>) is read page after page. A dead invite gives no row and is counted in the run summary.

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

Stop after this many servers. 100 servers take about 20 seconds; 1,000 take about three minutes. Set it to what you need, the cost grows with it.

## `includeDetails` (type: `boolean`):

Open every server's own page for its long description (<code>about</code>), the reasons to join, its social links and the full list of enabled features. Adds one page read per server, about two seconds each: 100 servers take about four minutes instead of twenty seconds. A page that cannot be read leaves the row with its directory data.

## `debugMode` (type: `boolean`):

Write detailed logs of every request and connection change.

## Actor input object example

```json
{
  "keywords": [
    "minecraft"
  ],
  "category": "",
  "maxItems": 100,
  "includeDetails": false,
  "debugMode": false
}
```

# Actor output Schema

## `servers` (type: `string`):

Complete server data including: id, url, name, description, slug, category, categories, keywords, features, isVerified, isPartnered, isDiscoverable, isCommunity, isNsfw, verificationLevel, nsfwLevel, memberCount, onlineCount, boostCount, boostTier, locale, createdAt, inviteUrl, vanityUrl, iconUrl, bannerUrl, splashUrl, socialLinks, reasonsToJoin, about, foundBy, keyword, position, totalResults, scrapedAt.

# 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": [
        "minecraft"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("silentflow/discord-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": ["minecraft"] }

# Run the Actor and wait for it to finish
run = client.actor("silentflow/discord-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": [
    "minecraft"
  ]
}' |
apify call silentflow/discord-scraper --silent --output-dataset

```

## MCP server setup

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