Slack Message Scraper avatar

Slack Message Scraper

Pricing

Pay per event

Go to Apify Store
Slack Message Scraper

Slack Message Scraper

Extract messages from Slack channels using browser tokens. Supports public/private channels, DMs, threads, and reactions. No OAuth app required.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

13

Total users

3

Monthly active users

11 hours

Issues response

7 days ago

Last modified

Share

Extract messages from Slack channels using browser tokens. Supports public channels, private channels, DMs, group messages, threads, reactions, and file attachments. No OAuth app installation required.

How It Works

This actor uses the Slack Web API with browser tokens (the same approach used by slackdump) to extract messages from any Slack channel you have access to. You provide your browser token and cookie, and the actor handles pagination, rate limiting, and user resolution automatically.

Two actions are available:

  • Scrape Messages -- Extract messages from a specific channel, with optional thread replies, user details, and date filtering
  • Scrape Channel List -- List all channels accessible to your account (public, private, DMs, group messages)

Authentication Setup

The actor requires two credentials from your Slack browser session:

1. Get your Slack Token (xoxc-...)

  1. Open Slack in your web browser at https://app.slack.com
  2. Open DevTools (F12 or Ctrl+Shift+I)
  3. Go to Application > Local Storage > https://app.slack.com
  4. Search for a value starting with xoxc-
  5. Copy the entire value
  1. In the same DevTools window, go to Application > Cookies > https://app.slack.com
  2. Find the cookie named d
  3. Copy its value (starts with xoxd-)

Finding a Channel ID

  1. Open the channel in Slack
  2. Right-click the channel name and select Copy link
  3. Paste the whole link into channelId -- the channel ID is read out of it for you. You can also paste just the ID (e.g., C01ABCDEF from https://workspace.slack.com/archives/C01ABCDEF)

Channel IDs start with C (channel), G (private group) or D (direct message). A channel name such as #general will not work, and neither will a workspace ID starting with T. Run the actor once with Scrape Channel List to get the ID of every conversation your account can reach.

Input Parameters

ParameterTypeRequiredDefaultDescription
actionstringYes-Scrape Messages or Scrape Channel List
tokenstringYes-Slack browser token (xoxc-...)
cookiestringYes-Slack d cookie (xoxd-...)
channelIdstringFor messages-Channel ID (e.g., C01ABCDEF) or the channel link from Copy link
maxItemsintegerNo100Maximum messages to extract (0 = no limit)
includeThreadRepliesbooleanNofalseFetch all replies for threaded messages
includeUserDetailsbooleanNotrueResolve user IDs to display names
oldestTimestampstringNo-Only fetch messages after this date -- YYYY-MM-DD, a full ISO timestamp, or a Slack message ts
latestTimestampstringNo-Only fetch messages before this date -- same formats as above

If a value cannot be used -- a channel name where an ID belongs, a date the actor cannot read, a token and cookie swapped between the two fields -- the run says exactly which one and what to do about it, on the run status and in the output. It never comes back as a green run with an empty table.

Output Fields

Each message record includes:

FieldTypeDescription
channel_idstringSlack channel ID
channel_namestringChannel name
channel_typestringpublic_channel, private_channel, im, mpim, or group
channel_purposestringThe channel's stated purpose, as set in Slack
channel_is_archivedbooleanWhether the channel has been archived
channel_is_memberbooleanWhether your account is a member of the channel
message_tsstringSlack message timestamp (unique ID)
thread_tsstringParent message timestamp (if threaded reply)
textstringMessage text content
user_idstringAuthor's Slack user ID
user_namestringAuthor's display name
user_real_namestringAuthor's real name
message_typestringMessage type (message, bot_message, etc.)
subtypestringMessage subtype (channel_join, file_share, etc.)
reactionsarrayEmoji reactions (e.g., "thumbsup:3")
reply_countintegerNumber of thread replies
filesarrayAttached files (name, size, URL)
is_editedbooleanWhether the message was edited
permalinkstringDirect link that opens this message in Slack
timestamp_isostringISO 8601 timestamp

Scrape Channel List returns the same columns, filled in for the channel itself: channel_purpose, channel_is_archived and channel_is_member describe the channel, permalink opens it, timestamp_iso is when it was created, and reply_count carries its member count.

Use Cases

  • Workspace backup -- Archive channel history before leaving a workspace
  • Compliance archival -- Export messages for legal or regulatory retention
  • Knowledge base extraction -- Feed Slack conversations into AI training data or documentation
  • Migration -- Export messages when moving from Slack to another platform
  • Analytics -- Analyze communication patterns, response times, or topic trends

Rate Limiting

The actor respects Slack's published per-method rate limits and paces each one to its own ceiling, so it goes as fast as Slack allows and no faster. Very large channel histories -- especially with thread replies turned on -- still take time, because those limits are Slack's, not ours. Give a whole-workspace export a generous run timeout.

Terms of Service

This tool is intended for users extracting their own workspace data for backup, migration, or archival purposes. Users are responsible for complying with their organization's policies and Slack's Terms of Service. The actor only accesses data that the authenticated user already has permission to view.

Need More Features?

If you need additional data fields, custom output formats, or a scraper for another platform, file an issue or get in touch. We customize scrapers to fit specific requirements.