Multi-Vector Spam Probability Scoring
Evaluates text patterns, URL domain reputation, and bot characteristics to yield numeric spam confidence scores (0.0 to 1.0).
Automated detection of blog comment spam, promotional abuse, phishing links, and malicious bot content.
https://rsflowhub.com/api/v1/ai/spam-detection
X-API-Key header{
"text": "WIN A FREE IPHONE NOW!!! Click here to claim your prize http://bit.ly/scam-link",
"content_type": "blog_comment",
"strictness": "high"
}
{
"result": {
"is_spam": true,
"spam_score": 0.97,
"spam_category": "phishing",
"reason": "Unsolicited prize claim with a shortened link and urgency pressure."
}
}
AI Text & Email Spam / Phishing Detection API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/spam-detection with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.
Tutorial: Detect Contact Form Spam with Python (Flask and Django)
Try it without code or signup: Free spam detector
POST /api/v1/ai/spam-detectionX-API-Key headerSend these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | Required | The raw text content to analyze (Max: 5,000 characters). |
content_type |
string | Optional | Context of where the text came from (e.g., "blog_comment", "email", "product_review"). Helps the AI understand the expected format. |
strictness |
string | Optional | Filter strictness: "low", "medium", or "high". Default is "medium". |
detect_toxicity |
boolean | Optional | Optional. Set to true to analyze the text for hate speech, harassment, and severe profanity. |
detect_pii |
boolean | Optional | Optional. Set to true to detect Personal Identifiable Information (emails, phone numbers, SSNs). |
return_sanitized |
boolean | Optional | Optional. Set to true to receive a redacted version of the text where malicious links, profanity, and PII are replaced with "[REMOVED]". |
Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.
curl -X POST "https://rsflowhub.com/api/v1/ai/spam-detection" \
-H "Content-Type: application/json" \
-H "X-API-Key: rfh_your_api_key" \
-d '{"text":"WIN A FREE IPHONE NOW!!! Click here to claim your prize http:\/\/bit.ly\/scam-link","content_type":"blog_comment","strictness":"high"}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->post('https://rsflowhub.com/api/v1/ai/spam-detection', [
'headers' => [
'Content-Type' => 'application/json',
'X-API-Key' => 'rfh_your_api_key',
],
'json' => array (
'text' => 'WIN A FREE IPHONE NOW!!! Click here to claim your prize http://bit.ly/scam-link',
'content_type' => 'blog_comment',
'strictness' => 'high',
),
]);
echo $response->getBody();
const response = await fetch('https://rsflowhub.com/api/v1/ai/spam-detection', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'rfh_your_api_key'
},
body: JSON.stringify({"text":"WIN A FREE IPHONE NOW!!! Click here to claim your prize http:\/\/bit.ly\/scam-link","content_type":"blog_comment","strictness":"high"})
});
const data = await response.json();
console.log(data);
import requests
url = "https://rsflowhub.com/api/v1/ai/spam-detection"
headers = {
"Content-Type": "application/json",
"X-API-Key": "rfh_your_api_key"
}
payload = {"text":"WIN A FREE IPHONE NOW!!! Click here to claim your prize http:\/\/bit.ly\/scam-link","content_type":"blog_comment","strictness":"high"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.
{
"success": true,
"request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
"data": {
"result": {
"is_spam": true,
"spam_score": 0.97,
"spam_category": "phishing",
"reason": "Unsolicited prize claim with a shortened link and urgency pressure."
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-05T09:30:00Z"
}
}
{
"success": false,
"request_id": "req_8c1d4e2a-7f3b-4a9c",
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid.",
"details": {
"text": [
"This field is required."
]
}
},
"meta": {
"version": "v1",
"timestamp": "2026-10-05T09:30:00Z"
}
}
| Field | Type | Meaning |
|---|---|---|
success | boolean | true when the call worked, false on any error. |
request_id | string | Unique id for this call. Quote it when you contact support. |
data.result | object | The result of this endpoint (see the example). |
error | object | Only on failure: code, message and details per field. |
meta | object | API version and server timestamp. |
All error codes: Errors reference
Evaluates text patterns, URL domain reputation, and bot characteristics to yield numeric spam confidence scores (0.0 to 1.0).
Adjust detection strictness between low, medium, high, and aggressive modes depending on user risk profile.
Scans inline links for suspicious redirects, scam domains, shortened URLs, and phishing indicators.
High-speed execution built for real-time contact form validation and blog comment submission gates.
How teams use the AI Text & Email Spam / Phishing Detection API in production.
Filter user-submitted blog comments to automatically block casino link spam, SEO link building, and bot comments.
{"is_spam": true, "confidence": 0.99, "reasons": ["phishing_link", "promotional_shouting"]}Keeps community comment sections clean with 0 manual effort.
Screen lead contact form submissions to block malicious sales bots and fake marketing inquiry spam.
{"is_spam": true, "confidence": 0.95, "reasons": ["unsolicited_seo_spam"]}Ensures sales teams only work with legitimate leads.
Block automated registration attempts using temporary spam email domains and bot profile text.
{"is_spam": true, "confidence": 0.97, "reasons": ["disallowed_commercial_link"]}Protects database from fake bot user accounts.
Public chatbots and lead forms attract spam and junk messages that waste credits and fill your inbox. Check a message with the spam API before the chatbot answers it or saves it as a lead.
How it works in a chatbot
Do not pay for an AI reply to a message that is obviously spam.
Screen names, emails and messages before they reach your lead list.
Choose how strict the check is for chat messages versus long form messages.
Want a chatbot without building one? The RSFlowHub AI chatbot for your website is live in about 5 minutes with one script tag: it answers from your documents, captures leads and creates support tickets. Read the chat widget guide, try the live chatbot demo, see chatbot pricing, or build your own with the chatbots API.
The same job done three ways.
| Topic | RSFlowHub API | Raw LLM prompts | Rules / regex |
|---|---|---|---|
| Output | Validated JSON fields | Free text you have to parse | Fixed patterns only |
| Setup | One POST request, no prompts | Write and maintain prompts and parsing | Write and maintain rule lists |
| Provider outage | Automatic fallback to a backup model | You build retries and a second vendor | Not applicable |
| Pricing | 2 credits per call, failed calls free | Per token, per vendor | Your own servers and upkeep |
| Understands context | Yes, AI model | Yes, AI model | No, keywords only |
Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.
Flowy
AI assistant