Matrix Message Scraper
Pricing
Pay per event
Matrix Message Scraper
Scrape public rooms and messages from any Matrix homeserver (matrix.org, Element, or self-hosted). Discover public rooms by keyword or scrape message history from specific rooms using a Matrix access token.
Pricing
Pay per event
Rating
0.0
(0)
Developer
BowTiedRaccoon
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Share
Matrix Chat Scraper — Rooms & Message History
Extract public room listings and message history from any Matrix homeserver, including matrix.org. Operates in two modes: discover public rooms without authentication, or retrieve full message history from specific rooms using an access token. Returns structured JSON with room metadata, message content, reply threads, and media references.
What does the Matrix Chat Scraper do?
- Discover mode — Lists public rooms on any Matrix homeserver without login; returns room name, topic, member count, join rules, and encryption status
- Scrape mode — Retrieves message history from one or more rooms using a Matrix access token; returns messages, replies, edits, thread IDs, and media URLs
- Supports optional search filtering to narrow public room discovery by keyword
- Works with any Matrix homeserver (
matrix.org,mozilla.org, self-hosted, etc.) - Returns two record types in the same dataset:
roomandmessage
What data does it extract?
Room records (record_type: room)
| Field | Description |
|---|---|
record_type | room |
room_id | Matrix room ID (e.g. !abc123:matrix.org) |
room_name | Display name of the room |
room_topic | Room topic or description |
room_canonical_alias | Canonical alias (e.g. #roomname:matrix.org) |
room_member_count | Current member count |
room_is_encrypted | Whether the room uses end-to-end encryption |
room_join_rule | Join rule: public, invite, knock, etc. |
room_world_readable | Whether history is visible without joining |
room_guest_can_join | Whether guests can join |
room_avatar_url | Room avatar MXC URL |
room_type | Matrix room type if set |
homeserver | Homeserver domain |
Message records (record_type: message)
| Field | Description |
|---|---|
record_type | message |
event_id | Unique Matrix event ID |
event_type | Matrix event type (e.g. m.room.message) |
event_sender | Sender MXID (e.g. @user:matrix.org) |
event_sender_display_name | Display name of the sender |
event_origin_server_ts | Server timestamp (milliseconds since epoch) |
event_content_msgtype | Message type (m.text, m.image, m.file, etc.) |
event_content_body | Plain text message body |
event_content_formatted_body | HTML-formatted body where available |
event_content_url | MXC URL for media messages |
event_reply_to | Event ID of the message being replied to |
event_thread_id | Thread root event ID if part of a thread |
event_edits | Array of edit event IDs for this message |
event_room_id | Room ID this message belongs to |
How to use it
Choose action: discover_rooms requires only a homeserver URL. scrape_room_messages requires an access token and at least one room ID. Access tokens do not expire by default on most homeservers but can be revoked via Element settings if needed.
| Field | Type | Default | Description |
|---|---|---|---|
action | string | discover_rooms | discover_rooms or scrape_room_messages |
homeserver | string | https://matrix.org | Matrix homeserver URL |
accessToken | string | — | Matrix access token (required for scrape_room_messages). Secret field. |
roomIds | array | — | List of room IDs to scrape (e.g. !abc123:matrix.org) |
searchTerm | string | — | Keyword filter for room discovery |
maxItems | integer | 10 | Maximum records to return |
maxMessagesPerRoom | integer | 100 | Maximum messages to retrieve per room |
messageDirection | string | b | Pagination direction: b (backwards from latest) or f (forwards from oldest) |
Use cases
- Open-source community analysis — matrix.org alone hosts 100,000+ public rooms covering tech projects, gaming communities, and decentralized apps; map community size and topic distribution at scale.
- Academic linguistics research — Collect multilingual message corpora from Matrix federated servers for NLP training, sentiment analysis, or comparative linguistics studies.
- Content moderation tooling — Discover public rooms matching specific keywords and monitor message content for policy-violating material across open Matrix communities.
- Competitive intelligence — Track discussion volumes and sentiment in technology or gaming community rooms without requiring a login to join.
- Archival and research — Preserve message history from public rooms using the
messageDirection: fmode to paginate from the earliest available messages forward.
FAQ
How do I get a Matrix access token? Log in to your Matrix client (e.g. Element), go to Settings > Help & About > Advanced, and copy the Access Token shown there. The token authenticates as your account on the homeserver you specify.
Does the actor decrypt end-to-end encrypted messages?
No. The actor retrieves events from the Matrix Client-Server API. Encrypted rooms return encrypted event payloads — the decryption keys are not accessible via the API without a full E2E key export. Use discover_rooms to identify whether a room is encrypted (room_is_encrypted: true) before attempting to scrape it.
Can I scrape messages from a private room?
Yes, provided your access token is for an account that is already a member of that room. The roomIds input accepts any room ID your account can read.
Results are available for export in JSON, CSV, and Excel formats from the Apify dataset tab.
