.NET SDK · Feature

Fraud Detection & Risk Scoring in .NET

Collapse every signal — geolocation, proxy/VPN/Tor flags, datacenter hosting, disposable email, syntax — into a single 0–100 risk score you can act on at sign-up, checkout, or login. Or pull the raw IpReputationAsync record when you want to build your own rules.

Trusted by thousands of businesses
Fast JSON API responses
Real-time validation
Simple integration, SDKs & examples
What it does

One score from every signal

Individual flags are powerful, but acting on each one is fiddly. RiskScoreAsync weighs geolocation, anonymizer flags, datacenter hosting, and email quality into a single number with a bucketed level, so you can make a block / review / allow decision in one comparison — and still drill into the contributing factors when you need to explain a decision.

Prerequisites

1

Score an IP with RiskScoreAsync

Returns a Score (0–100) and a human RiskLevel, plus the Factors that drove it. Use RiskScoreAsync() for the caller's IP.

var client = new IpApiClient(Environment.GetEnvironmentVariable("IP_API_IO_KEY")!);

var risk = await client.RiskScoreAsync("185.220.101.1");

Console.WriteLine(risk.Score);     // 88
Console.WriteLine(risk.RiskLevel); // "high"
if (risk.Factors.Ip is { } ip)
    Console.WriteLine($"{ip.IsTorNode} {ip.IsDatacenter}");

if (risk.Score >= 75)
{
    // block, or send to manual review / step-up auth
}
2

Score an email with EmailRiskScoreAsync

Same 0–100 scale, driven by email signals (disposable provider, invalid syntax). Use it to grade leads or gate sign-ups by address quality.

var risk = await client.EmailRiskScoreAsync("user@mailinator.com");

Console.WriteLine($"{risk.Score} {risk.RiskLevel}"); // 90 high
if (risk.Factors.Email is { } email)
    Console.WriteLine(email.IsDisposable); // True
3

Raw signals with IpReputationAsync

Returns the underlying reputation data for an IP — use it when you want the source signals rather than a computed score.

var reputation = await client.IpReputationAsync("185.220.101.1");
Console.WriteLine(reputation);
Reference

Response reference

RiskScore (from RiskScoreAsync / EmailRiskScoreAsync)

PropertyTypeDescription
ScoredoubleRisk score, 0 (safe) – 100 (high risk)
RiskLevelstringBucketed level, e.g. "low", "medium", "high"
Ipstring?Scored IP (when applicable)
Emailstring?Scored email (when applicable)
FactorsRiskScoreFactorsIp and/or Email (nullable)

Factors.Ip: IsProxy, IsVpn, IsTorNode, IsSpam, IsDatacenter, RiskContribution. Factors.Email: IsDisposable, IsValidSyntax, RiskContribution.

FAQ

Frequently asked questions

How do I score an IP for fraud risk in C#?

Call await client.RiskScoreAsync(ip). It returns a Score from 0 (safe) to 100 (high risk), a human RiskLevel, and the Factors that drove it. Use RiskScoreAsync() to score the caller's own IP.

Can I score an email address too?

Yes. await client.EmailRiskScoreAsync(email) returns the same 0–100 scale driven by email signals such as disposable provider and invalid syntax — use it to grade leads or gate sign-ups by address quality.

What's the difference between RiskScoreAsync and IpReputationAsync?

RiskScoreAsync gives you a computed 0–100 score and bucketed level you can act on directly. IpReputationAsync(ip) returns the underlying reputation record — use it when you want the source signals to build your own rules.

What threshold should I block at?

A common pattern is to allow low scores, send medium scores to step-up verification, and block or manually review high scores (e.g. risk.Score >= 75). Tune the cutoffs to your own fraud tolerance and false-positive budget.

Start building with the ip-api.io .NET SDK

Run dotnet add package IpApiIo, drop in your free API key, and ship in minutes — one async client for geolocation, fraud detection, and email validation.

Need support?

Explore how IP-API.io can enhance your security, provide robust bot protection, and improve IP geolocation accuracy for your applications.

Contact Support

Found a bug in the SDK?

The IpApiIo package is open source. Open an issue or pull request on GitHub and we'll take a look.

Open on GitHub