Spam Score
Heuristic spam scoring for form submissions and user-generated content.
/v1/auth/spam-score
curl -X POST "https://auth.toolkitapi.io/v1/auth/spam-score" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "[email protected]",
"body": "Hi, I am interested in your services. Please contact me.",
"honeypot": "",
"elapsed_seconds": 45.2
}'
import httpx
resp = httpx.post(
"https://auth.toolkitapi.io/v1/auth/spam-score",
json={
"name": "John Doe",
"email": "[email protected]",
"body": "Hi, I am interested in your services. Please contact me.",
"honeypot": "",
"elapsed_seconds": 45.2
},
)
print(resp.json())
const resp = await fetch("https://auth.toolkitapi.io/v1/auth/spam-score", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "John Doe",
"email": "[email protected]",
"body": "Hi, I am interested in your services. Please contact me.",
"honeypot": "",
"elapsed_seconds": 45.2
}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"score": 0.018,
"verdict": "ham",
"signals": [],
"total_weight": 0.0
}
Try It Live
Description
How to Use
1. Include the form field values in the request: `body` (required), plus optional fields like `name`, `email`, `subject`, `honeypot`, `ip_address`, and `elapsed_seconds`.
2. Add a hidden `honeypot` field to your form (bots fill it, humans don't) and pass its value.
3. Track the time between page load and form submission, and pass it as `elapsed_seconds`.
4. Send a POST request and use the `score` and `verdict` to decide whether to accept, flag, or reject the submission.
About This Tool
The Spam Score endpoint analyzes form submissions using heuristic rules to determine spam probability. It returns a score between 0.0 (definitely legitimate) and 1.0 (definitely spam), along with a human-readable verdict and the individual signals that contributed to the score.
The heuristic engine checks for honeypot fields, submission timing (bots submit forms almost instantly), known spam trigger phrases, excessive URLs, email mismatches, ALL CAPS abuse, excessive punctuation, suspicious short content, URLs in name fields, and high non-ASCII content ratios.
This provides a lightweight spam filtering layer that doesn't require external services, CAPTCHA, or machine learning models — making it ideal for contact forms, comment sections, and other user-generated content.
Why Use This Tool
- Contact form protection — Filter spam from website contact forms without CAPTCHA
- Comment moderation — Pre-screen user comments for spam signals
- Registration screening — Flag suspicious sign-up attempts
- Content moderation pipelines — First-pass filtering before human review
- Honeypot validation — Detect bots that fill hidden form fields
- Submission timing checks — Catch automated submissions that happen too fast
Frequently Asked Questions
What are the verdict thresholds?
How does the honeypot detection work?
What elapsed_seconds value indicates a bot?
Can I use this as my only spam protection?
What spam phrases are detected?
Start using Spam Score now
Get your free API key and make your first request in under a minute.