Overview

PurgoMalum is a public, free-to-use API designed for profanity filtering and content moderation. It offers a straightforward method for developers to identify and filter out undesirable words from text inputs. The API operates via simple HTTP GET requests, making it accessible for rapid integration into various applications, particularly those with educational purposes or small-scale content moderation needs. Since its inception in 2012, PurgoMalum has maintained a focus on accessibility, requiring no API key or authentication for its services.

The core functionality of PurgoMalum revolves around its ability to detect common profanity and provide options for sanitizing the input. Users can choose to replace detected words with asterisks, specific characters, or even custom replacement strings. Furthermore, the API supports custom word lists, allowing developers to extend or modify the default filter to suit specific content policies or linguistic requirements. This flexibility makes it suitable for scenarios where a predefined list of offensive terms needs to be managed without the overhead of a complex moderation system.

PurgoMalum is particularly well-suited for developers building prototypes, educational tools, or small community platforms where basic content filtering is necessary but budget or complexity constraints prohibit commercial solutions. Its ease of use and lack of authentication requirements significantly reduce the barrier to entry for implementing text sanitization. While it provides essential filtering, developers should note that for high-volume, enterprise-level content moderation with advanced features like image and video analysis, or sophisticated AI-driven contextual understanding, alternative services such as Sightengine's content moderation platform may be more appropriate.

The API's design emphasizes simplicity and directness. For example, filtering a string involves a single GET request to an endpoint with the text as a query parameter. This approach simplifies client-side implementation across various programming languages, from Python to JavaScript, enabling developers to quickly integrate the filtering logic into their applications without extensive setup. The service aims to provide a reliable, basic profanity filter for text-based content, focusing on ease of deployment and immediate utility for developers.

While PurgoMalum is effective for basic text filtering, developers should consider the scope of their moderation needs. For applications that require real-time, high-precision moderation across multiple content types, including user-generated images and videos, or those that need to comply with specific regulatory standards, more comprehensive commercial solutions are available. However, for projects where a simple, free, and readily available text profanity filter is the primary requirement, PurgoMalum offers a functional and accessible option.

Key features

  • Profanity filter API: Detects and flags common swear words and offensive language in text inputs.
  • Swear word detection: Identifies explicit terms based on an internal lexicon.
  • Custom word filtering: Allows users to provide a custom list of words to be filtered, either in addition to or instead of the default list, by passing them as a query parameter to the API endpoint.
  • Replacement options: Supports various methods for replacing detected profanity, including asterisks (*), custom characters (e.g., #), or a user-defined replacement string. For example, replacing "badword" with "goodword".
  • No authentication required: The API is freely accessible without the need for API keys or user accounts, simplifying integration.
  • RESTful API: Utilizes standard HTTP GET requests for all operations, making it compatible with virtually any programming language or environment.
  • Text sanitization: Provides a mechanism to clean user-generated content, comments, or messages before display or storage.

Pricing

PurgoMalum is offered as a free service, with no associated costs or tiered plans. As of May 2026, there are no charges for API usage, and no API key is required for access.

Plan Features Price (as of May 2026)
Free Tier Unlimited requests, profanity filtering, custom word lists, various replacement options, no API key required. Free

For the most current information regarding usage and terms, refer to the PurgoMalum API documentation.

Common integrations

PurgoMalum's RESTful API allows integration into any application capable of making HTTP requests. Common integration scenarios include:

  • Web forms: Sanitize user input in contact forms, comment sections, or forums before processing or display.
  • Chat applications: Filter messages in real-time to maintain appropriate communication standards.
  • Educational platforms: Ensure content generated by students or users adheres to academic guidelines.
  • Gaming platforms: Moderate player chat and usernames to foster a positive gaming environment.
  • Content management systems (CMS): Cleanse user-submitted articles or blog comments.
  • IoT devices: Filter text data collected or transmitted by connected devices.

Detailed examples for various programming languages are available in the PurgoMalum API reference documentation.

Alternatives

  • WebPurify: Offers profanity filtering, moderation, and image/video analysis, with commercial plans.
  • Sightengine: Provides AI-powered content moderation for images, videos, and text, including profanity detection and explicit content filtering.
  • moderatecontent: An API for image and text moderation, supporting profanity filtering and NSFW detection, with free and paid tiers.

Getting started

Getting started with PurgoMalum involves making a simple HTTP GET request to its API endpoint. The primary endpoint for filtering text is https://www.purgomalum.com/service/plain?text=your_text_here. You can replace your_text_here with the string you wish to filter. For instance, to filter the phrase "This is some bad language", you would construct the URL as https://www.purgomalum.com/service/plain?text=This%20is%20some%20bad%20language. The API will return the filtered text directly in the response body.

To replace profanity with specific characters, such as asterisks, you can use the fill_char parameter. For example, https://www.purgomalum.com/service/plain?text=This%20is%20some%20bad%20language&fill_char=* will replace each offensive word with asterisks. Similarly, the fill_text parameter allows you to replace offensive words with a custom string, like https://www.purgomalum.com/service/plain?text=This%20is%20some%20bad%20language&fill_text=CLEAN.

For advanced filtering, PurgoMalum supports specifying a custom list of words to be filtered or added to the default list. This is achieved using the add or remove parameters. For example, to add "customword" to the filter list, you would use https://www.purgomalum.com/service/plain?text=your_text_here&add=customword. Multiple words can be added or removed by separating them with commas. This flexibility enables developers to fine-tune the filtering behavior to match specific application requirements or community standards.

Below is a Python example demonstrating how to use the PurgoMalum API to filter a string and replace profanity with asterisks:

import requests

def filter_text_purgomalum(text_to_filter):
    base_url = "https://www.purgomalum.com/service/plain"
    params = {
        "text": text_to_filter,
        "fill_char": "*"  # Replace profanity with asterisks
    }
    try:
        response = requests.get(base_url, params=params)
        response.raise_for_status()  # Raise an exception for HTTP errors
        return response.text
    except requests.exceptions.RequestException as e:
        print(f"An error occurred: {e}")
        return None

# Example usage:
original_text = "This is some offensive content with a badword."
filtered_result = filter_text_purgomalum(original_text)

if filtered_result:
    print(f"Original: {original_text}")
    print(f"Filtered: {filtered_result}")

original_text_custom_fill = "Another bad example with a swearword."
custom_fill_params = {
    "text": original_text_custom_fill,
    "fill_text": "[CENSORED]" # Replace profanity with a custom string
}
response_custom = requests.get("https://www.purgomalum.com/service/plain", params=custom_fill_params)
if response_custom.status_code == 200:
    print(f"Original with custom fill: {original_text_custom_fill}")
    print(f"Filtered with custom fill: {response_custom.text}")

# Example with adding a custom word to filter
text_with_custom_word = "This text contains mycustomword."
custom_word_params = {
    "text": text_with_custom_word,
    "add": "mycustomword",
    "fill_char": "#"
}
response_add_custom = requests.get("https://www.purgomalum.com/service/plain", params=custom_word_params)
if response_add_custom.status_code == 200:
    print(f"Original with added custom word: {text_with_custom_word}")
    print(f"Filtered with added custom word: {response_add_custom.text}")

This Python script demonstrates how to make a GET request, pass parameters for text and fill character, and print the filtered output. The requests library simplifies HTTP interactions. Developers can adapt this pattern to other languages like JavaScript (using fetch or XMLHttpRequest), PHP (using curl or file_get_contents), or Java (using HttpURLConnection or Apache HttpClient).