apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · SECURITY & PRIVACY

CheckText Profanity API

What it does

The CheckText Profanity API is a profanity filter API that checks text for swear words and offensive language. Send a comment, message or username and find out whether it contains profanity, how many times, and which words were matched.

It is one POST endpoint. Send the text to check, and optionally a language code such as en, which is the default. The response tells you contains_profanity as true or false, gives a match_count, and lists the exact words found in matches, so you can block the text, mask the words, or send it to a moderator with the problem highlighted.

Matching is based on a published list of profane words, so results are predictable and easy to explain to users: a word is either on the list or it is not. Common uses include checking usernames and display names at sign-up, screening comments, reviews and chat messages before they are published, filtering in-game chat, and flagging user content for a moderation queue.

A word list catches explicit language but not insults, threats or harassment written in polite words. For that, use the Detect Text Toxicity API, or the AI Text Moderation API for broader content moderation. If you do not know the language of the text in advance, detect it first with the Language Detection API and pass the result as language.

You can try it right here in the playground. Start for free with 5 API calls a day, no card required, and check your own text before you commit.

The API is also available through ApyHub MCP, so AI agents can screen text for profanity directly before they publish or reply.

POST
Profanity check
https://api.eu.apyhub.com/dosvak/profanity-check

QUICKSTART

GUIDE

Quickstart

Check a piece of text for profanity by sending it with the required text field.

curl -X POST "https://api.eu.apyhub.com/dosvak/profanity-check" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"This is a clean example sentence.","language":"en"}'

What you'll get back

Returns a JSON object. The schema does not declare any specific top-level fields, so the exact response shape may vary.

{
  "language": "en",
  "contains_profanity": true,
  "match_count": 2,
  "matches": [
    "word_1",
    "word_2"
  ],
  "attribution": [
    {
      "source": "censor-text/profanity-list"
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
TextInput*

About this endpoint

What it does

Checks a submitted text string for profanity and returns a response object. The exact response shape is not defined in the output schema, so the endpoint’s success payload should be treated as an object with additional properties.

Request Body

ParameterTypeMandatoryDescription
textStringYesText to check. Minimum length 1.
languageStringNoLanguage code for the text. Minimum length 2, maximum length 5. Default: en.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.