Websites

Websites let you use the Ip2Geo SDK and API directly from the browser. When you add a website, a public key is generated and tied to that domain, so browsers only get answers on pages served from it. A public key converts addresses and never reads your conversions.

  1. 1

    Have an Account

    Create your Ip2Geo account or login to your existing account if you haven’t already. You can do that by visiting the Ip2Geo Dashboard. Once logged in, select the project you want to add a website to from your dashboard.

  2. 2

    Add a Website

    Navigate to the Websites section within your project. Click on “Add Website”, enter your domain (e.g. myapp.com), and confirm. A public key (i2g_pk_…) will be generated automatically. From a terminal, ip2geo websites add “My app” myapp.com does the same with the CLI.

  3. 3

    Authenticate Your Project

    Use the public key to authenticate your project when using the SDK or making direct API calls from your frontend. It converts addresses; reading your conversions takes a secret key, from your server.

A public key sits in your page’s code, so treat it as public. Browsers send the page’s Origin header and the API only answers when it matches the key’s domain, but any other client can send whatever Origin it likes. That is why a public key can only convert addresses, which count toward your project’s quota, and can never read your conversions. If a copied key spends more than it should, disable or remove its website, and read conversions from your server with a secret key.

Get Started

Convert IPs into accurate location data in milliseconds.

Sign up today and get 1,000 free monthly conversions, and discover why developers trust us for fast, reliable, and affordable IP conversions.