Scraping · Discord
Discord messages
Read a channel or search a server. Four credits per returned message.
next
Channel messages →
Recent messages, before and after cursors, or a window around a message.
next
Search messages →
Search messages in a server by text, channel, author and other filters.
01
Requests, pagination and credits
Authenticate with your Loci API key. Send a channel ID or URL to read its messages, or a server ID and filters to search messages.
Each call returns one page. Channel history defaults to 100 messages. Continue with before or after, using a returned message ID.
Search defaults to 25 messages. Continue with offset: 0, 25, 50 when using the default page size. Add channel_id to search selected channels.
The listed cost is 4 credits per returned message. cost shows the credits deducted, capped at your remaining balance. Empty results cost zero; failed calls return the credits deducted.