pricing background

C# API Integration

api

Geolocation Lookup

using System;
using System.Net.Http;
using System.Threading.Tasks;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.whoisfreaks.com/v1.0/geolocation?apiKey=API_KEY&ip=8.8.8.8");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Bulk Geolocation Lookup

using System;
using System.Net.Http;
using System.Threading.Tasks;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.whoisfreaks.com/v1.0/geolocation?apiKey=API_KEY");
request.Headers.Add("Content-Type", "application/json");
request.Content = new StringContent("{"ips":["1.1.1.1","2.2.2.2","8.8.8.8"]}");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());