How to Geocode With the API

Maps are powerful tools that can be used in a variety of situations, from visualizing where customers live, to defining sales territories, to plotting crime patterns in neighborhoods. The first step in creating a map is to convert street addresses to latitude and longitude coordinates through a process called geocoding. You may not realize it, but you already encounter geocoding each time you type an address into a service like Google Maps or look up the school district for a property that is listed for sale on a real estate website.

This article will show you the steps for converting street addresses into latitude and longitude coordinates using the  geocoding API.

Step 1: Get your API Token

To make a request to the geocoding API, you will need a valid API token. Log in to your account at and navigate to your account page. Your API token will be visible on your account page and looks like a long string of random letters and numbers.

Step 2: Format your Request

Your request should be in the format:


For example, if your API token was “abc123” and you wanted to geocode the address of the White House, your request would be:

Notice that the address field has been URL encoded, which means that the special characters like spaces and commas have been converted to “%20” and “%2C” respectively. URL encoding ensures that no matter what special characters the address contains, it will still be a valid web address.

Step 3: Make the Request

The easiest way to make your request is to just paste the url from step 2 into a Web browser. You can also make the request via the CURL command in your terminal, your programming language of choice, or with an interactive REST client like Advanced REST Client. For code samples in many popular languages, visit the interactive console on the documentation. To view a code sample in your favorite language:

  1. Enter your values for the address and token fields in the console
  2. Click “Call Resource
  3. Select the “Code Example” tab and select your favorite language
latlon API code sample

Be sure to read the next Mapping article: How to Search Locations by Travel Time With the iGeolise TravelTime API