Discord Message Scraper avatar

Discord Message Scraper

Pricing

from $0.20 / 1,000 message scrapeds

Go to Apify Store
Discord Message Scraper

Discord Message Scraper

Scrape Discord channels, whole servers and threads with your own bot token via the official API. Messages, authors, attachments, reactions, replies, new-messages-only mode. MCP-ready.

Pricing

from $0.20 / 1,000 message scrapeds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

9

Total users

1

Monthly active users

6 days ago

Last modified

Features

Limited permissions

Share

What is Discord Message Scraper?

Discord Message Scraper reads messages from your own Discord server — one channel, many channels, or the whole server including threads and forum posts — through Discord's official API with your own bot token. Each message becomes one clean row: text, author, time, attachments, reactions, embeds, polls, replies and a link back to the message. Run it again later and get only the new messages.

Why people use it

  • Back up or archive a community's history to JSON, CSV or Excel.
  • Feed support, feedback and chat history to an AI agent or search index.
  • Monitor your own channels on a schedule and get only what is new.
  • Track questions, feature requests and bug reports from your community.

Bot token only. User tokens ("self-bots") break Discord's rules, so they are not supported. Your bot reads only the channels it was added to — nothing is bypassed.

What data do you get?

FieldExample
messageId, jumpUrl1180000000000000001, link to the message
channelName, channelId, guildIdgeneral
isThread, parentChannelNametrue, support
authorUsername, authorGlobalName, authorIsBotmaya, Maya R., false
content, contentReadabletext, and text with @names instead of ids
timestamp, editedTimestamp, scrapedAtISO times
attachments, embeds, reactions, pollfull arrays (concise mode: counts only)
replyToMessageId, referencedMessagethe message this one replies to

How much does it cost?

You pay per message saved (plus a tiny start fee). The price drops with your Apify plan:

Apify planPer message100 messages1,00010,000
Free$0.0003$0.03$0.30$3.00
Bronze$0.00027$0.027$0.27$2.70
Silver$0.00024$0.024$0.24$2.40
Gold$0.0002$0.020$0.20$2.00

Platform usage is included in the price. Set a maximum charge per run in Apify and the Actor stops cleanly at that limit — it never saves (or charges) more than you allow. The default is 100 messages per channel, so a first test costs a few cents.

Set up your bot in 5 steps

  1. Open discord.com/developers/applications → New Application.
  2. Bot tab → Reset Token → copy it into the Discord token field. Turn Message Content Intent ON (without it, message text comes back empty).
  3. OAuth2 → URL Generator: tick bot, then permissions View Channels and Read Message History. Open the generated link and add the bot to your server.
  4. In Discord: Settings → Advanced → Developer Mode ON. Right-click a channel → Copy Channel ID (or the server icon → Copy Server ID).
  5. Paste the ID into Channel IDs or Server IDs and run.

Input

FieldWhat it does
discordTokenYour bot token (secret, never logged).
channelsChannel IDs or discord.com/channels URLs.
serverIdsScrape every readable text channel in these servers.
includeThreadsAlso read active + archived public threads and forum posts (default on).
maxMessagesPerChannelCap per channel/thread (default 100).
maxMessagesTotalHard stop for the whole run.
sinceLastRun + stateKeyReturn only messages newer than the previous run with the same name.
concurrencyChannels read in parallel (default 4).
beforeDate / afterDate, beforeMessageId / afterMessageIdTime or ID window.
filterFromUserId, filterContains, onlyWithAttachmentsKeep only matching messages.
responseFormatdetailed or concise.

Example

{
"discordToken": "YOUR_BOT_TOKEN",
"serverIds": ["998877665544332211"],
"includeThreads": true,
"maxMessagesPerChannel": 500,
"maxMessagesTotal": 5000,
"sinceLastRun": true,
"stateKey": "support-server"
}

Only new messages (monitoring)

Turn on sinceLastRun. The first run reads normally and remembers the newest message in each channel (stored privately in your Apify account). Later runs with the same stateKey return only newer messages, oldest first. Hit a cap? The next run continues exactly where the last one stopped — no gaps, no duplicates. Schedule it hourly or daily.

Use with AI agents (MCP)

The Actor is MCP-ready. Besides the dataset, every run writes an OUTPUT record with an agentSummary — message count, channels, date range, top authors and a hint for the next call — so an agent can answer "what happened?" without reading every row. Use responseFormat: "concise" to keep rows small.

API example

curl -X POST "https://api.apify.com/v2/acts/khadinakbar~discord-message-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"discordToken":"YOUR_BOT_TOKEN","channels":["112233445566778899"],"maxMessagesPerChannel":100}'

FAQ

Why is content empty? Message Content Intent is off for your bot (step 2).

Does it read DMs or private channels? Only channels your bot can already see. Add the bot to the server and give it View Channel + Read Message History.

Why was a channel skipped? The bot lacks access (403) or the channel was deleted (404). You get a warning in the run summary and the rest still run — the run is marked partial.

How do I know what happened? OUTPUT and RUN_SUMMARY list the result: COMPLETE, PARTIAL, VALID_EMPTY, INVALID_INPUT (nothing charged) or UPSTREAM_FAILED (for example a bad token).

How fast is it? Discord limits requests per channel, so speed comes from reading several channels in parallel (concurrency).

Responsible use

Use only a bot you own, on servers where you are allowed to read and store messages. Follow Discord's Terms of Service and Developer Policy and the privacy rules that apply to your community (including telling members that history is archived, where required). Keep your token secret.