Video
Languages used
- HTML
- JavaScript
Features used
Steps
1
Sign up for Radar
If you haven’t already, sign up for Radar to get your API key. You can make up to 100,000 API requests per month for free.Get API keys
2
Install the Radar web SDK
In an HTML page, include the SDK using a In a web app, install the package from npm, then import the library:
<script>
tag:3
Call the IP geocoding API
The IP geocoding API converts IP address into city, state, and country.Initialize the SDK with your publishable API key, then call the IP geocoding API.In the callback,
result.address
will include countryCode
, stateCode
, city
, coarse latitude
and longitude
, and more.