Skip to content

IPDataInfo/ipdata-dotnet

Repository files navigation

IPData.info .NET SDK — Free IP Geolocation & Threat Intelligence API

NuGet CI License: MIT

Official .NET client for ipdata.info — a free, fast IP geolocation, ASN, and threat-intelligence API. Look up country, city, ASN, timezone, currency, and security flags (proxy/VPN/Tor/hosting) for any IPv4 or IPv6 address. Powered by ipdata.info.

Get a free API key

The public endpoint is free — 50 requests/min, no signup, no key. For higher rate limits and batch lookups, create a free API key at ipdata.info/register and manage it in your dashboard.

Install

dotnet add package IPDataInfo.Sdk

Quickstart

using IPDataInfo;

using var client = new IPDataClient(); // free tier; or new IPDataClient(apiKey: "KEY")

var info = await client.LookupAsync("8.8.8.8");
Console.WriteLine($"{info.City}, {info.Country} ({info.AsnOrg})"); // Mountain View, United States (Google LLC)

Methods

Method What it returns
LookupAsync(ip?) Full geolocation record (own IP if ip omitted)
GeoAsync(ip) Geo subset (city/region/country/lat/lon/tz)
AsnAsync(ip) ASN + ISP/registry for an IP
BatchAsync(ips) Many IPs at once (requires an API key)
AsnDetailAsync(n) ASN detail incl. prefixes
AsnWhoisHistoryAsync(n) ASN whois history
AsnChangesAsync() ASN change feed
ThreatDomainAsync/ThreatHashAsync/ThreatUrlAsync(x) Threat-intel lookup (domain / file hash / URL)

Full response schema: ipdata.info API docs · SDK list.

Configuration

new IPDataClient(
    apiKey: "KEY",                     // sent as X-Api-Key; switches to pro.ipdata.info
    baseUrl: "https://ipdata.info",    // override the host
    httpClient: customHttpClient,      // bring your own HttpClient (proxy, handlers, ...)
    timeout: TimeSpan.FromSeconds(5)); // ignored when httpClient is supplied

Errors from non-2xx responses are thrown as IPDataInfo.IpDataException with StatusCode and Message.

Rate limits

  • Free (ipdata.info): 50 req/min, no key.
  • Paid (pro.ipdata.info): higher limits + BatchAsync, with an API key.

Other SDKs

12 official SDKs — see the full list at ipdata.info/docs/sdks: Python, Node.js, Go, PHP, Java, Rust, .NET, Kotlin, Swift, Dart, Bash, Objective-C.

License

MIT © ipdata.info

About

Official .NET SDK for the ipdata.info IP geolocation, ASN & threat-intelligence API

Topics

Resources

License

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages