Prerequisites
- A .NET 6+ project with
IpApiIoadded - A free ip-api.io API key
Read SuspiciousFactors on any lookup
No dedicated call needed — the properties ride along with a normal LookupAsync.
var client = new IpApiClient(Environment.GetEnvironmentVariable("IP_API_IO_KEY")!);
var info = await client.LookupAsync("185.220.101.1");
var f = info.SuspiciousFactors;
Console.WriteLine(f.IsVpn); // VPN service
Console.WriteLine(f.IsProxy); // open / anonymizing proxy
Console.WriteLine(f.IsTorNode); // Tor node
Console.WriteLine(f.IsDatacenter); // hosting / datacenter IP (often a bot)
Console.WriteLine(f.IsSpam); // known spam source
Console.WriteLine(f.IsCrawler); // known crawler / bot
Console.WriteLine(f.IsThreat); // listed on a threat feed
if (f.IsVpn || f.IsProxy || f.IsTorNode)
{
// require step-up verification (CAPTCHA, 2FA)
} Confirm a Tor exit node with TorCheckAsync
A dedicated check against the live Tor node list, with a count of matching nodes.
var tor = await client.TorCheckAsync("185.220.101.1");
Console.WriteLine(tor.IsTor); // True
Console.WriteLine(tor.TorNodeCount); // number of matching Tor nodes RiskScoreAsync.