# Spam Detector API

> 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.

**Endpoint:** `POST https://api.apiverve.com/v1/spamdetector`  
**Category:** Data Validation  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/spamdetector

## Overview

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.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/spamdetector" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Can you please spare some change?! Desperate!!! Send cash","email":"bankers@fre.323hotlain.net","ip":"122.180.184.182"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The text to detect spam in. length 0-50000 |
| `email` | string | No | The email address to validate against the spam database. This is optional. email |
| `ip` | string | No | The IP address to validate against the spam database. This is optional. ip. Premium field |

## Response fields

- `likelySpam` — boolean · Indicates whether the text is likely spam: spamScore of 0.5 or more, or (paid plans) a disposable sender email
- `isDisposableEmail` — boolean · Indicates if email address uses disposable email service · (premium)
- `isIPBlacklisted` — boolean · Indicates if IP address is on malicious blocklist · (premium)
- `ipDetails` — object · Geolocation of the supplied IP address, or null when no IP was given or it could not be located
  - `ipDetails.country` — string · Country code where IP address is geographically located · (premium)
  - `ipDetails.region` — string · Region or state where IP address is located · (premium)
- `parsed` — boolean · Indicates whether input data was successfully parsed

## Sample response

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

## Use cases

- **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.

## SDKs

- **npm** — `npm install @apiverve/spamdetector` (https://www.npmjs.com/package/@apiverve/spamdetector)
- **PyPI** — `pip install apiverve-spamdetector` (https://pypi.org/project/apiverve-spamdetector/)
- **NuGet** — `dotnet add package APIVerve.API.SpamDetector` (https://www.nuget.org/packages/APIVerve.API.SpamDetector)
- **Source** — https://github.com/apiverve/spamdetector-api

## More

- Full reference: https://docs.apiverve.com/ref/spamdetector
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
