curl "https://api.c99.nl/geoip?key=YOUR_API_KEY&host=1.1.1.1&json"
curl -H "X-Api-Key: YOUR_API_KEY" \ "https://api.c99.nl/geoip?host=1.1.1.1&json"
import requests r = requests.get("https://api.c99.nl/geoip", params={ "key": "YOUR_API_KEY", "host": "1.1.1.1", "json": 1 }) print(r.json()["records"]["country_name"])
import requests r = requests.get("https://api.c99.nl/geoip", params={"host": "1.1.1.1", "json": 1}, headers={"X-Api-Key": "YOUR_API_KEY"}) print(r.json()["records"]["country_name"])
const res = await fetch( "https://api.c99.nl/geoip?key=YOUR_API_KEY&host=1.1.1.1&json" ); const data = await res.json(); console.log(data.records.country_name);
const res = await fetch("https://api.c99.nl/geoip?host=1.1.1.1&json", { headers: { "X-Api-Key": "YOUR_API_KEY" } }); const data = await res.json(); console.log(data.records.country_name);
$url = "https://api.c99.nl/geoip?key=YOUR_API_KEY&host=1.1.1.1&json"; $data = json_decode(file_get_contents($url), true); echo $data["records"]["country_name"];
$ctx = stream_context_create(["http" => ["header" => "X-Api-Key: YOUR_API_KEY"]]); $url = "https://api.c99.nl/geoip?host=1.1.1.1&json"; $data = json_decode(file_get_contents($url, false, $ctx), true); echo $data["records"]["country_name"];
{
"success": true,
"ip": "1.1.1.1",
"records": { "country_name": "Australia", "city": "Brisbane", ... }
}
Short questions, fast answers!