Comment Sections Moderation
Moderate blog, news, and article comments where the baseline toxicity is high and targeted abuse is common.
The moderation problem
Comment sections attract pile-ons, targeted insults, and coordinated harassment, but they also host strong, legitimate disagreement. The challenge is separating a heated-but-fair opinion from an attack on another commenter.
Why a word list isn't enough
A profanity list flags someone passionately swearing about a politician (fair game) the same as someone swearing at another commenter (abuse). It can't see who the target is.
How The Profanity API handles it
Use context `comment`, which requires multiple static matches before auto-flagging in standard contexts, with `balanced` mode so the engine distinguishes venting about a topic from abuse directed at a person.
Examples
| Input | Verdict |
|---|---|
| this policy is a complete disaster and I'm furious about it | venting_situational → allowed |
| @dave you're a brain-dead idiot and everyone hates you | venting_targeted / abusive → flagged |
Quick start
const res = await fetch("https://api.theprofanityapi.com/v1/check", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.PROFANITY_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ text, context: "comment", mode: "balanced" }),
});
const { flagged, intent, score } = await res.json(); Other use cases
- Gaming Chat
- Creative Writing & Fiction
- Education Platforms
- Healthcare & Medical Apps
- Legal Tech
- Real-Time Chat & Messaging
- Reviews & Marketplaces
- Profile Bios
- Professional Networks
- Kids & Child-Safe Apps
- Usernames & Handles
Ready to ship moderation?
Get an API key and 300 free requests a month. No credit card required.
Get started free →