A security badge is an SVG image that shows a domain's grade from its latest verified Website Security scan. Add it to your site to show visitors the result.
Get the badge
The badge is served at:
https://api.vigilbase.com/tools/v1/badge/{domain}
It is part of the Tools API. The older https://vigilbase.com/api/badge/{domain} and https://vigilbase.com/api/v1/badge/{domain} are permanent aliases: they serve the same badge and will never be retired, so badges already embedded keep working. Unlike the other legacy Tools URLs, they send no Deprecation or Sunset header.
After a successful Website Security scan, the result shows a preview and the HTML to copy:
<a href="https://vigilbase.com/tools/website-security" target="_blank" rel="noopener noreferrer"><img src="https://api.vigilbase.com/tools/v1/badge/example.com" alt="example.com - Security Grade - Scanned by Vigilbase" title="Security scan powered by Vigilbase"></a>
From the CLI, vigilbase badge example.com prints the badge URL without making a request.
Styles
Add ?style= to choose a style:
| Style | URL | Shape |
|---|---|---|
default | /tools/v1/badge/example.com | 56 px high, with "SECURITY VERIFIED", the domain and the grade |
compact | /tools/v1/badge/example.com?style=compact | 44 px high, the same content smaller |
mini | /tools/v1/badge/example.com?style=mini | 28 px high, the domain and the grade only |
Long domains are shortened with .. to fit.
Which grade it shows
The badge shows the grade of the most recent completed Website Security scan of that exact domain, once Vigilbase has checked that the stored result is genuine. A leading www. and a trailing dot are ignored, so www.example.com and example.com show the same badge. Pass a bare domain: a scheme or path in {domain} makes it invalid.
It shows ? in grey when there is no such scan, for example when the domain was never scanned with Website Security, or when the latest scan's result can't be verified. Results from other tools, and self-reported Cloudflare Checkup results, never appear on a badge.
| Grade | Colour |
|---|---|
| A+, A | Green |
| B | Blue |
| C | Yellow |
| D | Orange |
| F | Red |
Caching and limits
The badge URL is public: it needs no API key, and it sends Access-Control-Allow-Origin: *.
Badges with a grade are cached for a day, and a ? badge for an hour. After that, a cache may keep serving the old badge for up to a week while it fetches a fresh one, so a new scan can take a day or more to appear. When Vigilbase can't look the grade up, for example under heavy load, the badge shows ? and isn't cached, so the next request tries again.
Each client IP can request 60 badges a minute; beyond that the badge URL answers 429 with Retry-After and a plain-text body. An invalid domain answers 400.