Get started with IP2FY in minutes. Here's how to make your first API request:
curl "https://api.ip2fy.com/8.8.8.8"
IP2FY uses API keys for authentication. Include your API key as a query parameter:
curl "https://api.ip2fy.com/8.8.8.8?key=YOUR_API_KEY"
All API responses are returned in JSON format. Here's an example response:
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0840",
"org": "AS15169 Google LLC",
"postal": "94035",
"timezone": "America/Los_Angeles"
}
fetch('https://api.ip2fy.com/8.8.8.8')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
import requests
response = requests.get('https://api.ip2fy.com/8.8.8.8')
data = response.json()
print(data)
$response = file_get_contents('https://api.ip2fy.com/8.8.8.8');
$data = json_decode($response, true);
print_r($data);
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
URL url = new URL("https://api.ip2fy.com/8.8.8.8");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Rate limits vary by your plan:
The API returns appropriate HTTP status codes and error messages:
Check out our FAQ for common questions or contact support for personalized assistance.