Profanity Detector
Detect offensive language in text with word-level position reporting
/v1/text/profanity
curl -X POST "https://textanalysis.toolkitapi.io/v1/text/profanity" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "This is a perfectly clean sentence."}'
import httpx
resp = httpx.post(
"https://textanalysis.toolkitapi.io/v1/text/profanity",
json={"text": "This is a perfectly clean sentence."},
)
print(resp.json())
const resp = await fetch("https://textanalysis.toolkitapi.io/v1/text/profanity", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"text": "This is a perfectly clean sentence."}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"contains_profanity": false,
"count": 0,
"matches": []
}
Try It Live
Description
How to Use
1. Send a POST request to `/v1/text/profanity` with the `text` field. 2. Check `contains_profanity` (boolean) for a quick pass/fail result. 3. Inspect the `matches` array for the specific words flagged and their positions. 4. Use `count` to decide on escalation thresholds.
About This Tool
The Profanity Detection endpoint scans text for offensive language and returns a boolean flag along with a list of flagged words and their character positions. Useful for content moderation pipelines where user-submitted text needs to be screened before publication.
The word list covers common English profanities. Detection is case-insensitive and handles common letter substitutions.
Why Use This Tool
- User-generated content — Screen comments, reviews, and forum posts before publication
- Chat applications — Flag or block offensive messages in real-time chat systems
- Content moderation queue — Auto-route flagged submissions to a human review queue
- Brand safety — Prevent offensive content from appearing alongside paid advertising
Start using Profanity Detector now
Get your free API key and make your first request in under a minute.