Profanity filter API
A profanity filter that reads words, not lists
Word lists miss "f u c k" and flag "Scunthorpe". VigiMod checks each message against a rule the model reads, so masked swearing is caught and innocent words stay clean, in 26 languages. Profanity and toxicity are scored apart, so you decide whether a friendly "damn" matters.
Real answers of the API
The profanity score and the toxicity score of the same messages. Swearing between friends gets a high profanity score and a low toxicity score; words that only contain a bad word get neither.
| Message | Profanity | Toxicity |
|---|---|---|
| what the fuck is this | 1.00 | 0.96 |
| wh4t the f*ck | 1.00 | 0.91 |
| f u c k this game | 0.99 | 0.13 |
| this game is so damn good | 0.99 | 0.06 |
| sei uno str0nzo | 1.00 | 1.00 |
| esto es una mierda | 1.00 | 1.00 |
| das ist scheiße | 1.00 | 0.98 |
| c'est de la merde | 1.00 | 0.97 |
| que porra é essa | 1.00 | 1.00 |
| I live in Scunthorpe | 0.00 | 0.00 |
| the class assessment is due tomorrow | 0.00 | 0.00 |
| Assassin's Creed is a great game | 0.00 | 0.00 |
| shiitake mushrooms are tasty | 0.00 | 0.00 |
VigiMod 1.2.1 with the profanity rule shown below and default thresholds, run on
Word list or AI filter
| Word list | VigiMod | |
|---|---|---|
| Masked spellings (f*ck, f u c k, str0nzo) | Missed unless every variant is listed | Caught: the text is normalized and read as a whole |
| Innocent words (Scunthorpe, assessment, shiitake) | Flagged when they contain a listed word | Not flagged |
| Swearing vs. insulting | Same flag for both | Profanity and toxicity scored separately |
| Languages | One list per language, kept by hand | 26 languages with one request |
| Your own wording | Edit the list | Write the rule as a sentence and set its threshold |
Add it to your chat in one request
Profanity is a rule in plain words, sent with the message (or saved once in a policy in the dashboard). Turn on block_slurs to also flag slurs by kind, in English, Italian, Spanish, French, German and Portuguese.
import requests
r = requests.post(
"https://api.vigimod.com/moderate",
headers={"X-API-Key": VIGIMOD_KEY},
json={
"text": message,
"rules": {"profanity": "The message contains profanity: swear words, curse words, vulgar or obscene language, in any language"},
"block_slurs": True, # slur lists in six languages, one flag per kind
"categories": ["toxic"], # optional: is it also an attack?
},
)
result = r.json()
result["flags"]["rule:profanity"] # True: swearing or vulgar language
result["flags"]["toxic"] # True: also rude or hostile
result["blocklist_matches"] # slurs found, if anyComing from Perspective API? The compatible endpoint scores PROFANITY with the same rule: Perspective API alternative
curl -s "https://api.vigimod.com/v1alpha1/comments:analyze?key=$VIGIMOD_KEY" \
-H "Content-Type: application/json" \
-d '{"comment": {"text": "wh4t the f*ck"}, "requestedAttributes": {"PROFANITY": {}}}'Without slowing your chat down
- Check after posting, not before: show the message at once and hide it if it gets flagged. Users never wait for the filter.
- If you must check before posting, ask only for what you need (rules and the categories you use): fewer checks, faster answer.
- Decide per community: a gaming server may allow swearing and only remove insults (toxic), a kids' platform may remove both.
- Send the last messages as context when you also score toxicity: jokes and replies are read with what came before.
Questions
Is there a free profanity filter API?
Yes: VigiMod is free during the beta, with 120 messages per minute per API key and every feature included. There is also a free checker on the website that needs no account.
Which languages does the profanity filter support?
The model reads 26 languages and works best in English, Italian, Spanish, French, German and Portuguese. The slur lists cover those six languages.
Does it catch leetspeak and masked swear words?
Yes. The text is normalized before scoring (numbers for letters, symbols, spaced letters) and the model reads the whole sentence, so "wh4t the f*ck" and "f u c k" are caught.
Will it flag innocent words like Scunthorpe or assessment?
No. There is no substring match: the model judges the meaning, so words that only contain a bad word score 0.
What is the difference between profanity and toxicity?
Profanity is about the words (swearing, vulgar language); toxicity is about the intent (rude, hostile, aggressive). "This game is so damn good" is profanity but not toxic. VigiMod returns both, so you choose which one to act on.
Are the messages stored?
No. Messages are scored and discarded; only hourly usage counters per key are kept.
Keep learning
All guides- Basics · 5 min readFalse positives and false negatives in content moderationEvery moderation system makes two kinds of mistakes. What they are, what each one costs a community and how to keep both low.
- Intermediate · 6 min readHow to choose a moderation thresholdA score of 0.7 is not a decision. How thresholds work, why the default is only a starting point and a simple method to tune them on your own messages.
- Basics · 5 min readWhy context matters in chat moderationThe same sentence can be harmless or harmful depending on what came before. How conversation context changes moderation, with real examples.
Filter profanity in 26 languages
Free API key, 120 messages per minute during the beta.