Find and censor English swear words
check_profanityDetect English profanity in text (word list with leetspeak, look-alike letters, repeated letters, dotted/spaced letters and hidden characters handled) and return the matched terms, their positions (UTF-16 start/end in your text) and, unless censor is false, a censored copy of the same length. Common innocent words (Scunthorpe, cockpit, Shiite, cumin) are whitelisted; it does not understand context and is English only. Text up to 10240 UTF-8 bytes; it is not stored or logged. matches is capped at 50 here (match_count is the full total). Read-only. Same engine, keys and limits as POST /v1/check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Extra words to flag on word boundaries, e.g. ["jerk"]. | |
| text | Yes | The text to check, at most 10240 UTF-8 bytes. | |
| allow | No | Words never to flag, e.g. ["hell", "damn"]. Allow wins over deny. | |
| censor | No | Return a censored copy (default true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | Yes | ||
| engine | No | ||
| matches | Yes | Matches in text order, at most 50 here (see match_count for the total). start/end are UTF-16 indices into your text. | |
| version | No | ||
| censored | No | Your text with each match replaced by asterisks (same length). Omitted when censor is false. | |
| truncated | No | True when matches lists fewer than match_count (over 50 here, or the API's own cap). | |
| text_bytes | No | ||
| match_count | Yes | Total number of matches in the text (not capped). | |
| has_profanity | Yes | ||
| matches_returned | No |