Code examples which enable you to integrate our API with your software and services
import requests
profile = "security" #your profile:security/asn/fuzzygeo/device
user_ip = "87.85.40.100" #the ip address variable
jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" #the token you received associated with your user
server = "https://www.privacyapi.eu" #our server
# Construct API URL
url = f"{server}/{profile}/{user_ip}?jwt={jwt_token}"
# Make the GET request to the API
response = requests.get(url)
# Print response if required
print(response)
$server = "https://www.privacyapi.eu"; // our server
$profile = "security"; //your profile:security/asn/fuzzygeo/device
$user_ip = "85.85.40.100"; //the ip address variable
$jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"; //the token you received associated with your user
// Build the API URL
$url = "{$server}/{$profile}/{$user_ip}?jwt={$jwt_token}";
// Send a GET request to the API
$response = file_get_contents($url);
// Print the response if required
$json_response = json_decode($response, true);
print_r($json_response);
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class ApiCall {
public static void main(String[] args) throws IOException {
String server = "https://www.privacyapi.eu"; // our server
String profile = "security"; //your profile:security/asn/fuzzygeo/device
String user_ip = "85.85.40.100"; //the ip address variable
String jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"; //the token you received associated with your user
// Build the API URL
String url = String.format("%s/%s/%s?jwt=%s", server, profile, user_ip, jwt_token);
// Send a GET request to the API
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestMethod("GET");
// Read the response and build a response string if required
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuilder response = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
response.append(line);
}
in.close();
// Print the response
System.out.println(response.toString());
}
}
using System;
using System.IO;
using System.Net;
class Program
{
static void Main()
{
string server = "https://www.privacyapi.eu"; // our server
string profile = "security"; // your profile:security/asn/fuzzygeo/device
string user_ip = "85.85.40.100"; //the ip address variable
string jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"; //the token you received associated with your user
// Build the API URL
string url = $"{server}/{profile}/{user_ip}?jwt={jwt_token}";
// Send a GET request to the API
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Read the response and build a response string if required
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream);
string responseText = reader.ReadToEnd();
reader.Close();
// Print the response
Console.WriteLine(responseText);
}
}
require 'net/http'
require 'json'
server = "https://www.privacyapi.eu" # our server
profile = "security" # your profile:security/asn/fuzzygeo/device
user_ip = "85.85.40.100" #the ip address variable
jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" # the token you received associated with your user
# Build the API URL
url = "#{server}/#{profile}/#{user_ip}?jwt=#{jwt_token}"
# Send a GET request to the API
uri = URI(url)
response = Net::HTTP.get(uri)
# # Parse the response as Hash if required
json_response = JSON.parse(response)
# Print the response
puts json_response
$curl https://www.privacyapi.eu/security/80.251.8.5?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
where :
"https://www.privacyapi.eu" is our server
"security" is your profile: security/asn/fuzzygeo/device
"85.85.40.100" represents the ip address variable
jwt="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" is the token you received associated with your user
Privacy4IP is an European company. Our servers are located in Europe. Our state-of-the-art API complies with the most demanding international regulations to protect the privacy of your personal data, maintaining the maximum statistical or security interest.
Privacy4IP was created by me, Gorka Echeverria. Software engineer. Concerned about the present of data protection in the world of data engineering.
Copyright ©. All Rights Reserved. — Designed with love by Untree.co