Prerequisites
- Node.js 18+ with
ip-api-ioinstalled - A free ip-api.io API key
Read suspicious_factors on any lookup
No dedicated call needed — the flags ride along with a normal lookup.
import { IpApiClient } from "ip-api-io";
const client = new IpApiClient({ apiKey: process.env.IP_API_IO_KEY });
const info = await client.lookup("185.220.101.1");
const f = info.suspicious_factors;
console.log(f.is_vpn); // VPN service
console.log(f.is_proxy); // open / anonymizing proxy
console.log(f.is_tor_node); // Tor node
console.log(f.is_datacenter); // hosting / datacenter IP (often a bot)
console.log(f.is_spam); // known spam source
console.log(f.is_crawler); // known crawler / bot
console.log(f.is_threat); // listed on a threat feed
if (f.is_vpn || f.is_proxy || f.is_tor_node) {
// require step-up verification (CAPTCHA, 2FA)
} Confirm a Tor exit node with torCheck
A dedicated check against the live Tor node list, with a count of matching nodes.
const tor = await client.torCheck("185.220.101.1");
console.log(tor.is_tor); // true
console.log(tor.tor_node_count); // number of matching Tor nodes riskScore.