🔍

Profanity Detector

Detect offensive language in text with word-level position reporting

POST 1 credit /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
Response 200 OK
{
  "contains_profanity": false,
  "count": 0,
  "matches": []
}

Try It Live

Live Demo

Description

Detect offensive language in text with word-level position reporting

How to Use

1

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

Start using Profanity Detector now

Get your free API key and make your first request in under a minute.