# Profanity Filter API: 26 Languages, Leetspeak, Allowlist (`blueberry_rainstorm/profanity-filter`) Actor

Find and mask bad words in comments, reviews and chat in 26 languages. Catches sh1t, f u c k, fuuuck and f\*ck without flagging Password or Scunthorpe. Mask, replace, remove or flag. Bulk runs or an instant API, PurgoMalum compatible.

- **URL**: https://apify.com/blueberry_rainstorm/profanity-filter.md
- **Developed by:** [Pandapi](https://apify.com/blueberry_rainstorm) (community)
- **Categories:** Developer tools, AI, Integrations
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 text checkeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Profanity Filter API: 26 Languages, Leetspeak & Allowlist

Find and clean **bad words in comments, reviews, chat messages, usernames and any user text**, in **26 languages**. It catches disguised swearing (`sh1t`, `$hit`, `f u c k`, `fuuuck`, `f*ck`, look-alike letters from other alphabets) **without** censoring innocent words like *Password*, *class*, *Scunthorpe*, *cocktail* or *butter*. Mask, replace, remove or just flag. Run it in bulk on a list or a whole dataset, or call it as an instant HTTP API.

- 🌍 **26 languages**: English, Spanish, French, German, Italian, Portuguese, Dutch, Polish, Russian, Turkish, Arabic, Persian, Hindi, Chinese, Japanese, Korean, Thai, Swedish, Norwegian, Danish, Finnish, Czech, Hungarian, Filipino, Esperanto, Kabyle
- 🕵️ **Catches disguised words**: leetspeak, spaced letters, stretched letters, self-censored words (`f**king`) and Cyrillic/Greek look-alike letters
- ✅ **No Scunthorpe problem**: whole-word matching, tested against 370,105 English dictionary words, so *assassin*, *Essex*, *spicy* or *titter* are never flagged
- ✂️ **Five modes**: mask (`****`), mask but keep the first letter (`f***`), replace (`[censored]`), remove the word, or flag only
- 🎚️ **Two strictness levels**: standard (swearing, slurs, explicit sexual slang) or strict (adds mild words like *damn*, *crap*, *hell* and clinical terms, for children's apps)
- ➕ **Your own block and allow lists**: `frak*` blocks every word starting with *frak*; allow your brand, a place or a surname
- 🔁 **Drop-in PurgoMalum replacement**: the same `/service/json`, `/service/plain`, `/service/xml` and `/service/containsprofanity` endpoints and parameters, so moving over is a base-URL change
- 🧾 **Clean another dataset**: point it at the reviews from an App Store or Google Play scraper run and get every item back with a cleaned text field
- 💸 **$0.20 per 1,000 texts.** Empty texts are free. No start fee.

### Use cases

- **Comment and chat moderation**: mask swearing before it is shown, or flag it for a human
- **Usernames and display names**: block offensive sign-up names, including `sh1tlord`-style spellings
- **Reviews and app store data**: clean scraped reviews before you put them in a report, a dashboard or an LLM prompt
- **Kids' and education apps**: strict mode also catches mild words
- **Datasets for AI training**: flag or remove profanity in text corpora in bulk
- **Multilingual communities**: one filter for English, Spanish, Russian, Arabic, Japanese and more

### How to use it

1. Paste your texts into **Texts to check** (one per line), or give the **dataset ID** of another run and the **field** that holds the text.
2. Choose **Languages**. `auto` = English plus the language of any non-Latin script found in a text (Russian, Arabic, Persian, Chinese, Japanese, Korean, Hindi, Thai). Add Latin-script languages yourself, e.g. `["en", "es", "fr", "de"]`, or `all`.
3. Pick a **mode** and run. One output row per text, in the order you gave them. Export to Excel, CSV or JSON.

#### Example input

```json
{
  "texts": [
    "What a great product, thanks!",
    "This is sh1t and the support is f u c k i n g useless",
    "Your Password was reset. Greetings from Scunthorpe."
  ],
  "languages": ["auto"],
  "mode": "mask"
}
```

#### Example output

```json
{
  "id": "2",
  "text": "This is sh1t and the support is f u c k i n g useless",
  "hasProfanity": true,
  "profanityCount": 2,
  "cleanText": "This is **** and the support is * * * * * * * useless",
  "matches": [
    { "term": "shit", "matched": "sh1t", "start": 8, "end": 12, "language": "en" },
    { "term": "fucking", "matched": "f u c k i n g", "start": 32, "end": 45, "language": "en" }
  ],
  "status": "ok"
}
```

`matches` tells you what was found, how it was written, where it is (character offsets) and which language list matched. A run summary (texts checked, texts with profanity, languages) is saved in the key-value store as `SUMMARY`.

#### Clean a dataset from another Actor

```json
{ "datasetId": "<dataset ID of an App Store reviews run>", "textField": "text", "mode": "mask-keep-first" }
```

Every item comes back with all its fields plus `textClean`, `hasProfanity`, `profanityCount` and `matches`. Nested fields work with dots, e.g. `review.body`.

### Instant API (Standby)

Call it like any REST API, one text or up to 1,000 per request. Use your Apify API token.

```bash
## one text
curl "https://blueberry-rainstorm--profanity-filter.apify.actor/check?text=you%20sh1t%20head&token=$APIFY_TOKEN"

## many texts, other options
curl -X POST "https://blueberry-rainstorm--profanity-filter.apify.actor/check?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"texts": ["ok", "f*ck this"], "mode": "mask-keep-first", "languages": "en,es"}'

## PurgoMalum-compatible
curl "https://blueberry-rainstorm--profanity-filter.apify.actor/service/json?text=this%20is%20shit&fill_text=%5Bx%5D&token=$APIFY_TOKEN"
## {"result":"this is [x]"}
```

Parameters for `/check`: `text` or `texts`, `languages` (comma list, `auto`, `all`), `mode`, `maskChar`, `replacement`, `strictness` (`standard`/`strict`), `obfuscation` (`true`/`false`), `block` and `allow` (comma lists). PurgoMalum endpoints take `text`, `add`, `fill_text`, `fill_char`, plus our `languages` and `allow`. `/languages` lists the language codes.

### Pricing

**$0.20 per 1,000 texts checked** (event `text`, $0.0002 each). Empty texts are free, and there is no start fee. 100,000 comments cost $20. Set a maximum cost per run in Apify and the run stops cleanly when it is reached.

### How it compares

| | This Actor | PurgoMalum | Neutrino Bad Word Filter | Other Apify filters |
|---|---|---|---|---|
| Languages | 26 | English | mostly English | 1 to 4 |
| Leetspeak, spaced, stretched, look-alike letters | ✅ | some substitutions | ❌ | some |
| Allowlist + whole-word matching | ✅ | built-in safe list only | ❌ | ✅ |
| Strictness levels | standard / strict | ❌ | strict / obscene | categories |
| Bulk dataset cleaning | ✅ | ❌ | ❌ | ✅ |
| Real-time HTTP API | ✅ (also PurgoMalum-compatible) | ✅ | ✅ | ❌ |
| Price | $0.20 / 1,000 | free, no SLA | paid plans | $0.25 to $2 / 1,000 |

### FAQ

**Will it flag words like "Password", "Scunthorpe" or "assassin"?**
No. It matches whole words after normalizing them, never raw substrings. We ran it over 370,105 English dictionary words and fixed every innocent word that came up (for example *butter*, *spicy*, *cocktail*, *Middlesex*).

**Is this AI moderation?**
No. It is a fast, predictable word filter: the same input always gives the same output, with the exact word and position. It does not judge tone, sarcasm or insults made of ordinary words. Use it as the first, cheap step, and send flagged texts to a human or an LLM if you need judgement.

**Why isn't "damn" or "hell" flagged?**
They are mild, and most communities allow them. Set **Strictness** to `strict` to catch them, along with clinical or everyday words that the full lists include (*sexual*, *sucks*, *nude*).

**Which languages does `auto` check?**
English always, plus Russian for Cyrillic text, Arabic and Persian for Arabic script, Chinese and Japanese for Han characters, Japanese for kana, Korean for Hangul, Hindi for Devanagari, and Thai for Thai script. Latin-script languages (Spanish, French, German, ...) are not guessed, because a word that is rude in one is often normal in another (Swedish *fart* means speed). Add them to **Languages** when your users write in them.

**How good are the non-English lists?**
English and Russian have our own additions and the English list was tuned against a dictionary. The other languages use the community LDNOOBW lists as they are. For Chinese, Japanese and Thai (no spaces between words), terms are matched inside the text, and one-character terms are only used in strict mode to avoid false hits like 牛乳 (milk). Add words to **Extra words to block** or **Words to allow** as you need, and tell us in the Issues tab so we can improve the lists.

**Do you store my texts?**
No. Texts are processed in memory. Batch results go to your own Apify dataset, and the API returns them in the response.

### Credits

Word lists: [List of Dirty, Naughty, Obscene, and Otherwise Bad Words](https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words) (LDNOOBW), CC BY 4.0, with additions and a dictionary-tested safe list by Pandapi.

### More from Pandapi 🐼

Pandapi makes friendly, no-nonsense data tools: simple input, clean output, and fair pay-per-result prices. Found a bug or need a feature? Open an issue on the Issues tab and we answer fast.

- [Pandapi MCP Server](https://apify.com/blueberry_rainstorm/pandapi-mcp-server): all these tools in Claude, Cursor or any AI agent through one MCP connection
- [Web Page to Markdown](https://apify.com/blueberry_rainstorm/web-page-to-markdown): clean, chunked Markdown from any URL or sitemap, ready for AI and RAG
- [PDF to Text, Markdown & Excel](https://apify.com/blueberry_rainstorm/pdf-to-text-markdown): text, Markdown and real Excel tables from any PDF, with OCR
- [Website Contact Details Scraper](https://apify.com/blueberry_rainstorm/website-contact-finder): business emails, phones and social links, one row per website
- [Website Screenshot](https://apify.com/blueberry_rainstorm/website-screenshot): full-page and mobile screenshots or PDFs of many URLs at once
- [Broken Link Checker](https://apify.com/blueberry_rainstorm/broken-link-checker): every 404, dead link and redirect on a site, with the page it is on
- [Public Tenders Feed](https://apify.com/blueberry_rainstorm/public-tenders-feed): government tenders and contract awards from six official portals
- [App Store Reviews Scraper](https://apify.com/blueberry_rainstorm/app-store-reviews-scraper): iOS reviews, ratings and app details from about 180 countries
- [Google Play Reviews Scraper](https://apify.com/blueberry_rainstorm/google-play-reviews-scraper): Android reviews with developer replies, ratings and app data, many languages
- [Company Jobs Tracker](https://apify.com/blueberry_rainstorm/company-jobs-tracker): every open job from the companies you name (Greenhouse, Lever, Ashby and 8 more), with new and closed jobs tracked
- [ZIP & Postal Code Lookup](https://apify.com/blueberry_rainstorm/postal-code-lookup): city, state and coordinates for postal codes in 124 countries, plus distance and radius search
- [HTML to PDF](https://apify.com/blueberry_rainstorm/html-to-pdf): web pages, HTML or a template plus JSON rows (invoices, certificates) to PDF
- [Hacker News Scraper](https://apify.com/blueberry_rainstorm/hacker-news-scraper): stories, comments, Show HN and job posts, filtered your way

# Actor input Schema

## `texts` (type: `array`):

Comments, reviews, chat messages, usernames or any text. One output row per text. You can also pass objects like {"id": "c-1", "text": "..."} through the API.

## `datasetId` (type: `string`):

ID of an Apify dataset to check, e.g. the reviews from an App Store or Google Play reviews scraper run. Each item is copied to the output with a cleaned text field, hasProfanity and matches.

## `textField` (type: `string`):

Which field of each dataset item holds the text (dots for nested fields, e.g. review.text). The cleaned text goes in <field>Clean.

## `languages` (type: `array`):

auto = English plus the languages of any non-Latin script found in the text (Russian, Arabic, Persian, Chinese, Japanese, Korean, Hindi, Thai). Add Latin-script languages yourself (es, fr, de, it, pt, nl, pl, tr, sv, ...) or use all. Codes: ar cs da de en eo es fa fi fil fr hi hu it ja kab ko nl no pl pt ru sv th tr zh.

## `mode` (type: `string`):

mask: f\*\*\* -> \****. mask-keep-first: f***. replace: \[censored]. remove: delete the word. flag: leave the text as it is and only report.

## `maskChar` (type: `string`):

One character used by the mask modes.

## `replacement` (type: `string`):

Used by the replace mode.

## `strictness` (type: `string`):

standard: swearing, slurs and explicit sexual slang. strict: also mild words (damn, crap, hell, bloody) and clinical or everyday terms (sexual, penis, sucks, nude), for children's apps.

## `detectObfuscation` (type: `boolean`):

Leetspeak (sh1t, $hit), spaced letters (f u c k), stretched letters (fuuuck), self-censored words (f\*ck) and look-alike letters from other alphabets.

## `blockWords` (type: `array`):

Your own words. End a word with \* to block every word that starts with it (frak\* blocks frakking).

## `allowWords` (type: `array`):

Words that are never flagged, e.g. a brand, a place or a surname.

## `onlyFlagged` (type: `boolean`):

Every checked text is still charged.

## `maxTexts` (type: `integer`):

Upper limit of texts checked in one run.

## Actor input object example

```json
{
  "texts": [
    "What a great product, thanks!",
    "This is sh1t and the support is f u c k i n g useless",
    "Your Password was reset. Greetings from Scunthorpe."
  ],
  "textField": "text",
  "languages": [
    "auto"
  ],
  "mode": "mask",
  "maskChar": "*",
  "replacement": "[censored]",
  "strictness": "standard",
  "detectObfuscation": true,
  "onlyFlagged": false,
  "maxTexts": 100000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "texts": [
        "What a great product, thanks!",
        "This is sh1t and the support is f u c k i n g useless",
        "Your Password was reset. Greetings from Scunthorpe."
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("blueberry_rainstorm/profanity-filter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "texts": [
        "What a great product, thanks!",
        "This is sh1t and the support is f u c k i n g useless",
        "Your Password was reset. Greetings from Scunthorpe.",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("blueberry_rainstorm/profanity-filter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "texts": [
    "What a great product, thanks!",
    "This is sh1t and the support is f u c k i n g useless",
    "Your Password was reset. Greetings from Scunthorpe."
  ]
}' |
apify call blueberry_rainstorm/profanity-filter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blueberry_rainstorm/profanity-filter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VAqpfHPCa9hFs2HDE/builds/t29vEiBINoddnOznn/openapi.json
