IP Reputation Badge
Embed a live IP reputation badge as an SVG image on any website or README. No authentication required.
Endpoint
http
GET https://ipswamp.com/api/public/badgePublic Endpoint
This is a public endpoint. No API key or authentication is required.
Request
Query Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
ip | string | Yes | The IP address to check (IPv4 or IPv6) | — |
style | string | No | Badge style: shield or flat | shield |
Response
Returns an SVG image with Content-Type: image/svg+xml. The badge displays the threat level and score for the requested IP address.
Threat Level Colors
| Threat Level | Color | Hex Code |
|---|---|---|
LOW | Green | #22c55e |
MEDIUM | Yellow | #eab308 |
HIGH | Orange | #f97316 |
CRITICAL | Red | #ef4444 |
UNKNOWN | Gray | #6b7280 |
Embedding
HTML
html
<img
src="https://ipswamp.com/api/public/badge?ip=1.2.3.4"
alt="IPSwamp threat level for 1.2.3.4"
/>With flat style:
html
<img
src="https://ipswamp.com/api/public/badge?ip=1.2.3.4&style=flat"
alt="IPSwamp threat level for 1.2.3.4"
/>Markdown (GitHub, README)
markdown
Rate Limiting
WARNING
This endpoint is rate-limited to 2 requests per minute per IP address.
Error Responses
| Status | Response | Description |
|---|---|---|
400 | SVG badge with "IP REQUIRED" | Missing or invalid IP |
429 | { "error": true, "statusCode": 429, "message": "Rate limit exceeded..." } | 2/min limit hit |
Examples
HTML Page
html
<!DOCTYPE html>
<html>
<head>
<title>IP Reputation Check</title>
</head>
<body>
<h2>IPSwamp Reputation Badge</h2>
<p>Threat level for 1.2.3.4:</p>
<img
src="https://ipswamp.com/api/public/badge?ip=1.2.3.4"
alt="IPSwamp threat level"
/>
<p>Flat style:</p>
<img
src="https://ipswamp.com/api/public/badge?ip=1.2.3.4&style=flat"
alt="IPSwamp threat level"
/>
</body>
</html>Dynamic IP in JavaScript
typescript
function getBadgeUrl(ip: string, style: "shield" | "flat" = "shield"): string {
return `https://ipswamp.com/api/public/badge?ip=${encodeURIComponent(ip)}&style=${style}`;
}
const badgeUrl = getBadgeUrl("80.94.92.164", "shield");
console.log(`Embed badge: <img src="${badgeUrl}" />`);See Also
- Check IP Address — Full authenticated IP lookup with threat intelligence data
- Bulk IP Lookup — Check multiple IPs at once