Profanity API
3-Tier Architecture
Redis-backed
Batch: 100 texts

Content moderation.Built for scale.

A 3-tier profanity detection API — from fast asterisk filtering to full context analysis with severity scores, position tracking, and batch support. One clean REST call.

3 tiers · filter → detect → analyze10k chars · per text100 · texts per batch4 severity · levels

Why Profanity API

Detection that goes deeper.

Blazing Fast

Redis-backed in-memory architecture handles hundreds of thousands of lookups per second — no cold starts, no latency spikes.

3-Tier Architecture

Choose your depth: basic filtering (Tier 1), detection with metadata (Tier 2), or full context analysis with position tracking (Tier 3).

Context-Aware Analysis

Tier 3 goes beyond word matching — detecting severity, character positions, categories, and contextual signals like intensifiers.

Batch Processing

Send up to 100 texts in a single request. Each item is validated and processed individually with its own result and error detail.

Compliance Ready

Explainable, auditable results with correlationIds on every response. Consistent error shapes make incident tracing straightforward.

Simple to Integrate

Pure GET requests with query-string auth — no JSON body required for single-text calls. Works from a browser, curl, or any HTTP client.

/api/v1/profanity

Endpoints, at a glance.

Three tiers, eight routes. Start with /analyze for full context detail, or drop down to /filter for raw speed.

GET/analyze

Advanced analysis

Tier 3: full context analysis with severity score, character positions, categories, and contextual signals. Most detail.

Tier 3PRIMARY
GET/analyze-batch

Batch analysis

Tier 3: up to 100 texts per request, each with full position tracking and context analysis.

Tier 3
GET/detect

Detection with metadata

Tier 2: returns hasProfanity, count, and severity without modifying content. Lighter than /analyze.

Tier 2
GET/detect-batch

Batch detection

Tier 2: batch profanity detection with metadata for up to 100 texts.

Tier 2
GET/filter

Basic filtering

Tier 1: replaces detected profanity with asterisks. Fastest option — no metadata returned.

Tier 1
GET/filter-batch

Batch filtering

Tier 1: filter multiple texts at once. Returns asterisk-replaced text for each input.

Tier 1
GET/health

Service health

Status, version, tier capabilities, Redis database size. Root / redirects here.

GET/metrics

Prometheus metrics

Detection counts, processing durations, error rates, and tier utilization.

ParameterTypeRequiredDescription
textstringyes*Text to analyze (1–10,000 characters). Required for single-text endpoints.
textsstring[]yes**Array of texts for batch endpoints. Repeat the parameter or pass JSON array (1–100 items).
severitystringnoSensitivity filter: "low", "medium", "high", or "critical".
languagestringnoLanguage code. Tier 3 supports "en" only. Defaults to "en".
api_keystringyesAPI key via query string. Alternatively pass as x-api-key header.

Requests & responses.

All GET requests. No body required — pass text as a URL-encoded query param.

Tier 3 — Full analysis

Positions, categories, context, and severity in one call.

GET https://datpaq.com/api/v1/profanity/analyze?api_key=YOUR_API_KEY&text=You%20are%20so%20damn%20rude.&severity=low
Batch & filter

Process 100 texts at once, or get simple asterisk filtering.

GET https://datpaq.com/api/v1/profanity/analyze-batch?api_key=YOUR_API_KEY\
  &texts=Good%20morning\
  &texts=What%20the%20hell%3F\
  &texts=Have%20a%20great%20day\
  &severity=low
Health

https://datpaq.com/api/v1/profanity/health

Metrics

https://datpaq.com/api/v1/profanity/metrics

TierEndpointsReturnsUse when
Tier 1/filter, /filter-batchAsterisk-replaced textYou need a clean version of the string
Tier 2/detect, /detect-batchhasProfanity, count, severityYou want metadata without content modification
Tier 3/analyze, /analyze-batchPositions, categories, context analysisYou need full audit-ready detail

Error reference

Predictable errors, always structured.

Every error response includes a correlationId for request tracing and a clear error message.

400Missing Parameter

Required text or texts parameter not provided. Include ?text= for single or repeat ?texts= for batch.

400Invalid Text Length

Text is empty or exceeds 10,000 characters. Batch items must each stay within the limit.

400Invalid Severity

Severity value not recognized. Must be one of: "low", "medium", "high", or "critical".

400Unsupported Language

Language not supported in the current tier. Tier 3 supports "en" only.

400Batch Limit Exceeded

More than 100 texts provided in a single batch request. Split into smaller batches.

401Unauthorized

API key missing or invalid. Pass api_key as a query param or x-api-key as a header.

429Rate Limited

Too many requests from this IP. Retry after 15 minutes.

500Processing Error

Internal error during profanity analysis. The correlationId in the response helps with debugging.

503Service Unavailable

Tier 3 features temporarily unavailable. Fall back to /detect or /filter while the service recovers.

Example error response

{
  "success": false,
  "error": "Text exceeds maximum length of 10000 characters",
  "meta": {
    "correlationId": "stu901-vwx234",
    "timestamp": "2026-04-06T00:00:00.000Z"
  }
}
Start moderating in minutes.

One GET request returns severity, positions, and context. No body, no boilerplate — just a URL-encoded text param and your API key.