Discord Server Scraper — Messages, Members & Channels avatar

Discord Server Scraper — Messages, Members & Channels

Pricing

from $3.00 / 1,000 member scrapeds

Go to Apify Store
Discord Server Scraper — Messages, Members & Channels

Discord Server Scraper — Messages, Members & Channels

Export a Discord server with your bot token, including messages, members, channels, roles and full structure. Runs without a proxy; works with Apify MCP and the API.

Pricing

from $3.00 / 1,000 member scrapeds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a month ago

Last modified

Share

What is Discord Server Scraper — Messages, Members & Channels?

Discord Server Scraper exports a Discord server you manage into one structured dataset, using your own bot token. Community managers, server owners, analysts and AI agents use it to back up, audit or analyze a server: it returns the server profile, the full channel and thread tree, roles, members with join dates and role IDs, and channel messages with authors, reactions, attachments and reply links. Every row carries a recordType so one dataset splits cleanly into server, channel, role, member and message tables.

Why server owners choose this Discord exporter

  • Whole-server snapshot in one run. Pick any mix of server, channels, roles, members and messages in resources.
  • Official bot access. It reads through Discord's REST API with a proper bot token, the same permissions model Discord uses for every bot.
  • Message history with context. Message rows include channelName, authorUsername, content, reactions, attachmentUrls and replyToId.
  • Member roster with roles. Member rows include username, displayName, roleIds, joinedAt and an isBot flag.
  • Scoped exports. channelIds, messagesNewerThan, maxMessagesPerChannel and maxMembers keep each export focused.
  • No proxy needed. HTTP-only, so jobs stay light and quick.

Best fit for this Actor

  • Best fit for servers where your bot is already a member and you want a deep export of members and messages.
  • Designed for backups before a restructure, role and membership audits, channel activity analysis, and feeding message history to an LLM.
  • When you want token-free public data such as invite resolution or directory search, start with Discord All-in-One Scraper, then use this Actor for the deep export once your bot joins.
  • When you only need the member roster, continue with Discord Member Scraper; for message history alone, use Discord Message Scraper.

Example workflow: from a server ID to a monthly community report

A community manager starts by adding a bot to their server with View Channels and Read Message History, and turns on the Server Members Intent. They send the serverId with all five resources, maxMembers set to 5000 and maxMessagesPerChannel set to 500. The dataset returns the channel tree, the role list, every member with joinedAt, and recent messages per channel. They export the member rows to a spreadsheet to compare new joins month over month, group message rows by channelName to see which channels are active, then schedule the same input monthly with messagesNewerThan set to the previous report date so each export adds only new messages.

Set up your bot token

  1. In the Discord Developer Portal, create a New Application, open the Bot tab and copy the token.
  2. For member rows, turn on Privileged Gateway Intents → Server Members Intent on the same tab.
  3. Under OAuth2 → URL Generator, choose the bot scope with View Channels and Read Message History, then add the bot to your server.
  4. In Discord, turn on Developer Mode, right-click the server icon and choose Copy Server ID.
  5. Paste the token into Discord bot token (stored as a secret and masked in logs) and the ID into Server (guild) ID.

Input

{
"botToken": "YOUR_DISCORD_BOT_TOKEN",
"serverId": "613425648685547541",
"resources": ["server", "channels", "roles", "members", "messages"],
"channelIds": [],
"maxMessagesPerChannel": 100,
"maxMembers": 1000,
"messagesNewerThan": "2026-01-01",
"includeThreads": true
}
FieldTypeWhat it controls
botTokenstring (secret)Your Discord bot token.
serverIdstringNumeric server (guild) ID.
resourcesarrayAny of server, channels, roles, members, messages. Default all five.
channelIdsarrayLimit messages to these channel IDs; empty means every readable channel.
maxMessagesPerChannelintegerMessages per channel, newest first. Default 100; 0 skips messages.
maxMembersintegerMember cap. Default 1000; 0 skips members.
messagesNewerThanstringISO date; only messages after it.
includeThreadsbooleanInclude active threads in channels and messages. Default true.

Output

recordTypeOne row representsKey fields
serverThe server profilename, description, memberCount, owner, features, verification level, boost tier, icon, createdAt
channelA channel, category, forum or threadid, name, channelType, position, parent, topic
roleA rolename, color, position, permission flags
memberA server memberuserId, username, globalName, displayName, isBot, roleIds, joinedAt, avatarUrl
messageA channel messageid, channelId, channelName, authorUsername, content, createdAt, reactions, attachmentUrls, replyToId

Member row (fictional values):

{
"recordType": "member",
"userId": "80351110224678912",
"username": "river_example",
"globalName": "River",
"displayName": "River",
"isBot": false,
"roleIds": ["41771983423143936"],
"joinedAt": "2024-03-04T18:22:11.000Z",
"avatarUrl": "https://cdn.discordapp.com/avatars/80351110224678912/8342.png",
"serverId": "613425648685547541"
}

Message row (fictional values):

{
"recordType": "message",
"id": "1099999999999999999",
"channelId": "974519864045756446",
"channelName": "general",
"authorUsername": "river_example",
"content": "Release notes are up in #announcements",
"createdAt": "2026-02-01T12:00:00.000Z",
"reactions": [{ "emoji": "rocket", "count": 5 }],
"attachmentUrls": [],
"replyToId": null,
"serverId": "613425648685547541"
}

Pricing

This Actor uses Pay per event plus Apify platform usage. The events are Actor Start (once per run), Member scraped (one per member row) and Message scraped (one per message row). Server, channel and role rows carry no event charge. For example, an export of 1,000 members and 2,000 messages is one start event, 1,000 member events and 2,000 message events, plus the platform usage of that export. Set maxMembers and maxMessagesPerChannel to cap spend. The live Pricing tab on this page shows the current price of each event.

API example

curl -X POST "https://api.apify.com/v2/acts/khadinakbar~discord-server-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"botToken": "YOUR_DISCORD_BOT_TOKEN", "serverId": "613425648685547541", "resources": ["channels", "roles"]}'
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("khadinakbar/discord-server-scraper").call(run_input={
"botToken": "YOUR_DISCORD_BOT_TOKEN",
"serverId": "613425648685547541",
"resources": ["messages"],
"maxMessagesPerChannel": 200,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["recordType"], item.get("channelName"), item.get("content"))

Use with AI agents (MCP)

The Actor is available as apify--discord-server-scraper through Apify MCP for Claude, ChatGPT, Cursor and other MCP clients. Example prompt:

Using my Discord bot token, export the channels and the last 200 messages from each channel of server 613425648685547541, then tell me which five channels were most active and summarize the top themes.

The agent sends serverId, botToken and resources, reads the dataset with get-dataset-items, groups rows by recordType, and counts message rows per channelName. Keep channelId, id and createdAt with each quote for provenance. For cost and scope, ask the agent to set maxMessagesPerChannel and channelIds before it starts.

Best results

Starting situationHelpful actionExpected outcome
You want member rowsTurn on the Server Members Intent for your botA full member roster with roles and join dates
Only a few channels matterList them in channelIdsFocused message history and lower spend
Monthly reportingSchedule with messagesNewerThan set to the last reportOnly new messages each time
Structure auditSet resources to ["server", "channels", "roles"]A structural snapshot with no event charges beyond the start
Messages for an LLMKeep includeThreads on and read content with channelNameThreaded conversation context

Each channel's message rows reflect the bot's permissions there, so grant Read Message History on every channel you want exported.

Builder's note

I built this as the authenticated companion to the token-free Discord tools, because the questions server owners actually ask, who joined, which roles they hold and what each channel talks about, live behind bot permissions. I chose a single dataset with a recordType on every row so a whole server lands in one place and still splits into clean tables, and I kept structural rows free so audits stay cheap.

FAQ

Do I need a bot token?

Yes. Members and messages are readable through a bot that has joined the server. For public invite and directory data with no token, use Discord All-in-One Scraper.

Why are member rows missing?

Turn on the Server Members Intent for your bot in the Developer Portal. The rest of the export continues while the intent is off.

Is this a self-bot?

No. It uses a proper bot token through Discord's official REST API. Use bot tokens only; user tokens are against Discord's terms.

Responsible use

Use only bot tokens you control on servers you are authorized to access. Member and message data is personal data, so follow Discord's Terms of Service and Developer Terms and applicable privacy laws such as the GDPR and CCPA, and keep exports no longer than you need. The Actor reads only what your bot is permitted to see. Discord is a trademark of Discord Inc.; this independent Actor is not affiliated with or endorsed by Discord.