IpInfo 1.1.13
See the version list below for details.
dotnet add package IpInfo --version 1.1.13
NuGet\Install-Package IpInfo -Version 1.1.13
<PackageReference Include="IpInfo" Version="1.1.13" />
paket add IpInfo --version 1.1.13
#r "nuget: IpInfo, 1.1.13"
// Install IpInfo as a Cake Addin #addin nuget:?package=IpInfo&version=1.1.13 // Install IpInfo as a Cake Tool #tool nuget:?package=IpInfo&version=1.1.13
<img src="https://ipinfo.io/static/ipinfo-small.svg" alt="IPinfo" width="24"/> IPinfo C# Client Library
This is the official C# client library for the IPinfo.io IP address API, allowing you to lookup your own IP address, or get any of the following details for an IP:
- IP geolocation / geoIP data (city, region, country, postal code, latitude and longitude)
- ASN details (ISP or network operator, associated domain name, and type, such as business, hosting or company)
- Firmographics data (the name and domain of the business that uses the IP address)
- Carrier information (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)
Getting Started
You'll need an IPinfo API access token, which you can get by singing up for a free account at https://ipinfo.io/signup.
The free plan is limited to 50,000 requests per month, and doesn't include some of the data fields such as IP type and company data. To enable all the data fields and additional request volumes see https://ipinfo.io/pricing
Nuget
Install-Package IpInfo
Usage
using IpInfo;
using var client = new HttpClient();
var api = new IpInfoApi("your-token", client); // Some methods work without a token, for this case there is a constructor without a token.
var response = await api.GetCurrentInformationAsync();
Console.WriteLine($"City: {response.City}");
Batch API
// WARNING: Token required.
var dictionary = await api.GetInformationByIpsAsync(new[]
{
"8.8.8.8",
"8.8.4.4",
}, cancellationToken);
foreach (var pair in dictionary)
{
Console.WriteLine($"{pair.Key} City: {pair.Value.City}");
}
// 8.8.4.4 City: Amstelveen
// 8.8.8.8 City: Mountain View
// WARNING: Token required.
var dictionary = await api.BatchAsync(new []
{
"8.8.4.4/city",
"8.8.8.8/city",
}, cancellationToken);
foreach (var pair in dictionary)
{
Console.WriteLine($"{pair.Key}: {pair.Value}");
}
// 8.8.4.4: Amstelveen
// 8.8.8.8: Mountain View
Privacy Detection API
// WARNING: Token required. The token must have at least permissions of the Business Plan. Otherwise, you'll get a response with an HTTP 403 status code.
var privacy = await api.GetPrivacyInformationByIpAsync("8.8.8.8", cancellationToken);
Console.WriteLine($"Vpn: {privacy.Vpn}");
Console.WriteLine($"Proxy: {privacy.Proxy}");
Console.WriteLine($"Tor: {privacy.Tor}");
Console.WriteLine($"Hosting: {privacy.Hosting}");
// Vpn: False
// Proxy: False
// Tor: False
// Hosting: False
Live Example
C# .NET Fiddle - https://dotnetfiddle.net/i5MmNp
VB.NET .NET Fiddle - https://dotnetfiddle.net/EUszSY
Contacts
Other Libraries
There are official IPinfo client libraries available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails and Laravel. There are also many third party libraries and integrations available for our API.
About IPinfo
Founded in 2013, IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, company, carrier, VPN detection, hosted domains, and IP type data sets. Our API handles over 40 billion requests a month for 100,000 businesses and developers.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- Newtonsoft.Json (>= 13.0.1)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on IpInfo:
Repository | Stars |
---|---|
codesiddhant/Jasmin-Ransomware
Jasmin Ransomware is an advanced red team tool (WannaCry Clone) used for simulating real ransomware attacks. Jasmin helps security researchers to overcome the risk of external attacks.
|
|
mysteryx93/HanumanInstituteApps
432Hz Player, 432Hz Batch Converter, Powerliminals Player, Yang YouTube Downloader
|
Version | Downloads | Last updated |
---|---|---|
3.0.1 | 20,431 | 9/4/2024 |
3.0.0 | 140,419 | 12/7/2023 |
2.1.0 | 140,163 | 1/25/2023 |
2.0.2 | 44,884 | 9/1/2022 |
2.0.1 | 9,296 | 7/15/2022 |
2.0.0 | 3,113 | 6/9/2022 |
1.1.14 | 28,583 | 12/20/2021 |
1.1.13 | 14,603 | 11/10/2021 |
1.1.12 | 673 | 11/5/2021 |
1.1.11 | 1,184 | 10/27/2021 |
1.1.9 | 6,620 | 7/6/2021 |
1.1.8 | 728 | 7/6/2021 |
1.1.4 | 718 | 7/6/2021 |
1.1.3 | 676 | 7/6/2021 |
1.1.1 | 753 | 7/6/2021 |
1.0.5.4 | 822 | 7/5/2021 |
1.0.5.3 | 680 | 7/5/2021 |
1.0.5.2 | 5,446 | 3/25/2021 |
1.0.5.1 | 5,953 | 9/5/2020 |
1.0.5 | 1,129 | 8/30/2020 |
1.0.4.2 | 922 | 8/30/2020 |
1.0.4.1 | 929 | 8/30/2020 |
1.0.4 | 933 | 8/30/2020 |
1.0.3 | 950 | 8/30/2020 |
1.0.2 | 943 | 8/30/2020 |
1.0.1 | 876 | 8/10/2020 |
1.0.0 | 948 | 8/9/2020 |
1.0.0-beta.4 | 289 | 8/9/2020 |
1.0.0-beta.3 | 308 | 8/9/2020 |
1.0.0-beta.2 | 334 | 8/9/2020 |
1.0.0-beta.1 | 589 | 8/9/2020 |
⭐ Last 10 features:
- feat: Added optional PrivacyResponse.Service value. 2021-11-10
- feat: add-relay-field 2021-11-05
- feat: Added README to NuGet package. 2021-10-27
- feat: To net6 and C# 10. 2021-10-27
- feat: Added symbols. 2021-07-07
- feat: Added AsnResponse.type 'inactive' value. 2021-07-07
- feat: city and country is not required more. Added bogon property. 2021-07-07
- feat: Updated to use H.NSwag.Generator instead manual generation. 2021-07-07
- feat: Updated NuGet packages. 2021-07-06
- feat: Changed generateOptionalParameters to true. 2021-07-06
🐞 Last 10 bug fixes:
- fix: Fixed GetInformationByIpsAsync nullable warning. 2021-07-06
- fix: Added null checks for ctor. 2021-07-06
- fix: Fixed missing ConfigureAwait(false) in GetInformationByIpsAsync. 2021-07-06
- fix: Removed timezone and loc from required properties. 2021-07-06
- fix: Removed timezone and loc from required properties. 2021-07-06
- fix: Fixed #10. 2021-07-06
- fix: Fixed #10. 2021-07-06
- fix: Commented Run tests in dotnet.yml(Test token is not valid). 2021-03-26
- fix: Fixed dotnet.yml. 2021-03-26
- fix: Released 1.0.5.2. 2021-03-26