# Discord Member Scraper (`harvest-edge/discord-member-scraper`) Actor

Easily scrape Discord server members with the Discord Member Scraper, designed for developers and data analysts.
Extract detailed member profiles from a specified Discord guild (server), including usernames, IDs, nicknames, join dates, roles, avatars, and more.

- **URL**: https://apify.com/harvest-edge/discord-member-scraper.md
- **Developed by:** [Harvest Edge](https://apify.com/harvest-edge) (community)
- **Categories:** Lead generation, Social media, E-commerce
- **Stats:** 105 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 1.00 out of 5 stars

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

🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🚜

🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽🌽

Harvest Edge / Discord Member Scraper\
🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱🌱

🌽🌽🌽🌽🍆🌽🌽🌽🌽🚜🌱🌱🌱🌱🌱🌱

Harvest Edge makes business information available to everyone!

***

### 🌾 Overview

Easily scrape Discord **server members** with the **Discord Member Scraper**, a powerful Apify actor designed for developers and data analysts.\
This actor extracts detailed member profiles from a specified Discord guild (server), including usernames, IDs, nicknames, join dates, roles, avatars, and more.\
Ideal for data analytics, community insights, or moderation tools.

> ⚠️ **Important:** This actor uses the Discord API and requires a valid Discord account token.\
> Ensure that your usage complies with Discord’s [Terms of Service](https://discord.com/terms).

***

### 🔑 How to Get Your Token

1. Open Discord in your browser and log into your account.\
   Navigate to: **<https://discord.com/channels/@me>**
2. Press **F12** to open Developer Tools.
3. Go to the **Network** tab.
4. Refresh the page if needed, and find a request to **@me** (you can filter for Fetch/XHR requests).
5. Click it and scroll to **Request Headers**.
6. Locate the field named **Authorization** — the value is your **Discord token**.
7. Copy it carefully and keep it private.

***

### 🌻 Features

- Fetches **all available members** from a specified Discord guild.
- Extracts detailed profile information including:
  - Username, discriminator, nickname, roles, join date, premium info, and more.
- Outputs structured member data to an Apify dataset.
- Includes logging and rate limit protection.
- Built for smooth integration with other Harvest Edge data tools.

***

### ⚙️ Performance

| Metric | Approximate Value |
|--------|-------------------|
| **Execution Time** | ~1–3 minutes for medium-sized servers (depends on member count) |
| **Rate Limit Safety** | 0.1-second delay per user to reduce Discord API strain |
| **Resource Usage** | Optimized for low compute unit consumption |

***

### 🧩 Input

The Actor accepts the following input parameters via the Apify platform:

| Key | Type | Description | Default | Required |
|-----|------|-------------|----------|-----------|
| `guild_id` | String | The ID of the Discord guild (server) to scrape members from. | - | ✅ Yes |
| `token` | String | Your Discord user or bot token for authentication. Ensure compliance with Discord’s Terms of Service. | - | ✅ Yes |

> 💡 You can find your **guild ID** by enabling **Developer Mode** in Discord → right-click the server name → “Copy ID”.

***

### 📤 Output

The Actor outputs a dataset in JSON format with the following fields for each member:

| Field | Description |
|-------|-------------|
| `user_id` | Unique Discord user ID. |
| `username` | The user’s username. |
| `discriminator` | The user’s 4-digit discriminator tag. |
| `global_name` | The global display name, if set. |
| `avatar_url` | URL to the user’s avatar. |
| `nickname` | Server-specific nickname, if any. |
| `joined_at` | The timestamp of when the member joined the guild. |
| `roles` | A semicolon-separated list of the member’s roles. |
| `premium_since` | Timestamp of Nitro boosting (if applicable). |
| `premium_guild_since` | Timestamp of guild-specific premium status (if any). |
| `accent_color` | User’s profile accent color. |
| `banner_url` | URL to the user’s banner image (if available). |
| `bio` | User’s profile bio (if available). |
| `public_flags` | Integer flags representing public user badges. |
| `badges` | A semicolon-separated list of user badges. |

***

#### 🧾 Example Output

````json
{
  "user_id": "123456789012345678",
  "username": "example_user",
  "discriminator": "0420",
  "global_name": "Example",
  "avatar_url": "https://cdn.discordapp.com/avatars/123456789012345678/abcdef1234567890.png",
  "nickname": "ExUser",
  "joined_at": "2025-10-08T14:30:00",
  "roles": "Moderator (987654321098765432); Member (876543210987654321)",
  "premium_since": null,
  "premium_guild_since": null,
  "accent_color": "#FF8800",
  "banner_url": "",
  "bio": "Just here to help.",
  "public_flags": "0",
  "badges": ""
}



# Actor input Schema

## `guild_id` (type: `string`):

The ID of the Discord guild (server) to fetch members from.
## `token` (type: `string`):

Your Discord user account token for authentication.

## 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("harvest-edge/discord-member-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("harvest-edge/discord-member-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 harvest-edge/discord-member-scraper --silent --output-dataset

```

## MCP server setup

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