VOOZH about

URL: https://apify.com/louisdeconinck/discord-scraper

โ‡ฑ Discord Message Scraper ยท Apify


Pricing

$18.00/month + usage

Go to Apify Store

Discord Message Scraper

Effortlessly extract and analyze complete message histories from channels and DMs. Gain insights into community engagement, track communication patterns, and export valuable contentโ€”all in a clean, structured JSON format. Unlock the full potential of your Discord data with our advanced scraper!

Pricing

$18.00/month + usage

Rating

5.0

(2)

Developer

๐Ÿ‘ Louis Deconinck

Louis Deconinck

Maintained by Community

Actor stats

10

Bookmarked

172

Total users

5

Monthly active users

55 days

Issues response

6 months ago

Last modified

Share

Extract and analyze Discord channel and direct message history with ease. This scraper / API will return a comprehensive list of messages from your Discord conversations, including text content, attachments, and participant information.

โœจ Features

  • Complete Message History: Extract detailed message data including:
    • Message content
    • Sender information
    • Timestamps
    • Attachments and embeds
    • Reactions
  • Channel & DM Support: Get messages from both servers and private conversations
  • Clean JSON Output: Results in easily parseable JSON format

๐Ÿ’ก Use Cases

  • Community Analysis: Track engagement and activity in Discord servers
  • Data Analysis: Analyze communication patterns and chat history
  • Message Search: Find specific messages across channels and DMs
  • Chat Statistics: Generate insights about messaging habits
  • Content Export: Save important information shared in servers

๐Ÿ“Š Output Format

The scraper provides detailed message data in JSON format with the following fields:

  • id - Unique message identifier
  • content - The message text contents
  • type - Message type (0 for normal messages)
  • channel_id - ID of the channel where the message was sent
  • author - Detailed information about the message sender:
    • id - User's Discord ID
    • username - User's display name
    • global_name - User's global display name
    • discriminator - User's discriminator
    • avatar - Avatar hash
  • timestamp - When the message was sent (ISO 8601 format)
  • edited_timestamp - When the message was last edited (null if never edited)
  • attachments - Array of attached files
  • embeds - Array of rich embeds in the message
  • mentions - Array of mentioned users
  • mention_roles - Array of mentioned roles
  • pinned - Whether the message is pinned
  • mention_everyone - Whether the message mentions @everyone/@here
  • flags - Message flags (e.g., crossposted, urgent, etc.)
  • components - Message components (buttons, select menus, etc.)

Example output:

{
"type":0,
"content":"Hello @here ๐Ÿ‘‹ \n\nWelcome to the channel dedicated for intros and chat between community members. For support go to the relevant support section.\n\nI will start with an introduction ๐Ÿ˜„\n\nI am Saurav Jain from Delhi, India. ๐Ÿ‡ฎ๐Ÿ‡ณ \n\nI am the Developer Community Manager at Apify. You will see my replying to everybody in the community, helping members using our products, hosting events, and much more.\n\nFeel free to tag me in your messages, would love to interact with everyone. โค๏ธ",
"mentions":[],
"mention_roles":[],
"attachments":[],
"embeds":[],
"timestamp":"2024-02-12T12:32:13.826000+00:00",
"edited_timestamp":null,
"flags":0,
"components":[],
"id":"1206578509569593364",
"channel_id":"1206131794261315594",
"author":{
"id":"636370983460274219",
"username":"sauain",
"avatar":"6a6cb07c7deaace0278061593f8979c0",
"discriminator":"0",
"public_flags":64,
"flags":64,
"banner":null,
"accent_color":null,
"global_name":"Saurav Jain",
"avatar_decoration_data":null,
"banner_color":null,
"clan":null,
"primary_guild":null
},
"pinned":false,
"mention_everyone":true,
"tts":false
}

๐Ÿ› ๏ธ Configuration Options

ParameterTypeDescription
channelUrlsArrayArray of Discord channel URLs to scrape. Must be in format: https://discord.com/channels/SERVER_ID/CHANNEL_ID for server channels or https://discord.com/channels/@me/CHANNEL_ID for DMs
authTokenStringYour Discord authorization token (required)
maxMessagesPerChannelIntegerMaximum number of messages to scrape per channel (optional, empty means unlimited)

The scraper automatically handles:

  • Rate limiting (50 requests per second)
  • Pagination (fetches all messages in batches of 100)
  • Retries on failure (up to 3 retries per request)

๐Ÿ”‘ Obtaining Your Discord Authentication Token

In order for the scraper to work, you need to obtain your Discord authentication token. There are three possible ways to get it: through the Network section of the browser's Developer Tools, by pasting some JavaScript code in the browser console or through a browser extension. All three methods are described below.

The token looks something like this: MTk4NjI0MzY5ODc1NDMyOTYw.HjKL9_.QWxZcVBnTmFsUHFaWXhDdkJyTnE2RHNqS3M0-8

Javascript Browser Console

  1. Go to Discord and make sure you are logged in: https://discord.com/channels/@me
  2. Open Developer Tools by one of these three methods:
    • Press 'F12' on your keyboard
    • Press 'Ctrl + Shift + I' on your keyboard (Cmd + Shift + I on Mac)
    • Press '...' in the top right corner of the browser and select 'More tools' -> 'Developer tools'
  3. Go to the 'Console' tab
  4. Paste the following code:
webpackChunkdiscord_app.push([[Symbol()],{},e=>{t=Object.values(e.c).find(x=>x?.exports?.default?.getToken)?.exports?.default?.getToken();console.log(t);copy(t);}]);
  1. Press 'Enter'
  2. The token will be automatically copied to your clipboard and also printed in the console

Browser Extension Method

These are third party extensions that will get you the token. We are not affiliated with them.

Developer Tools: Network Tab

  1. Go to Discord and make sure you are logged in: https://discord.com/channels/@me
  2. Open Developer Tools by one of these three methods:
    • Press 'F12' on your keyboard
    • Press 'Ctrl + Shift + I' on your keyboard (Cmd + Shift + I on Mac)
    • Press '...' in the top right corner of the browser and select 'More tools' -> 'Developer tools'
  3. Go to the 'Network' tab
  4. Click on the 'Fetch/XHR' tab
  5. Refresh the page
  6. Look for a request with the name '@me'
  7. Find the 'Authorization' header in the 'Request Headers' section
  8. Copy the token value associated with 'Authorization'

๐Ÿš€ Getting Started

  1. Obtain your Discord authentication token
  2. Gather the channel URLs you want to scrape
  3. Run the actor and receive your data in JSON or CSV format

๐Ÿ“ˆ Benefits

  • Efficiently extract message history from multiple channels
  • Get structured, analyzable conversation data
  • Track community engagement and growth
  • Generate insights from server activity

โš™๏ธ Workings

The scraper uses Discord's API with your authentication token to access specified channels and DMs. It fetches message history in batches of 100 messages at a time, automatically handling pagination to retrieve the complete history. The scraper respects Discord's rate limits (50 requests per second) and includes automatic retries for failed requests. All data is processed and returned in a clean, structured JSON format that preserves the complete message context including attachments, embeds, and user information.

๐Ÿ”’ Privacy & Compliance

  • The scraped data is only accessible to you
  • Only accesses channels and DMs you have permission to view
  • Requires valid Discord authentication
  • Respects Discord's rate limits and terms of service

๐Ÿ’ช Why Choose This Scraper?

  • Reliable: Built on Apify's robust infrastructure
  • Comprehensive: Captures all message details and metadata
  • Flexible: Configurable parameters for specific needs
  • Up-to-date: Maintained and updated regularly
  • Support: Backed by Apify's excellent customer service

Ready to extract your Discord chat history? Start scraping now! ๐Ÿš€

You might also like

Discord Message Scraper

jungle_synthesizer/discord-message-scraper

Scrape messages from Discord channels

๐Ÿ‘ User avatar

BowTiedRaccoon

218

Discord Message Scraper

vulnv/discord-message-scraper

Export Discord messages and chat history. Download conversations from any channel, backup servers, archive threads, and analyze community data. Filter by date range and user. Perfect for data analysis and archival.

Discord Channel Messages Scraper

felt/discord-message-scraper

Scraping messages from Discord channels.

Discord Server Scraper

louisdeconinck/discord-server-scraper

Discover niche communities, analyze server trends, and gain competitive insights with detailed data on member counts, categories, and more. Efficient, flexible, and up-to-dateโ€”start exploring today & unlock the full potential of Discord with our comprehensive server scraper! ๐Ÿš€

๐Ÿ‘ User avatar

Louis Deconinck

263

5.0

Discord Scraper (Members and Messages)

curious_coder/discord-data-scraper

Scrape discord server members and messages with attachments from any channel.

1.2K

4.6

Discord Scraper โ€” Servers, Members & Channels

khadinakbar/discord-all-in-one-scraper

Resolve any Discord invite URL/code/vanity to full server profile or search Disboard + Top.gg by keyword. Returns member count, online count, features, verification level, premium tier, banner, channels, emojis, stickers. Auth-free. MCP-ready.

Discord Invite Parser

rixin/discord-invite-parser

Powerful Discord Invite Parser actor for Apify. Automatically extracts and validates Discord invite codes/URLs to fetch real-time guild data like name, total/online member counts, description, and vanity details. Perfect for community research and server monitoring.

Discord Member Scraper

louisdeconinck/discord-member-scraper

Get a list of all members in a Discord server, with detailed profile information such as social media profiles, name, bio & avatar. Perfect for analytics, lead generation, and community insights. Efficient, reliable, and up-to-date.

๐Ÿ‘ User avatar

Louis Deconinck

409

1.2

Related articles

How to use the Discord API in Python
Read more