Rocket.Chat Message Scraper avatar

Rocket.Chat Message Scraper

Pricing

Pay per event

Go to Apify Store
Rocket.Chat Message Scraper

Rocket.Chat Message Scraper

Export messages, channels, private groups, and direct messages from any Rocket.Chat instance using the REST API. Authenticate with a personal access token. Supports date-range filters, room allowlists, and full thread history.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

9 days ago

Last modified

Share

Rocket.Chat Message Scraper - Export Chat History via REST API

Export messages, channels, private groups, and direct messages from any Rocket.Chat instance using the official REST API. Works with Rocket.Chat Community Edition, Enterprise Edition, and cloud-hosted workspaces. Authenticate with a User ID and personal access token, then filter by room type, date range, or specific room IDs.

What does the Rocket.Chat scraper do?

It connects to the Rocket.Chat REST API, enumerates rooms accessible to the authenticated user (channels, private groups, and optionally direct messages), and paginates through message history at 100 messages per request. Thread replies can be enabled with an extra API call per thread. Usernames and display names are resolved per message.

For very large workspaces, use maxItems to limit run size and re-run with dateFrom set to the previous run's cutoff to process incrementally.

Typical throughput on a self-hosted instance depends on that instance's rate limit configuration. The API pages at 100 messages per request, so a workspace with 100,000 messages requires approximately 1,000 API calls.

What data does it extract?

Each record represents one Rocket.Chat message:

FieldTypeDescription
instance_urlstringBase URL of the Rocket.Chat instance
room_idstringRocket.Chat room identifier
room_namestringHuman-readable room name
room_typestringc=channel, p=private group, d=direct message
room_topicstringRoom topic string
room_descriptionstringRoom description string
message_idstringUnique message identifier
message_ridstringRoom ID the message belongs to
message_tsstringMessage creation timestamp (ISO 8601)
message_update_atstringLast edit timestamp (ISO 8601)
message_user_idstringSender User ID
message_user_usernamestringSender username
message_user_namestringSender display name
message_msgstringPlain-text message body
message_typestringEmpty for normal messages; rm=deleted, uj=join, ul=leave, etc.
message_thread_msg_idstringParent message ID if this is a thread reply
message_attachmentsstringJSON array of file/image attachments
message_reactionsstringJSON map of emoji reactions and user lists
message_urlsstringJSON array of embedded URLs
message_mentionsstringJSON array of @mentions
message_channelsstringJSON array of #channel references

Sample output record

{
"instance_url": "https://open.rocket.chat",
"room_name": "general",
"room_type": "c",
"message_id": "abc123xyz",
"message_ts": "2024-06-01T09:14:22.000Z",
"message_user_username": "jane.smith",
"message_user_name": "Jane Smith",
"message_msg": "Here's the updated runbook for the deploy process.",
"message_type": "",
"message_reactions": "{\":thumbsup:\":{\"usernames\":[\"john.doe\"],\"names\":[\"John Doe\"]}}",
"message_attachments": "[]",
"message_urls": "[]"
}

How to use it

Generating a personal access token

  1. Log in to your Rocket.Chat instance
  2. Click your avatar, then select Profile
  3. Scroll to Personal Access Tokens and click Add
  4. Copy both the Token and your User ID shown above the token list

The token path may vary between Rocket.Chat Community and Enterprise UI versions. Administrators can also generate tokens from Admin PanelUsers for any account.

Input parameters

ParameterRequiredDescription
instanceUrlYesBase URL of your Rocket.Chat instance (e.g. https://chat.example.com)
userIdYesYour Rocket.Chat User ID
authTokenYesPersonal access token
roomIdsNoLimit to specific room IDs. Leave empty for all accessible rooms.
roomTypesYesArray of room types: c (channels), p (private groups), d (direct messages)
dateFromNoOnly fetch messages on or after this date (ISO format)
dateToNoOnly fetch messages on or before this date (ISO format)
includeThreadRepliesNoFetch replies nested in threads (adds extra API calls). Default: false
maxItemsNoMaximum records to save. 0 = unlimited

Example input

{
"instanceUrl": "https://chat.yourcompany.com",
"userId": "your-user-id",
"authToken": "your-access-token",
"roomTypes": ["c", "p"],
"dateFrom": "2024-01-01",
"maxItems": 10000
}

Use cases

  • Compliance archival — export message history for legal or regulatory retention from enterprise self-hosted deployments
  • Platform migration — extract messages before moving to Slack, Microsoft Teams, or a custom data warehouse
  • Knowledge base extraction — mine channel history for documentation; message_msg is plain text ready for import into Confluence, Notion, or a RAG pipeline
  • Communication analytics — analyze message volume, response times, and topic trends across channels and time windows
  • Backup — create offline snapshots of workspace history before a major upgrade or infrastructure change

FAQ

Does this work with cloud-hosted Rocket.Chat? Yes. Set instanceUrl to your cloud workspace URL. The REST API is identical across hosting models.

What rooms can the actor access? Only rooms visible to the authenticated user. Public channels, private groups the user belongs to, and (if enabled) direct messages. Admin accounts can access more rooms than regular users.

How do I handle authentication errors? Authentication failures produce an error record with status: AUTH_ERROR. Verify that the User ID and token are from the same Rocket.Chat instance and that personal access tokens are enabled by your admin.

Output is available in JSON, CSV, and Excel via the Apify dataset export panel.