# Discord Server Invite Info Scraper (`zerobreak/discord-server-invite-info-scraper`) Actor

Discord Server Invite Info Scraper is a Python tool to extract server names, guild IDs, approximate member counts, online user counts, and descriptions from public Discord invite links or codes. It exports structured community intelligence datasets into clean CSV or JSON formats

- **URL**: https://apify.com/zerobreak/discord-server-invite-info-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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 Server Invite Info Scraper — Public Server Details and Community Statistics

![Discord Server Invite Info Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/discord-server-invite-info-scraper-cover.png)

### Overview

Collect publicly available Discord server information using invite codes or Discord invite links. This actor retrieves server names, descriptions, approximate member counts, online presence counts, and invite channel names.

Provide one or more invite codes, set your desired record limit, and export structured results as JSON, CSV, Excel, or other supported Apify dataset formats.

### Features

- Resolve Discord invite codes and invite links.
- Retrieve server names and descriptions.
- Collect server and guild identifiers.
- Extract approximate member counts.
- Retrieve approximate online presence counts.
- Collect invite channel names.
- Support multiple invite codes in one run.
- Remove duplicate invite codes.
- Export structured server information.

### Collection Mode

| Mode | Description |
|---|---|
| `inviteInfo` | Retrieves publicly available server information associated with each supplied invite code. |

### Input Parameters

| Parameter | Description | Example |
|---|---|---|
| `mode` | Collection mode. | `inviteInfo` |
| `inviteCodes` | Array of Discord invite codes or full invite links. | `["python"]` |
| `maxItems` | Maximum number of records to collect. | `10` |
| `requestDelayMs` | Delay between requests in milliseconds. | `1000` |

The maximum supported `maxItems` value is 1,000.

### Example Input

```json
{
  "mode": "inviteInfo",
  "inviteCodes": [
    "python",
    "https://discord.gg/python"
  ],
  "maxItems": 10,
  "requestDelayMs": 1000
}
```

### What Data Does This Actor Extract?

Each collected record can include the following fields:

| Field | Description |
|---|---|
| `code` | Discord invite code. |
| `guildId` | Unique server identifier. |
| `guildName` | Discord server name. |
| `guildDescription` | Server description, when available. |
| `approximate_member_count` | Approximate number of server members. |
| `approximate_presence_count` | Approximate number of online or present members. |
| `channel` | Name of the invite channel. |
| `scrapedAt` | Date and time the record was collected. |

### Example Output

```json
{
  "code": "python",
  "guildId": "267624335836053506",
  "guildName": "Python",
  "guildDescription": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
  "approximate_member_count": 432005,
  "approximate_presence_count": 45841,
  "channel": "welcome",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Use Cases

- **Community research:** Review server sizes and approximate online activity.
- **Invite verification:** Identify the server associated with an invite before sharing it.
- **Server directories:** Build organized lists of public Discord communities.
- **Community discovery:** Find servers by resolving known invite codes.
- **Data enrichment:** Add server names, descriptions, and member statistics to existing datasets.
- **Scheduled monitoring:** Refresh public server statistics periodically.

### Working with Your Dataset

Export collected records as JSON, CSV, Excel, or another supported Apify dataset format.

You can use the results to:

- Build Discord server directories.
- Compare approximate member counts across communities.
- Organize invite codes with their corresponding server details.
- Enrich community research datasets.
- Track changes in publicly available server statistics.

### FAQ

**Who is this actor for?**

It is designed for researchers, community managers, marketers, and developers who need structured information about public Discord servers.

**What can I export?**

You can export records as JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I provide full Discord invite links?**

Yes. You can provide either an invite code or a full Discord invite link.

**Can I submit multiple invites in one run?**

Yes. Add multiple invite codes or links to the `inviteCodes` array.

**Are member and online counts exact?**

No. Discord provides approximate member and presence counts, so these values may differ from exact real-time totals.

**How many invites can one run process?**

You can collect up to 1,000 records per run. Use `maxItems` to control the collection size.

**Can I run it on a schedule?**

Yes. You can configure an Apify schedule to refresh server information periodically.

### Disclaimer

This is an independent data collection tool and is not affiliated with, endorsed by, sponsored by, or officially associated with Discord. It collects publicly available invite and server information. Users are responsible for respecting Discord's terms, applicable privacy laws, and copyright requirements when accessing, storing, or reusing collected information.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to scrape. Invite info fetches server name and member counts for each invite code.

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

Invite codes or discord.gg / discord.com/invite URLs.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait between requests. Raise if you see HTTP 429.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "inviteInfo",
  "inviteCodes": [
    "python"
  ],
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

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

Full dataset for this run.

## `items` (type: `string`):

Dataset items as 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 = {
    "inviteCodes": [
        "python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/discord-server-invite-info-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 = { "inviteCodes": ["python"] }

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

```

## MCP server setup

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