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

Discover niche communities, analyze server trends, and gain competitive insights with detailed data on member counts, categories, and more. Efficient, flexible, and up-to-date—start exploring today & unlock the full potential of Discord with our comprehensive server scraper! 🚀

- **URL**: https://apify.com/louisdeconinck/discord-server-scraper.md
- **Developed by:** [Louis Deconinck](https://apify.com/louisdeconinck) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 385 total users, 25 monthly users, 100.0% runs succeeded, 14 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$5.00 / 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.

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

This scraper / API will return a comprehensive list of public Discord servers along with their details including member counts, descriptions, categories, and other server information. Discover new Discord communities in your niche, research server trends and growth patterns, analyze successful server configurations, track competitor server metrics, and find collaboration opportunities.

### ✨ Features

- **Complete Server Information**: Extract detailed server data including:
  - Server name and description
  - Member counts and presence information
  - Server categories and tags
  - Server features and settings
  - Vanity URLs
  - Server icons and banners
- **Search Capabilities**: Find servers based on keywords or categories
- **Pagination Support**: Handle large result sets efficiently
- **Clean JSON Output**: Results in easily parseable JSON format

### 💡 Use Cases

- **Server Discovery**: Find Discord servers matching specific interests or categories
- **Community Research**: Analyze server sizes and engagement levels
- **Market Research**: Track popular server categories and trends
- **Competition Analysis**: Monitor similar servers in your niche
- **Growth Insights**: Study successful server configurations and features

### 📊 Output Format

The scraper provides detailed server data in JSON format with the following fields:

- `id`: Unique server identifier
- `name`: Server name
- `description`: Server description
- `icon`: Server icon
- `splash`: Server splash
- `banner`: Server banner
- `approximate_presence_count`: Number of online members
- `approximate_member_count`: Total member count
- `premium_subscription_count`: Server boost count
- `preferred_locale`: Primary server language
- `auto_removed`: Whether the server is auto-removed
- `discovery_splash`: Server discovery splash
- `primary_category_id`: Primary server category
- `vanity_url_code`: Custom invite URL (if any)
- `is_published`: Whether the server is published
- `keywords`: Array of server tags/keywords
- `features`: Array of enabled server features
- `categories`: Array of server categories
- `primary_category`: Primary server category
- `objectID`: Unique server identifier

Example output:

```json
{
	"id": "662267976984297473",
	"name": "Midjourney",
	"description": "The official server for Midjourney, a text-to-image AI where your imagination is the only limit.",
	"icon": "39128f6c9fc33f4c95a27d4c601ad7db",
	"splash": "4798759e115d2500fef16347d578729a",
	"banner": "63249e6867f276efc07d32793b7b3b5a",
	"approximate_presence_count": 1353819,
	"approximate_member_count": 21165793,
	"premium_subscription_count": 569,
	"preferred_locale": "en-US",
	"auto_removed": false,
	"discovery_splash": "4798759e115d2500fef16347d578729a",
	"primary_category_id": 5,
	"vanity_url_code": "midjourney",
	"is_published": true,
	"keywords": [
		"AI",
		"artificial intelligence",
		"art",
		"creativity",
		"future"
	],
	"features": [
		"COMMUNITY",
		"DISCOVERABLE",
		"ENABLED_DISCOVERABLE_BEFORE",
		"PREVIEW_ENABLED",
		"VERIFIED",
		"WELCOME_SCREEN_ENABLED"
	],
	"categories": [
		{
			"id": 3,
			"is_primary": true,
			"name": "Entertainment",
			"name_localizations": {}
		},
		{
			"id": 4,
			"is_primary": true,
			"name": "Creative Arts",
			"name_localizations": {}
		},
		{
			"id": 38,
			"is_primary": false,
			"name": "Collaboration",
			"name_localizations": {}
		},
		{
			"id": 40,
			"is_primary": false,
			"name": "Wiki & Guide",
			"name_localizations": {}
		},
		{
			"id": 5,
			"is_primary": true,
			"name": "Science & Tech",
			"name_localizations": {}
		}
	],
	"primary_category": {
		"id": 5,
		"is_primary": true,
		"name": "Science & Tech",
		"name_localizations": {}
	},
	"objectID": "662267976984297473",
	"_highlightResult": {}
}
```

### 🛠️ Configuration Options

| Parameter | Type | Description |
|-----------|------|-------------|
| keywords | Array | Array of keywords to search for Discord servers |
| category | String | Filter servers by category (optional, default is all categories, options: Gaming, Entertainment, Education, Science & Tech, Music) |

If `category` is provided, the scraper will only search for servers with the given `keywords` in the specified category.

There is a limit of 3,000 servers per `keyword`. When no `category` is provided, the scraper will loop through all categories and fetch servers for each category, up to 3,000 servers per category, so a maximum total of 15,000 servers will be fetched.

The scraper automatically handles:

- Proxy rotation to avoid rate limiting
- Pagination
- Retries on failure

### 📈 Benefits

- Discover new Discord communities in your niche
- Research server trends and growth patterns
- Analyze successful server configurations
- Track competitor server metrics
- Find collaboration opportunities

### ⚙️ Workings

The scraper uses Discord's API to search for and fetch public server information. It utilizes Discord's discovery API to find servers matching your keywords, then retrieves detailed information about each server including member counts, descriptions, and features. The scraper uses proxies to avoid Discord's rate limits and includes automatic retries for failed requests. All data is processed and returned in a clean, structured JSON format that preserves the complete server information.

### 💪 Why Choose This Scraper?

- **Comprehensive**: Captures all public server details and metadata
- **Efficient**: Smart pagination and batch processing
- **Flexible**: Search by keywords or browse categories
- **Up-to-date**: Maintained and updated regularly
- **Support**: Backed by Apify's excellent customer service

Ready to discover and analyze Discord servers? Start scraping now! 🚀

# Actor input Schema

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

Keywords to search for servers. If not provided, all servers will be scraped (max. 3,000 servers per category).

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

Filter servers by category. If not provided, all categories will be scraped.

## Actor input object example

```json
{}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("louisdeconinck/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 = {}

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

```

## MCP server setup

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