# Discord Server Search (`datahamster/discord-server-search`) Actor

Discord server search by keyword: public servers with live member and online counts, description, verified and partnered flags, boost tier and a working invite link. Every invite checked on Discord, dead links dropped, one row per server, new-server monitor. No login, no bot token.

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

## Pricing

from $2.24 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Server Search

Find public Discord servers by keyword and get one row per server with numbers read live from Discord at run time: member count, members online now, description, verified and partnered flags, boost tier, server tag, icon and a working invite link. No Discord account, no bot token, no login.

**Try it:** the prefilled example returns 14 rows in about 30 seconds and costs about $0.04. Results cost $2.80 per 1,000.

Coverage: Discord has no public keyword search, so servers are found through public search engines (`site:discord.com/invite <keyword>`). You get the servers whose invite pages the open web has indexed, typically 7 per result page; big and active communities are found first. Each invite is then looked up on Discord itself.

### Why this one

- **Live counts from Discord, every invite checked.** Each hit is looked up on Discord's public invite endpoint during your run, so `memberCount` and `onlineCount` are today's numbers and dead or expired invites are dropped (counted as `revokedDropped`). The leader returns servers from its own index and gives invite links "when available".
- **Check your own invite links.** Paste links into `inviteUrls`: each comes back with `status: "active"` and live numbers, or `"revoked"`. The leader's input takes keywords only.
- **New-server monitor.** Run a saved task in `monitor` mode: later runs return only servers that were not found before, and an invite from `inviteUrls` that dies is reported once. Webhook and Telegram summaries are built in. The leader has no monitor mode.
- **One row per server.** Several invites to the same server (vanity link, member invites) and several keywords collapse into one row, keyed by the server id.
- **Relevant rows only.** Search engines answer an unknown keyword with unrelated servers instead of nothing; by default a server is kept only when your keyword occurs in its name, description or invite code (`strictQueryMatch`, can be turned off).
- **Price.** $0.0028 per server and no start fee (the leader charges $0.004 per server plus $0.09 per run).

### What you get

Real rows from the prefilled run (keyword `minecraft`, 9 November 2026):

| Field | Row 1 | Row 2 |
|---|---|---|
| `name` | `MINECRAFT` | `Dawn Client & Launcher` |
| `url` | `https://discord.gg/minecraft` | `https://discord.gg/feather` |
| `description` | `The official Minecraft Discord!` | `Official Discord for the #1 Free Minecraft Client/Launcher: Dawn (Formerly Feather)` |
| `memberCount` | `4237148` | `416295` |
| `onlineCount` | `484538` | `72575` |
| `verified` / `partnered` | `true` / `false` | `false` / `true` |
| `boostTier` | `3` | `3` |
| `tag` | `MC` | `Dawn` |

Fields: `id` (server id), `url` (invite link), `inviteCode`, `serverId`, `name`, `description`, `memberCount`, `onlineCount`, `verified`, `partnered`, `community`, `discoverable`, `boostTier`, `boostCount`, `vanityUrlCode`, `nsfw`, `verificationLevel`, `tag`, `iconUrl`, `bannerUrl`, `features`, `expiresAt`, `status`, `query`, `rank`, `foundVia`, `scrapedAt`.

### Use cases

- Build a list of the Discord communities in a niche (a game, a coin, a language, a city) and sort them by members online.
- Check a sheet of invite links before you publish or promote them, and drop the dead ones.
- Watch a topic and get only the servers that appeared since the last run.

### Related actors

- [Telegram Channel Search Scraper](https://apify.com/datahamster/telegram-channels-search): Telegram channels and groups by keyword with subscriber counts.
- [WhatsApp Group Search](https://apify.com/datahamster/whatsapp-group-search): public WhatsApp group links by keyword, checked live, with member counts.
- [Reddit Scraper](https://apify.com/datahamster/reddit-scraper): subreddit posts and search, the other big community platform.

### How it works

1. **Search.** For each keyword: `site:discord.com/invite <keyword>` on Yahoo (DuckDuckGo as fallback), then `site:discord.gg <keyword>` when the first gives fewer hits than `resultsPerQuery`.
2. **Lookup.** Each invite code is looked up at `discord.com/api/v9/invites/<code>?with_counts=true`, the same public request Discord's invite page makes for a visitor who is not logged in. Rate-limit answers are waited out as Discord asks.
3. **Filter and dedupe** by relevance, size, online count and NSFW; one row per server.

A run where every search or every lookup is refused ends with `emptyReason: "blocked"` (or `rate_limited`) in the run summary, never as an empty "no matches" run.

### Input

| Field | Meaning | Default |
|---|---|---|
| `queries` | Keywords, e.g. `minecraft`, `anime`, `python` | `["minecraft"]` |
| `inviteUrls` | discord.gg / discord.com/invite links or codes to check directly | empty |
| `resultsPerQuery` | Search hits looked up per keyword (1-200) | `20` |
| `minMembers` / `maxMembers` | Member-count bounds | empty |
| `minOnline` | Minimum members online now | empty |
| `strictQueryMatch` | Keyword must occur in name, description or invite | `true` |
| `includeNsfw` | Keep servers Discord marks as NSFW | `true` |
| `maxItems` | Stop after this many rows | `100` |
| `mode` | `scrape`, or `monitor` (only new servers since the last run of this task) | `scrape` |

### Pricing

| Event | Price |
|---|---|
| result | $0.0028 per server ($2.80 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0028 per new server (or dead invite) in monitor mode |

Store discounts: Silver 10% off, Gold and higher 20% off. Platform usage is paid by you and is small: no proxy is used. Dead invites, filtered servers and refused lookups are never charged.

**Found it useful?** A short review on the Store page helps other people find this actor. If something is wrong, open an issue on the actor page.

### Limits

- Discovery depends on the search-engine index: servers whose invite pages were never indexed cannot be found, and the number of servers per keyword is limited by what the engine lists (about 7 per result page, up to 8 pages).
- `memberCount` and `onlineCount` are Discord's approximate counts at the moment of the lookup.
- Discord limits how fast invites can be looked up; the actor waits 1 s between lookups and longer when Discord asks, so 100 servers take a few minutes.
- `strictQueryMatch` (on by default) drops relevant servers whose name and description do not mention the keyword (for example a Minecraft server called only "Hoplite"). Turn it off for broader results.
- Privacy: only server-level data. The invite answer also names the member who created the invite; the actor never reads that field. No member lists, no user ids, no messages.

### FAQ

**Does it need a Discord account or bot token?** No. There is no credential field.

**Why are some servers missing that I see in Discord's own discovery?** Discord's discovery is only inside the app for logged-in users; this actor uses the open web only.

**What happens when nothing is found?** No rows are pushed and nothing is charged. `RUN_SUMMARY` in the run's key-value store says why (`emptyReason`) and how many invites were dead, irrelevant or filtered.

### Changelog

- 0.1: initial release. Keyword discovery through search engines, live invite lookup with member and online counts, dead-invite check for your own links, relevance, size and NSFW filters, new-server monitor.

# Actor input Schema

## `queries` (type: `array`):

Topics to find public Discord servers for, one per line, e.g. "minecraft", "anime", "python", "crypto trading".

## `inviteUrls` (type: `array`):

Invite links you already have, e.g. "https://discord.gg/minecraft" or "discord.com/invite/AbCd123", or bare codes. Each comes back with live counts and status active, or status revoked. Can be combined with Keywords or used alone.

## `resultsPerQuery` (type: `integer`):

How many search hits to look up per keyword, e.g. 20 (about 7 per result page). Dead, duplicate and irrelevant invites are dropped, so the number of rows is usually lower.

## `minMembers` (type: `integer`):

Keep only servers with at least this many members, e.g. 1000. Leave empty for no lower bound.

## `maxMembers` (type: `integer`):

Keep only servers with at most this many members, e.g. 50000 to find smaller communities. Leave empty for no upper bound.

## `minOnline` (type: `integer`):

Keep only servers with at least this many members online at the time of the run, e.g. 100. Leave empty for no bound.

## `strictQueryMatch` (type: `boolean`):

Keep only servers whose name, description or invite code contains at least one word of the keyword. Search engines return unrelated servers for unknown keywords; turn this off for broader results.

## `includeNsfw` (type: `boolean`):

Turn off to drop servers that Discord marks as NSFW.

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

Stop after this many servers (you pay only for returned rows).

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

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "queries": [
    "minecraft"
  ],
  "resultsPerQuery": 14,
  "strictQueryMatch": true,
  "includeNsfw": true,
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

## `results` (type: `string`):

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "queries": [
        "minecraft"
    ],
    "resultsPerQuery": 14,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/discord-server-search").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 = {
    "queries": ["minecraft"],
    "resultsPerQuery": 14,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datahamster/discord-server-search").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 '{
  "queries": [
    "minecraft"
  ],
  "resultsPerQuery": 14,
  "maxItems": 20
}' |
apify call datahamster/discord-server-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datahamster/discord-server-search"
        }
    }
}
```

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/maTaU3eluwGuHLlyB/builds/tSBw4afC8GbXm7ceR/openapi.json
