Phishing Checker Template
- Next.js
- TypeScript
Check any link or domain against known phishing lists before you open it, with clear advice either way.
A Next.js app that checks whether a link or a domain is a known phishing site. Paste something from an email, text or ad and get a red or green verdict with plain advice on what to do, plus a risk score and the list it was reported on when your plan includes them. Use it as a safety tool for your team or customers, or lift the API route to screen links in your own inbox, chat or support queue.

What it does
- Links or domains
- Takes a full link or just a domain, and sends each to the API the right way.
- A clear verdict
- A red or green card with advice for each case, and an honest note that an unlisted site isn’t a guarantee.
- Risk score and sources
- On paid plans, shows a 0 to 100 risk meter, the matched list entry, which feeds reported it, and look-alike warnings.
- Recent checks
- Keeps your last six checks on the device, each tagged Phishing or Clear.
- Keeps your key private
- The browser only talks to your own API route, which checks the input, caches answers and limits each visitor to 10 checks a minute.
How it works
The API route: it decides whether you sent a link or a domain, then calls Phishing Domain Checker.
/** GET /api/check?q=...: checks a domain or a full link against known phishing lists. */
export async function GET(request: Request) {
const q = str(new URL(request.url).searchParams.get('q'), 2000);
if (!q) return fail('Enter a link or a domain to check');
// A full link (with a scheme or a path) goes as url; a bare name goes as domain.
const isUrl = /^[a-z]+:\/\//i.test(q) || q.includes('/');
const body = isUrl ? { url: /^[a-z]+:\/\//i.test(q) ? q : `https://${q}` } : { domain: q.toLowerCase() };
if (!isUrl && !/^[a-z0-9.-]+\.[a-z0-9-]{2,}$/i.test(q) && !/^xn--/i.test(q)) {
return fail('That doesn’t look like a domain, like example.com');
}
const key = `check:${JSON.stringify(body)}`;
const hit = fromCache<Verdict>(key, TTL_MS);
if (hit) return Response.json(hit);
const blocked = guard(request);
if (blocked) return blocked;
return respond(async () => {
const data = await callApi<Verdict>('phishingcheck', { json: body });
toCache(key, data);
return data;
});
}Deploy it
- Get a free API key
The free plan includes 200 credits a month, no card needed. Create your key.
- Deploy it
Click Deploy to Vercel. Vercel copies the repo to your GitHub account and asks for
APIVERVE_API_KEY: paste your key there. - Open your app
Vercel builds it and gives you a live URL, usually in about a minute. Every push to the repo redeploys it.
Try the Phishing Domain Checker API — the call this template makes
No key required to try it. Get a key to use it in your app.
{
"status": "ok",
"error": null,
"data": {
"domain": "secure-banking-login.suspicious-domain.com",
"isPhishing": true,
"matchedDomain": "suspicious-domain.com",
"inputType": "url",
"originalInput": "https://secure-banking-login.suspicious-domain.com/auth",
"isPunycode": false,
"isIpAddress": false,
"riskScore": 85,
"riskLevel": "high",
"sources": [
"phishing-database",
"blocklistproject"
]
}
}