REST API ยท v1

ScamDefender API

Detect scams, phishing URLs, and fraudulent emails in your app with a single API call. Powered by real-time threat intelligence with sub-3s response times.

โœ“ 95%+ detection rate
โœ“ <3s response time
โœ“ URL, email & text scanning
โœ“ 99.9% uptime SLA

Quickstart

Make your first scan in under 60 seconds. Get your API key from the dashboard after subscribing to any API plan.

curl -X POST https://scamdefender.ai/api/v1/scan \
  -H "Content-Type: application/json" \
  -H "x-api-key: sd_live_your_key_here" \
  -d '{"type": "url", "content": "https://suspicious-site.com"}'

Authentication

All API requests require an API key passed in the x-api-key header. Keys take the form sd_live_... and are generated from your dashboard.

Header
x-api-key: sd_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Security note: Keep your API key secret. Never expose it in client-side code or commit it to version control. Use environment variables.

Endpoint

The API currently exposes a single unified scan endpoint.

POST/api/v1/scan
Scan a URL, email address, or text message for scam indicators. Returns a verdict, confidence score, and actionable evidence.

Request body

Send a JSON body with two required fields:

FieldTypeRequiredDescription
typestringrequiredOne of: url, email, text
contentstringrequiredThe URL, email address, or message text to scan. Max 10,000 characters.
URL scan
{
  "type": "url",
  "content": "https://suspicious-bank.com/verify"
}
Email scan
{
  "type": "email",
  "content": "suspicious@sketchy-domain.ru"
}
Text scan
{
  "type": "text",
  "content": "URGENT: Your account is suspended. Send gift card..."
}

Responses

Successful scans return HTTP 200 with a JSON body:

Response schema
verdictstring"safe" | "suspicious" | "likely_scam"
confidencenumber0.0 โ€“ 1.0 detection confidence
risk_scorenumber0 โ€“ 100 overall risk
evidencestring[]Up to 5 reasons for the verdict
next_stepsstring[]Recommended actions
scan_idstringUnique ID for this scan
usage.calls_usednumberCalls used this month
usage.calls_limitnumberYour plan monthly limit
usage.resets_atstringISO 8601 reset timestamp
likely_scam response
{
  "verdict": "likely_scam",
  "confidence": 0.94,
  "risk_score": 92,
  "evidence": [
    "Detected as phishing website",
    "Contains malware or malicious code",
    "Flagged by threat intelligence"
  ],
  "next_steps": [
    "Do NOT visit this URL",
    "Delete the message",
    "Report to IT/authorities"
  ],
  "scan_id": "v1_1711234567_ab3f9",
  "usage": {
    "calls_used": 142,
    "calls_limit": 10000,
    "resets_at": "2026-04-01T00:00:00.000Z"
  }
}
safe response
{
  "verdict": "safe",
  "confidence": 0.89,
  "risk_score": 8,
  "evidence": [
    "No major threats detected",
    "Risk score: 8/100 (low)",
    "Domain age: 3847 days"
  ],
  "next_steps": [
    "URL appears safe",
    "Still use caution with sensitive data"
  ],
  "scan_id": "v1_1711234568_xy7k2",
  "usage": {
    "calls_used": 143,
    "calls_limit": 10000,
    "resets_at": "2026-04-01T00:00:00.000Z"
  }
}
safe
risk_score 0โ€“49
No significant threat indicators. Low risk.
suspicious
risk_score 50โ€“84
Some red flags present. Caution advised.
likely_scam
risk_score 85โ€“100
High confidence threat. Do not engage.

Error codes

All errors return JSON with an error field describing the issue.

StatusMeaningResolution
401UnauthorizedMissing or invalid x-api-key header. Check your key.
403Quota exceededMonthly call limit reached. Upgrade your plan or wait for the reset.
422Invalid requestMissing or invalid type / content fields in request body.
429Rate limitedToo many requests per second. Add exponential backoff and retry.
503Service unavailableDetection backend is temporarily unavailable. Retry after a few seconds.

Rate limits

Every response includes rate limit headers so you can monitor usage programmatically.

HeaderDescription
X-RateLimit-LimitYour plan's monthly call limit
X-RateLimit-RemainingCalls remaining this month
X-RateLimit-ResetISO 8601 timestamp of next quota reset
Monthly reset: All quotas reset on the 1st of each month at 00:00 UTC. Unused calls do not roll over.

Plans & pricing

Choose the plan that fits your volume. All API plans include the full endpoint and email support.

API Starter
$99/mo
10,000 calls/month
  • โœ“10K API calls/month
  • โœ“URL, email & text scanning
  • โœ“Full JSON responses
  • โœ“Rate limit headers
  • โœ“Email support
Get started
Best value
API Growth
$299/mo
50,000 calls/month
  • โœ“50K API calls/month
  • โœ“Everything in Starter
  • โœ“Priority support
  • โœ“Usage dashboard
  • โœ“SLA guarantee
Get started
API Enterprise
$499/mo
200,000 calls/month
  • โœ“200K API calls/month
  • โœ“Everything in Growth
  • โœ“Dedicated support
  • โœ“Custom integration help
  • โœ“Invoice billing
Get started
Need more volume?
Custom plans available for 500K+ calls/month. We can also offer white-label integration.
Contact sales โ†’