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.
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.
Advanced analysis
Tier 3: full context analysis with severity score, character positions, categories, and contextual signals. Most detail.
Batch analysis
Tier 3: up to 100 texts per request, each with full position tracking and context analysis.
Detection with metadata
Tier 2: returns hasProfanity, count, and severity without modifying content. Lighter than /analyze.
Batch detection
Tier 2: batch profanity detection with metadata for up to 100 texts.
Basic filtering
Tier 1: replaces detected profanity with asterisks. Fastest option — no metadata returned.
Batch filtering
Tier 1: filter multiple texts at once. Returns asterisk-replaced text for each input.
Service health
Status, version, tier capabilities, Redis database size. Root / redirects here.
Prometheus metrics
Detection counts, processing durations, error rates, and tier utilization.
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | yes* | Text to analyze (1–10,000 characters). Required for single-text endpoints. |
| texts | string[] | yes** | Array of texts for batch endpoints. Repeat the parameter or pass JSON array (1–100 items). |
| severity | string | no | Sensitivity filter: "low", "medium", "high", or "critical". |
| language | string | no | Language code. Tier 3 supports "en" only. Defaults to "en". |
| api_key | string | yes | API 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.
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
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
https://datpaq.com/api/v1/profanity/health
https://datpaq.com/api/v1/profanity/metrics
| Tier | Endpoints | Returns | Use when |
|---|---|---|---|
| Tier 1 | /filter, /filter-batch | Asterisk-replaced text | You need a clean version of the string |
| Tier 2 | /detect, /detect-batch | hasProfanity, count, severity | You want metadata without content modification |
| Tier 3 | /analyze, /analyze-batch | Positions, categories, context analysis | You 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.
Required text or texts parameter not provided. Include ?text= for single or repeat ?texts= for batch.
Text is empty or exceeds 10,000 characters. Batch items must each stay within the limit.
Severity value not recognized. Must be one of: "low", "medium", "high", or "critical".
Language not supported in the current tier. Tier 3 supports "en" only.
More than 100 texts provided in a single batch request. Split into smaller batches.
API key missing or invalid. Pass api_key as a query param or x-api-key as a header.
Too many requests from this IP. Retry after 15 minutes.
Internal error during profanity analysis. The correlationId in the response helps with debugging.
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.