Gawrshdarn!

A playful profanity filter API for developers

"What the hell is this damn thing?"
"What the heck in a handbasket is this dadgummit thing?"

Try It Out

Clean a Webpage

Paste a URL and see the magic happen - side by side comparison of original vs. cleaned text.

API Reference

Base URL: https://api.gawrshdarn.com

POST /api/detect

Check if text contains profanity and get a list of matches.

Request
curl -X POST https://api.gawrshdarn.com/api/detect \
  -H "Content-Type: application/json" \
  -d '{"text": "What the hell?"}'
Response
{
  "contains_profanity": true,
  "matches": ["hell"],
  "count": 1
}

POST /api/filter

Censor or remove profanity from text.

Request
curl -X POST https://api.gawrshdarn.com/api/filter \
  -H "Content-Type: application/json" \
  -d '{"text": "What the hell?", "mode": "censor"}'
Response
{
  "filtered": "What the h***?",
  "original": "What the hell?",
  "changes": 1
}

Mode options: censor (default) or remove

POST /api/replace

Replace profanity with playful, family-friendly alternatives.

Request
curl -X POST https://api.gawrshdarn.com/api/replace \
  -H "Content-Type: application/json" \
  -d '{"text": "What the hell is this damn thing?"}'
Response
{
  "replaced": "What the heck in a handbasket is this dadgummit thing?",
  "original": "What the hell is this damn thing?",
  "substitutions": 2
}

POST /api/fetch

Fetch a webpage and clean its text content.

Request
curl -X POST https://api.gawrshdarn.com/api/fetch \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/page"}'
Response
{
  "original": "The extracted text from the page...",
  "cleaned": "The cleaned text with replacements...",
  "substitutions": 5,
  "url": "https://example.com/page"
}

Features

Lightning Fast

Built in Rust with Aho-Corasick algorithm for O(n) pattern matching. Sub-millisecond response times.

Word Boundaries

Smart detection avoids false positives. "class" won't trigger a match, but "ass" will.

Case Preserving

Replacements match the original case. "DAMN" becomes "DADGUMMIT", "Damn" becomes "Dadgummit".

Playful Replacements

Family-friendly alternatives that keep the spirit of the original. Great galloping gooseberries!