Discord Message Scraper avatar

Discord Message Scraper

Pricing

from $0.30 / 1,000 messages scrapeds

Go to Apify Store
Discord Message Scraper

Discord Message Scraper

Scrape messages from Discord channels

Pricing

from $0.30 / 1,000 messages scrapeds

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

5

Bookmarked

167

Total users

13

Monthly active users

2 days ago

Last modified

Categories

Share

Extract message history and channel data from Discord servers. Returns full message content, author info, timestamps, attachments, and embeds — from a single channel or every text channel in a guild. Supports cursor-based pagination and automatic resume between runs.


Discord Message Scraper Features

  • Scrape messages from any channel your token has access to, with configurable limits
  • Bulk-scrape all text channels in a guild in a single run
  • List all channels in a guild with metadata (type, name, permissions, position)
  • Resume where you left off — cursors are saved automatically between runs, so scheduled jobs only fetch new messages
  • Paginate forward or backward through message history using before or after cursors
  • Pure API scraping — no browser, no proxies, 128MB memory default. Runs are cheap.
  • Clear error messages for invalid tokens, inaccessible channels, and rate limits — no cryptic stack traces

What Can You Do With Discord Data?

  • Community analysts — Track conversation volume, active users, and engagement patterns across channels
  • Compliance teams — Archive message history for audit trails or regulatory requirements
  • Researchers — Collect discussion data for sentiment analysis, topic modeling, or discourse studies
  • Server admins — Back up important channels before restructuring or archiving a server
  • Lead gen teams — Monitor niche Discord communities for market signals and prospect identification
  • AI/ML engineers — Build training datasets from public Discord conversations

How Discord Message Scraper Works

  1. Provide a channel ID, your Discord token, and pick an action (scrape messages, list channels, or bulk-scrape a guild).
  2. The scraper hits Discord's API directly, paginates through results, and saves a cursor so your next run picks up where this one stopped.
  3. Output lands in the Apify dataset as structured JSON — one object per message or channel.

Input

Scrape messages from a channel

{
"action": "Scrape Messages",
"channelId": "1206131794261315594",
"token": "YOUR_DISCORD_TOKEN",
"limit": 1000,
"cursorType": "after"
}

List all channels in a guild

{
"action": "Scrape Channel List for Guild",
"channelId": "1206131794261315594",
"token": "YOUR_DISCORD_TOKEN"
}

Bulk-scrape all text channels in a guild

{
"action": "Scrape Messages for Guild",
"channelId": "1206131794261315594",
"token": "YOUR_DISCORD_TOKEN",
"limit": 500
}
FieldTypeRequiredDefaultDescription
actionstringYes"Scrape Messages", "Scrape Channel List for Guild", or "Scrape Messages for Guild"
channelIdstringYesNumeric Discord channel ID. Not a URL — find it in Discord's developer mode settings.
tokenstringYesDiscord user or bot token. Stored securely, never logged.
limitintegerNo100Maximum messages to fetch (per channel in guild mode).
cursorTypestringNo"after"Pagination direction: "before" (older messages) or "after" (newer messages).
cursorstringNonullMessage ID to start from. Usually handled automatically via saved cursors.

Discord Message Scraper Output Fields

Scrape Messages

Each message is a full Discord message object with all metadata intact.

{
"id": "1168007238766559311",
"type": 0,
"content": "Give me a fun picture",
"channel_id": "1143396487057899611",
"timestamp": "2023-10-29T02:03:46.247000+00:00",
"edited_timestamp": null,
"author": {
"id": "936929561302675456",
"username": "Midjourney Bot",
"global_name": null,
"bot": true
},
"attachments": [],
"embeds": [],
"mentions": [],
"mention_roles": [],
"pinned": false,
"tts": false,
"flags": 0
}
FieldTypeDescription
idstringUnique message snowflake ID
contentstringMessage text content
channel_idstringChannel the message belongs to
timestampstringISO 8601 timestamp
edited_timestampstring|nullWhen the message was last edited, if ever
authorobjectAuthor with id, username, global_name, bot flag
attachmentsarrayFiles attached to the message (images, documents, etc.)
embedsarrayRich embeds (links, media previews)
mentionsarrayUsers mentioned in the message
mention_rolesarrayRoles mentioned
pinnedbooleanWhether the message is pinned
ttsbooleanText-to-speech flag
flagsintegerDiscord message flags bitmask

Scrape Channel List for Guild

{
"id": "1143396487057899613",
"type": 0,
"name": "general",
"guild_id": "1143396486411984942",
"parent_id": "1143396487057899611",
"position": 0,
"nsfw": false,
"rate_limit_per_user": 0,
"permission_overwrites": []
}
FieldTypeDescription
idstringChannel snowflake ID
typeintegerChannel type (0 = text, 2 = voice, 4 = category, etc.)
namestringChannel name
guild_idstringParent guild ID
parent_idstring|nullParent category channel ID
positionintegerDisplay position in the channel list
nsfwbooleanWhether the channel is marked NSFW
permission_overwritesarrayPermission override objects

FAQ

How do I scrape Discord messages?

Discord Message Scraper takes a channel ID and your Discord token, then fetches messages via Discord's API. Set the action to "Scrape Messages", provide the channel ID (the numeric one — right-click the channel in Discord with developer mode on), and set a limit. The scraper handles pagination automatically.

How much does Discord Message Scraper cost?

Discord Message Scraper charges $0.0003 per message scraped and $0.0003 per channel scraped. A run that fetches 1,000 messages costs about $0.30. There is no monthly fee — you pay only for what you scrape.

Can I scrape an entire Discord server?

Discord Message Scraper supports guild-wide scraping. Set the action to "Scrape Messages for Guild" and provide any channel ID from that server. The scraper discovers all text channels in the guild and fetches messages from each one, up to your configured limit per channel.

Does Discord Message Scraper handle pagination automatically?

Discord Message Scraper saves a cursor after every run. On the next run with the same channel ID and token, it picks up from where it left off — no manual cursor management needed. This makes it straightforward to set up scheduled runs that only fetch new messages.

What happens if my token is invalid or I don't have channel access?

Discord Message Scraper validates your input and returns clear error messages. An expired token gets "Invalid or expired Discord token." A channel you can't access gets "Access denied to channel [id]." These appear in your dataset output instead of a cryptic crash, which is more than most scrapers offer.


Need More Features?

Need date filtering, attachment downloads, or DM scraping? File an issue or get in touch.

Why Use Discord Message Scraper?

  • Pay per message — No monthly subscription. 1,000 messages cost $0.30. Scale up or down without commitment.
  • Automatic resume — Cursor management is built in. Scheduled runs fetch only new messages, which means you're not paying to re-scrape the same data.
  • Clean errors — Bad tokens and inaccessible channels return human-readable messages in your dataset, not stack traces and FAILED status codes.