Resolves the country of the caller's IP address. When behind Cloudflare, the CF-IPCountry header is preferred.
fields
(string, query, optional)
Comma-separated list of extra fields to include in the response. Options: city, continent, subdivision, postal, location, asn
Constraints: {'enum': ['city', 'continent', 'subdivision', 'postal', 'location', 'asn']}
Look up the caller's IP
probe-gate
curl 'https://api.country.is/'
import requests
resp = requests.get("https://api.country.is/")
data = resp.json()
import zingu_apis
api = zingu_apis.api("country.is")
result = api.fetch("")
for item in result:
print(item)
const resp = await fetch("https://api.country.is/");
const data = await resp.json();