# Profanity Filter API
> Detect and censor profanity in user-generated text across 24 languages — for comment moderation, chat filtering, username and form validation, and trust-and-safety pipelines. Send any text and get back whether it contains profanity, the exact bad words found and which languages they belong to; or get the text back with every bad word masked (choose your own mask character). Matching is word-boundary aware (so "Scunthorpe" and "Penistone" are not flagged) and normalises common leetspeak (sh1t, @ss) before matching. Target a specific language (or several) or scan all 24 at once. Powered by the well-known LDNOOBW word lists, bundled in — so the service is fully self-contained: no third-party calls, no rate limits, always available. Live, no cache. 4 endpoints. No upstream key.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/profanity-api/..."
```

## Pricing
- **Free** (Free) — 1,820 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 40,000 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 215,000 calls/Mo, 20 req/s
- **Mega** ($57/Mo) — 1,060,000 calls/Mo, 50 req/s

## Endpoints

### Moderation

#### `GET /v1/check` — Detect profanity

**Parameters:**
- `text` (query, required, string) — Text to scan Example: `this shit is great`
- `lang` (query, optional, string) — Language code(s), comma-separated, or all

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/profanity-api/v1/check?text=this+shit+is+great"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "matches": [
            {
                "word": "shit",
                "languages": [
                    "da",
                    "en",
                    "nl",
                    "no"
                ]
            }
        ],
        "is_profane": true,
        "languages_checked": 24
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:05.001Z",
        "request_id": "50bd9071-a1d7-42f9-a6cd-712831d9aec0"
    },
    "status": "ok",
    "message": "Detect profanity",
    "success": true
}
```

#### `GET /v1/clean` — Censor profanity

**Parameters:**
- `text` (query, required, string) — Text to censor Example: `this shit is great`
- `lang` (query, optional, string) — Language code(s) or all
- `mask` (query, optional, string) — Mask character (default *)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/profanity-api/v1/clean?text=this+shit+is+great"
```

**Response:**
```json
{
    "data": {
        "cleaned": "this **** is great",
        "matches": [
            "shit"
        ],
        "original": "this shit is great",
        "masked_count": 1
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:05.110Z",
        "request_id": "55e14e75-8cb9-42fd-a02e-6027f5f73410"
    },
    "status": "ok",
    "message": "Censor profanity",
    "success": true
}
```

### Reference

#### `GET /v1/languages` — Supported languages

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/profanity-api/v1/languages"
```

**Response:**
```json
{
    "data": {
        "count": 24,
        "languages": [
            {
                "code": "ar",
                "terms": 38
            },
            {
                "code": "cs",
                "terms": 41
            },
            {
                "code": "da",
                "terms": 20
            },
            {
                "code": "de",
                "terms": 66
            },
            {
                "code": "en",
                "terms": 403
            },
            {
                "code": "eo",
                "terms": 37
            },
            {
                "code": "es",
                "terms": 68
            },
            {
                "code": "fa",
                "terms": 45
            },
            {
                "code": "fi",
                "terms": 130
            },
            {
                "code": "fr",
                "terms": 91
            },
            {
                "code": "hi",
                "terms": 119
            },
            {
                "code": "hu",
                "terms": 96
            },
            {
                "code": "it",
                "terms": 168
            },
            {
                "code": "ja",
                "terms": 180
            },
            {
                "code": "ko",
                "terms": 72
            },
            {
                "code": "nl",
                "terms": 190
            },
            {
                "code": "no"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/profanity-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; this gateway requires x-api-key",
        "name": "Profanity Filter API",
        "note": "Detect and censor profanity in 24 languages. /v1/check?text=... flags matches; /v1/clean?text=...&mask=* returns censored text; pass ?lang=en (or comma-separated, default: all languages). Word-boundary matching + leetspeak normalisation. Self-contained — no network calls, always available.",
        "source": "Bundled LDNOOBW word lists (24 languages) — fully local, no upstream",
        "endpoints": 4
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:05.318Z",
        "request_id": "28185532-b634-45e7-a1eb-378aa7617eb7"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/profanity-api
OpenAPI spec: https://www.oanor.com/api/profanity-api/openapi.json
