CleanText Profanity Filter & PII Redaction
Detect and censor profanity (leetspeak-aware), redact emails, phones, cards and SSNs, and score readability.
Endpoints
| Path | What it does |
|---|---|
/profanity | Censor or flag profanity, including leetspeak |
/redact | Redact emails, phones, cards, SSNs, IBANs, IPs, URLs |
/analyze | Readability scores and reading time |
/clean | Profanity and PII together |
Examples
Replace YOUR_KEY with your RapidAPI key. Host: cleantext-profanity-filter-pii-redaction.p.rapidapi.com
curl
curl --request POST \
--url 'https://cleantext-profanity-filter-pii-redaction.p.rapidapi.com/profanity' \
--header 'Content-Type: application/json' \
--header 'X-RapidAPI-Key: YOUR_KEY' \
--header 'X-RapidAPI-Host: cleantext-profanity-filter-pii-redaction.p.rapidapi.com' \
--data '{"text": "this is sh1t, email a@b.co"}'
JavaScript
const res = await fetch('https://cleantext-profanity-filter-pii-redaction.p.rapidapi.com/profanity', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-RapidAPI-Key': process.env.RAPIDAPI_KEY,
'X-RapidAPI-Host': 'cleantext-profanity-filter-pii-redaction.p.rapidapi.com'
},
body: JSON.stringify({"text": "this is sh1t, email a@b.co"})
});
const data = await res.json();
Python
import os, requests
r = requests.post(
'https://cleantext-profanity-filter-pii-redaction.p.rapidapi.com/profanity',
headers={
'X-RapidAPI-Key': os.environ['RAPIDAPI_KEY'],
'X-RapidAPI-Host': 'cleantext-profanity-filter-pii-redaction.p.rapidapi.com',
'Content-Type': 'application/json',
},
json={"text": "this is sh1t, email a@b.co"},
)
print(r.json())
Notes
Nothing you send is stored by our code. Calls go through RapidAPI, which bills according to the plan you pick. The origin runs on Cloudflare Workers.