ForHosting KIT · Text & AI

Extract @mentions from text

Paste any text and get each @mention once, in the order it first appeared: a note that names @Ada, @Linus and @ADA gives @Ada and @Linus, and team@example.com is left out. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Extract @mentions from messages, comments, documents, and exported conversations without writing a custom parser. The capability scans plain text, returns each valid mention once, and keeps both the spelling and order of its first appearance. Duplicate usernames are compared without regard to letter case, so @Alex and @ALEX become one result. It supports usernames written with Unicode letters and numbers, ignores email domains, and returns an empty mentions list when the source contains no matching tokens.

Turn conversational text into a reliable mention list

Social posts, project notes, support transcripts, and community exports often contain usernames mixed with ordinary sentences. Manually copying those names is slow, and a broad search for the at sign can accidentally collect email addresses or malformed fragments. This extractor performs a deterministic left-to-right scan and returns a clean mentions array that is ready for another application step.

A token begins with @ and continues through Unicode letters, numbers, or underscores. The character before the at sign must be a real boundary rather than another username character or another at sign. As a result, a phrase such as “ask @Mina_7” produces one mention, while the domain portion of “team@example.com” is not mislabeled as a user.

Punctuation after a username simply ends the token. The result keeps the source order, making it suitable for interfaces and audit records where the sequence of first appearance matters.

Understand case-insensitive deduplication and preserved spelling

The same person may be referenced several times with different capitalization, especially when text is assembled from multiple systems. This capability compares extracted tokens case-insensitively, so @River, @RIVER, and @river count as one mention. It preserves the exact form of the first occurrence rather than forcing every result to lowercase.

That balance is useful in practice: downstream matching gets a deduplicated list, while displays retain the spelling that appeared first in the original material. Deduplication also preserves first-seen order. If @Kai occurs before @Noor, later repetitions never move either entry.

The comparison applies to the complete token, including the leading at sign, and underscores and numbers remain meaningful parts of a username. The algorithm is deterministic and uses no network requests, account directory, or probabilistic model. It extracts syntax only; it does not claim that a username exists, resolve it to a profile, or decide whether two differently spelled usernames belong to the same person.

Use clear token rules in automation

For predictable integrations, send an object with a text string no longer than the published character limit. Empty text is valid and returns an empty list. Unicode letters and decimal characters are supported, so names from many writing systems can be captured without reducing the rule to ASCII.

The extractor deliberately stops at spaces, punctuation, hyphens, and other symbols that are not letters, numbers, or underscores. It also refuses to start a token immediately after a letter, number, underscore, or another at sign; this boundary rule prevents ordinary email addresses and doubled markers from becoming misleading matches. Use the returned array for routing, moderation queues, notification preparation, analytics, or indexing, but validate usernames against the relevant platform separately when existence matters.

Route community messages

Extract unique mentioned usernames before assigning a post to the people or teams responsible for responding.

Clean exported conversations

Build a first-seen list of participants referenced in chat logs without collecting domains from email addresses.

Index mentions for analysis

Turn free-form comments into stable mention arrays for counting, filtering, or joining with platform data.

What characters can a mention contain?

After @, a mention may contain Unicode letters, numbers, and underscores. Other characters end the token.

How are duplicate mentions handled?

Duplicates are compared case-insensitively. The first spelling and the order of first appearance are preserved.

Does it extract parts of email addresses?

No. A mention cannot begin immediately after a letter, number, underscore, or another at sign, which excludes ordinary email domains.

What happens when there are no mentions?

The capability succeeds and returns an empty mentions list.

Does it verify that a username exists?

No. It extracts mention-shaped tokens from text and does not contact any social network or account directory.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/extract-mentions

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/text/extract-mentions \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Thanks @Ada and @Linus for reviewing this with @ADA."}'
{
  "text": "Thanks @Ada and @Linus for reviewing this with @ADA."
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.extract_mentions",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_text_chars100000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Turn conversational text into a reliable mention list

If the input has no qualifying tokens, the response contains an empty mentions list instead of an error or placeholder value.

Understand case-insensitive deduplication and preserved spelling

Therefore @sam, @sam_2, and @sam2 are three distinct mentions.

Use clear token rules in automation

Missing text, non-string values, and oversized input produce an invalid_input error, which lets a workflow distinguish bad requests from text that simply contains no mentions. API execution costs $0.002 per request.

Read the full KIT documentation →