NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Spam Detector API

POST

Catch spam in submitted text before it goes live.

Spam Detector is a spam detection API that evaluates text submissions to determine whether content is likely spam. Pass a message body and an optional sender email to check for spam patterns, with paid plans adding IP blocklist and disposable email checks.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/spamdetector
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "likelySpam": true,
    "isDisposableEmail": false,
    "isIPBlacklisted": false,
    "ipDetails": {
      "country": "IN",
      "region": "DL"
    },
    "parsed": true
  }
}

About the Spam Detector API

Make one spam check API call per comment, contact form or chat message before it goes live. Spam Detector scores the text against the patterns of form and comment spam: link density and link markup, pharma, adult, prize, gambling, crypto and investment pitches, advance-fee and loan scams, SEO, backlink and guest-post outreach (in English, Russian, French, Spanish and Portuguese), Telegram and WhatsApp calls to action, urgency phrases, shouting and foreign-script blocks. It returns spamScore from 0 to 1 and likelySpam at 0.5 and above, so ordinary booking, order and support messages pass while sales spam is caught.

What people use it for

Forum Comment Screening
Community platforms evaluate incoming forum posts and blog comments to hold suspected spam for moderator review before it appears publicly.
Contact Form Filtering
When visitors submit inquiry forms, lead capture systems check the message text and sender email to drop junk leads automatically.
Chat Message Moderation
Flag suspicious direct messages in real time to stop promotional bots from spamming newly registered members.
Job Listing Verification
To prevent affiliate link abuse, job boards screen incoming vacancy descriptions before listing them in search results.

Worked example: Check a comment before it's published

A blog comment form sends the comment text and the commenter's email before saving anything.

Request
curl -X POST https://api.apiverve.com/v1/spamdetector \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hi! Great article. Earn $5000 a week from home with no experience, click here now: bit.ly/fast-cash-now",
    "email": "promo@mailinator.com"
  }'
Response
{
  "status": "ok",
  "error": null,
  "data": {
    "likelySpam": true,
    "isDisposableEmail": true,
    "isIPBlacklisted": null,
    "ipDetails": null,
    "parsed": true
  }
}

likelySpam is the verdict on the text. isDisposableEmail flags the throwaway mailinator address; that check and the IP blocklist need a paid plan.

isIPBlacklisted and ipDetails stay null here because no ip was sent.

Edge cases and limits

A verdict, not a score
likelySpam is true or false. Decide what a true does in your app: block it, hold it for review, or ask for one more step.
Send the IP too
For form spam the sender's IP is often a strong signal. Pass ip to check it against blocklists (paid plans).
Not a bot check
Turnstile or reCAPTCHA stop scripts at submit time; this judges what was actually written. They catch different spam, so use both.
Keep the result
Store likelySpam with the submission, so a false positive can be found and released later.

Compared with the alternatives

Akismet
Built around WordPress comments and priced per site. A good fit inside WordPress; this API is a plain HTTP call from any stack, on the same key as your other APIVerve APIs.
Your own keyword rules
Free and quick to start, but spammers adapt and the list becomes yours to maintain. For the address alone, see the Disposable Email Checker API.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Spam Detector

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Spam Detector API.

Read the docs →
How do I set my own spam threshold?
Use spamScore, a value from 0 to 1, instead of likelySpam. likelySpam is true at 0.5 and above; a stricter form can hold anything above 0.35 for review, and a busy comment section can auto-delete above 0.8 and queue the rest. Single weak signals such as one link or the word discount stay well under 0.5, so normal customer messages are not flagged. Paid plans also return spamSignals, the names of the signals that fired, such as seo, pharma, links or messagingCta. A disposable sender email on a paid plan sets likelySpam true without changing spamScore.
How many messages can I screen for spam on the Free plan?
The Free plan includes 20 checks per month at 10 credits per call. For higher volumes, the Starter plan covers 20,000 checks each month, which works out to about $1.50 per 1,000 calls.
Can I check for disposable emails and blacklisted IPs on the Free plan?
No, disposable email detection and IP blocklist lookups require a paid plan, and on the Free plan a disposable sender does not change likelySpam. Upgrading to Starter or above also unlocks sender country and region data, along with the ability to submit an IP address for inspection.
Do I have to provide an email or IP address with every text check?
No, only the text input is required to evaluate a submission. Adding an email address is optional on every plan; adding an IP address requires a paid plan, giving you additional signals by checking sender details against spam databases.
Can I pass an IP address to the check if I am on the Free plan?
The IP parameter is restricted to paid subscriptions. If you are on the Free plan, you can only analyze the message body. An email address is accepted on every plan, but the disposable-sender check that can raise likelySpam runs on paid plans.
What kinds of text submissions can I analyze?
You can send any string of text where spam may appear, including forum replies, contact form messages, product reviews, and user bios. The service evaluates the content and indicates whether it is likely spam.

Ready to build with Spam Detector? Start with 200 free credits — one key unlocks all 420+ APIs.

Explore the catalog

420+ APIs on the same key and the same response shape.

Browse all APIs