Back to articles
Build an IP Geolocation Tool in JavaScript (Free API, No MaxMind Account)
How-ToSystems

Build an IP Geolocation Tool in JavaScript (Free API, No MaxMind Account)

via Dev.to TutorialOzor

You need IP geolocation for your app. Maybe you're personalizing content by country, detecting fraud, or just showing users their timezone. The usual path: sign up for MaxMind, download their database, write a parser, keep it updated. Or skip all that with a single API call. In this tutorial, you'll build a working IP geolocation lookup tool using a free API that requires no account setup, no database downloads, and returns results in under 50ms. What We're Building A command-line tool that: Looks up any IP address and returns country, timezone, coordinates Calculates distance between two IPs Batch-processes a list of IPs from a file Get Your API Key (30 seconds) curl -X POST https://agent-gateway-kappa.vercel.app/api/keys/create You'll get back a key like gw_abc123... with 200 free credits. No email, no credit card, no OAuth dance. Step 1: Basic IP Lookup Let's start simple. Look up Google's DNS server: curl "https://agent-gateway-kappa.vercel.app/v1/agent-geo/api/geo/8.8.8.8" \ -H "A

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles