Skip to main content
Discord search reads the messages DarknetSearch collects from the Discord servers it tracks. One GET returns the matching messages, newest first. Each carries the full text, an excerpt with the match marked, and the author, channel and server it came from. This is an expert search: one indexed source, searched on its own terms. To watch a term continuously instead, create a monitor on the Discord source.

Availability and cost

Availability: Telegram/Discord Monitoring. The same plan feature covers Telegram. Plans and quotas lists what each plan includes. Cost: no metered allowance. As with every call made with an API key, each call that returns 2xx counts once against your monthly API Calls allowance. See Rate limits. Without the feature, or when your license is not active, create_discord_search, retrieve_discord_servers and retrieve_discord_search_history return 403:
The export call is covered by your license only. When the license is not active it returns 403 with {"detail": "Your license is not active."}. No call on this page draws a metered allowance, so a 429 here always comes from the per-second rate limit or the API Calls allowance. Errors explains each body. create_discord_search runs the search and returns one page of matches.
q is one piece of text, matched as a case-insensitive substring of the message text or the author’s name. Operators are not read: acme.com OR acme-login.com looks for that exact text. Run one search per term. To read the next page, raise skip by limit. Each call runs the search again and, unless you send _save_to_history=false, saves another entry. Send false on every page after the first.

What comes back

  • total — messages that match.
  • total_is_estimate — true when the exact count took more than 3 seconds. total is then a lower bound: skip plus the matches on this page.
  • search_history_id — the ID of the saved search, or null when you sent _save_to_history=false. Use it to export the results.
Each item in results is one message:
  • content — the full message text.
  • content_highlighted — an excerpt about twice context_chars wide that starts about 60 characters before the first match. The match is wrapped in [[HIGHLIGHT]] and [[/HIGHLIGHT]]. ... marks trimmed text.
  • context — the same excerpt split into before, match and after, plus match_position, the match’s offset in content. When q matched only the author’s name, match_position is -1, match is empty and the excerpt is the start of the message.
  • posted_at, edited_at — when the message was posted and last edited. edited_at is null for an unedited message.
  • is_pinned — whether the message is pinned in its channel.
  • author, channel, server — each as name and id.
  • embeds — the message’s embeds as Discord stored them.
IDs are Discord IDs of up to 19 digits. Search results return author.id, channel.id and server.id as JSON numbers, which JavaScript’s JSON.parse rounds. Parse them as 64-bit integers or strings. retrieve_discord_servers returns the same IDs as strings. Send them as digits in server_id or channel_id.

Servers and channels

retrieve_discord_servers lists the tracked servers that are still collected, largest first. The list is the same for every organization.
  • The response holds total, skip, limit and servers.
  • skip defaults to 0. limit is 1 to 1000, default 100.
  • include_channels=true adds each server’s channels. It is null when you leave it out, and also for a server with no channels.
  • total is the number of servers in this response, not across all pages. Raise skip by limit until a response holds fewer than limit servers.
Each server carries id, name, description, member_count, icon_url, discovered_at and last_scraped_at. Each channel carries id, name, type and message_count.

List saved searches

retrieve_discord_search_history lists your organization’s saved Discord searches, newest first.
  • page is 1-based. page_size defaults to 20, max 200.
  • The response holds items, total, page and page_size.
  • Each item carries id (the search_history_id, as a string), query, searched_at and total_matches.

Export the results

Export a saved search through the export service with the DiscordSearch catalog entry. Pass the search_history_id as history_id. The entry offers CSV, JSON, XML and PDF. The export runs the saved search again, newest first, and holds up to 10,000 messages. It matches q against the message text only, not the author’s name.

Errors

Endpoints