// Get basic IP information
fetch('https://freeproxytk.com/ip.php')
.then(response => response.json())
.then(data => {
console.log('Your IP:', data.ip);
console.log('IP Version:', data.ip_version);
});
// Get IP as plain text
fetch('https://freeproxytk.com/ip.php?format=text')
.then(response => response.text())
.then(ip => console.log('IP:', ip));
Python
import requests
# Get IP in JSON format
response = requests.get('https://freeproxytk.com/ip.php')
data = response.json()
print(f"IP Address: {data['ip']}")
print(f"Timestamp: {data['time_utc']}")
# Get detailed information
detailed = requests.get('https://freeproxytk.com/ip.php?detailed=true')
print(detailed.json())
PHP
// Get IP information
$json = file_get_contents('https://freeproxytk.com/ip.php');
$data = json_decode($json, true);
echo "Your IP: " . $data['ip'] . "\n";
echo "Service: " . $data['service'] . "\n";
// Get plain text IP
$ip = file_get_contents('https://freeproxytk.com/ip.php?format=text');
echo "IP: " . $ip;
cURL
# Get JSON response
curl https://freeproxytk.com/ip.php
# Get plain text IP
curl https://freeproxytk.com/ip.php?format=text
# Get detailed XML response
curl https://freeproxytk.com/ip.php?format=xml&detailed=true
# Save CSV to file
curl https://freeproxytk.com/ip.php?format=csv -o ip_data.csv
Try in Browser Console
Copy and paste this code into your browser's developer console:
fetch('https://freeproxytk.com/ip.php')
.then(r => r.json())
.then(data => console.log('Your IP is:', data.ip));