Profanity Filter

免费增值
通过 carter383 | 已更新 לפני חודש | Text Analysis
人气

7.6 / 10

延迟

2,896ms

服务等级

100%

Health Check

100%

README

Profanity Filter API Documentation

Our Profanity Filter API provides a sophisticated tool for detecting and filtering profane language in text across various platforms. Using cutting-edge algorithms, the API moderates content in real time by identifying and replacing offensive words with customizable placeholders. This service is ideal for a range of applications, from social media to customer support, ensuring a professional and clean communication environment. Integration is straightforward, backed by comprehensive documentation and dedicated developer support.

Python Examples

1. Detect Profanity in Text

This example demonstrates how to check if a string contains profanity. If profanity is detected, the response will be true.

import requests

url = "https://profanity-filter3.p.rapidapi.com/contains_profanity"

headers = {
    "content-type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "profanity-filter3.p.rapidapi.com"
}

payload = "Text To Filter"

response = requests.put(url, data=payload, headers=headers)
print(response.json())

Response Example:

{
  "Contains_Profanity": false
}

2. Filter Profanity from Text

This example demonstrates how to filter out profanity from a string, replacing any profane words with asterisks (***).

import requests

url = "https://profanity-filter3.p.rapidapi.com/filter_profanity"

headers = {
    "content-type": "application/json",
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "profanity-filter3.p.rapidapi.com"
}

payload = "text to filter"

response = requests.put(url, data=payload, headers=headers)
print(response.json())

Response Example:

{
  "Filtered Text": "text to filter"
}

Ensure you replace "YOUR_RAPIDAPI_KEY" with your actual RapidAPI key to authenticate requests successfully.

关注者:0
API 创建者:
Rapid account: Carter 383
carter383
carter383
登录并给 API 打分
打分:5 - 投票:1