Vietnamese Profanity Filter API

Detect and mask Vietnamese (and common English) profanity, insults and slurs, including unaccented spellings, teencode, l33t and separators like đ.ị.t.

GETPOSThttps://apibox.io.vn/v1/profanity-vi

The profanity filter finds offensive words in Vietnamese comments, chats and reviews and returns a masked version. Its lexicon covers sexual and vulgar words, insults and teencode abbreviations (đm, vcl, dmm, clgt…) plus common English swear words and slurs, each with a category (sexual, vulgar, insult, slur) and a severity (mild, moderate, severe).

It is built for the usual tricks: missing accents where the result is still unambiguous (dit me), repeated letters (đụuuu), l33t digits and symbols (sh1t, f@ck), and separators inside words (đ.ị.t, l-ồ-n). Words that are only offensive with their accents (lồn, cặc, buồi) are matched with accents only, so “lon bia”, “các bạn” and “buổi sáng” are never flagged; ambiguous words (cc, đù, cave) are only checked with strict=true.

The response gives the overall severity, a score, each match with its position and the censored text (mask character, keep_first=true to keep the first letter). Add your own words with extra_words and whitelist with allow.

Parameters

NameInTypeRequiredDefault
textbody|querystringyesText to check (max 100,000 characters).
maskbody|querystringno*Masking character.
keep_firstbody|querybooleannofalseKeep the first letter of masked words.
strictbody|querybooleannofalseAlso flag ambiguous words (cc, đù, cave…).
extra_wordsbody|querystringnoComma-separated words to add.
allowbody|querystringnoComma-separated words to ignore.

Example

curl -X POST "https://apibox.io.vn/v1/profanity-vi" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Đm, cái này vcl thật","keep_first":true}'

Response

{
  "profane": true,
  "severity": "moderate",
  "score": 60,
  "count": 2,
  "categories": [
    "vulgar"
  ],
  "matches": [
    {
      "text": "Đm",
      "start": 0,
      "end": 2,
      "word": "dm",
      "category": "vulgar",
      "severity": "moderate"
    },
    {
      "text": "vcl",
      "start": 12,
      "end": 15,
      "word": "vcl",
      "category": "vulgar",
      "severity": "moderate"
    }
  ],
  "censored": "Đ*, cái này v** thật",
  "strict": false
}

Use cases

  • Moderate comments, reviews and chat messages
  • Filter usernames and display names at sign-up
  • Flag messages for human review in support tools
  • Keep bot and game chats family-friendly

FAQ

Will it flag normal words without accents?

No. Words like lồn / cặc / buồi only count with their accents, because lon, cac, buoi are ordinary words without them.

Can I tune the list?

Yes: extra_words adds comma-separated words or phrases, allow removes entries, strict=true enables ambiguous ones.

Is the text stored?

No, it is processed in memory only.

Related APIs

Start with 1,000 free requests every month. Get free API key →