Check for profane words
This endpoint checks if the input text contains any profane words in Malayalam or Manglish.
POST
/check
Python
import requests
url = "https://profanity.abhi.fun/check"
data = {
"text": "Your input text here"
}
response = requests.post(url, json=data)
print(response.json())
fetch('https://profanity.abhi.fun/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: "Your input text here"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://profanity.abhi.fun/check")
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {text: "Your input text here"}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
<?php
$url = 'https://profanity.abhi.fun/check';
$data = array('text' => 'Your input text here');
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://profanity.abhi.fun/check"
requestBody, _ := json.Marshal(map[string]string{
"text": "Your input text here",
})
resp, err := http.Post(url, "application/json", bytes.NewBuffer(requestBody))
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
}
curl \
-X POST https://profanity.abhi.fun/check/check \
-H "Content-Type: application/json" \
-d '{"text":"Your input text here"}'
Request example
{
"text": "Your input text here"
}
Response examples (200)
{
"contains_profanity": true,
"profane_words": [
"badword1",
"badword2"
]
}
Response examples (400)
{
"error": "Invalid input, 'text' field is required."
}