Give it an IP, get back the country name and country code. A Supabase Edge Function with automatic failover and caching.
Enter an IP address below to look up its country and flag.
One endpoint. One parameter. That's it.
GET /?ip=45.196.201.208
→ { "ip": "45.196.201.208", "country": "Philippines", "countryCode": "PH" }
curl https://bprkazfxqmanrybiexnh.supabase.co/functions/v1/geo-api?ip=8.8.8.8
Returns: {"ip":"8.8.8.8","country":"United States","countryCode":"US"}
git clone <repo>
cd supabase/functions/geo-api
supabase functions deploy geo-api --no-verify-jwt
Requires Supabase project with SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY set.