What Is Geocoding? - Everything You Need To Know

NOTE: An updated version of this article can be found in the Microsoft Maps Blog.

Whether you’re working on a customer fulfillment app or creating an asset tracking solution, geocoding is bound to be a key part of most mapping applications. What is geocoding, and how can an efficient geocoder power better apps? Find out everything you need to know with this guide, including how to get a geocoding API key, and what you can use geocoding for.

What is geocoding?

Also known as address geocoding, geocoding is the process of transforming text-based address descriptions into geographical coordinates. This can include anything from a standard street address to a general area name. The other direction, where geographical coordinates are converted into accurate text-based descriptions, is known as reverse geocoding.

Simple as the feature may sound, accurate geocoding is a lot more than just getting an API key and entering a list of addresses. There’s a great deal of variability in accuracy depending on the API you might be using. There can also be technical bottlenecks involved in the process, such as a limit on the number of addresses you can input at once, the quality of the text being given to convert, or the time required for the geocoder to process a batch.

a geocoded map of New York City

What we now call ‘geocoding’ is actually a part of the Geographic Information System (GIS) - a database of geographical information. The first practical application of geocoding was in the form of Dual Independent Map Encoding, a mapping tool used by the Census Bureau to store the geographical data generated during their operations. This is worth noting because much of what geocoding is used for today is an evolution of that very tool.

How geocoding works

Developers should have a brief idea of how geocoding works before getting an API key.There are two core elements of most geocoders: an input dataset and the geocoding algorithm itself. We already know that the input data consists of text-based addresses, but these can be of two types as well: relative and absolute.

  • Relative: This is what most geocoding algorithms would consider the most challenging to process. These addresses are reliant on another specific location, as such, this type of data isn’t sufficient in itself to make for an accurate geocode. For example, the address ‘the building in front of the burger shop’ is heavily dependent on the location of the shop, and the building cannot be located without first determining the position of the burger shop. Relative geocodes aren’t quite as accurate as absolutes, but geocoders are quickly catching up.
  • Absolute: These are basic text-based descriptions that do not rely on a reference location. Examples of absolute input data could range from simple postal codes to entire counties and landmarks.

Once you’ve gotten an API key, and are calling a geocoding API with your text string, geocoding algorithms take this input data and interpolate it to arrive at a geocode. This is done by using data that has already been mapped (like street names) to zero-in on accurate geographical coordinates for a given text-based address. Complications can arise here due to inconsistent address formats, missing address elements, misspellings, and geocoding in areas where street names and other key reference locations have not yet been mapped.

What is the best way to geocode for those challenging locations? GPS is often used for geocoding in areas where reliable reference data is not available, and some experts even use a mix of both interpolation and GPS (or other techniques) to geocode addresses. New technologies like place codes and machine learning applications are offering exciting results already–even for zones without satellite imagery–and could be the way forward.

Geocoding with Bing Maps API

Bing Maps’ Geocode Dataflow API is a spatial data service that allows for fast and accurate geocoding of multiple addresses at a time. This service is constantly being updated, with the latest data schema providing additional geocoding information for each job, including different points of routing and bounding box support for easier mapping. Each update further pushes the limits of what geocoding can be used for.

Enterprise users can currently run up to 10 geocoding jobs at the same time after getting an API key, consult our documentation to learn more about geocoding limits.

What is creating a batch geocoding job actually like? Surprisingly easy! The Geocode Dataflow API simplifies batch geocoding into an easy 4 step process.

  1. Format Your Data: Addresses in both XML and text file formats are supported. This could be in the form of a list of geographical coordinates (for reverse geocoding), strings of postcodes and unformatted/formatted addresses. Developers can follow the 1.0 data schema, but we would recommend using 2.0 for the added flexibility.
  2. Create a Job: This can be done using a single REST URL (shown below) or HTTP POST. Once you’ve initiated a job, you will automatically receive a URL to request the status of the job at any point.
    • http://spatial.virtualearth.net/REST/v1/Dataflows/Geocode?description=Geocode%20Demo&input=xml&output=xml&key=YourBingMapsKey
  3. Monitor: If you’d like to know what the status of the geocode job is, you can always use the provided URL to check in. The duration of this step can vary depending on how many addresses you are attempting to geocode at a time. You’ll need to get a Bing Maps API key and append it to the geocoding status URL to do this successfully.
  4. Download Results: And you’re done! Your geocoded results will be available for a period of 14 days. You’ll need your API key once again to successfully complete the download.

Check out our batch geocoding blog for an in-depth walkthrough of the entire process, including code samples to help you get started quicker.

a store locator sample for a coffee shop

For example, a business might want to create a store locator for their many branches, but their addresses might all be stored in a text-based format. This can easily be done by formatting and geocoding their branch addresses in a single job. These accurate coordinates can then be used to create a store locator or even an asset tracking solution further down the line.

What is geocoding used for?

What makes geocoding invaluable is the fact that it plays a role in nearly every web mapping application, from ecommerce platforms to CRM apps that store and process massive amounts of data. Geocoding addresses is a faster way to plot points of interest and improves business insight significantly, revealing key trends and allowing for meaningful spatial analysis.

Spatial analysis

Say a growing business is looking to expand to a new location and serve a wider group of customers, but they’re having trouble zeroing in on the perfect spot. An easy way to find the optimal location would be to parse addresses with the highest order amounts and frequencies to discover the most profitable spot. They could also use those coordinates to create a heatmap that reveals key customer trends and make an informed decision. All it takes to unlock these geocoding features is getting an API key.

What is remarkable about geocoding is that, whether it’s for ecommerce or brick-and-mortar stores, it plays a key role in the success of many business decisions. Geocoding opens the door for developers and researchers alike to analyze geographical data in a way that would simply be too time-consuming or inaccurate with text-based descriptions.

a sample heatmap of the US

Data management

When it comes to what geocoding is used for, data management is right at the top of the list. Working with text-based address descriptions isn’t just time-consuming, it’s also bulky. Entering long strings of addresses is a lengthy process and it also creates significant inaccuracies due to how inconsistent the descriptions can be across regions. These long strings take a significant amount of valuable server space for businesses that are working with a large number of clients.

Getting a geocoding API key allows you to use a geocode API to convert those bulky addresses into coordinates for easy data compression and manipulation. There’s very little ambiguity around accurately geocoded locations, and these are also much easier to work with inside a CRM system. For additional performance, geocodes can be stored for use by your application, which is permitted by the Microsoft Bing Maps Platform APIs Terms Of Use (See Section 5(n)).

App development

Improved data management is also what makes geocoding an essential tool for app development. Since geocoded addresses are more convenient to store and process, they can be exported and/or fetched from a server in seconds. This also reduces the chances of runtime errors and glitches since coordinates are consistent across multiple languages and regions.

Two different users might write their addresses differently, but the latitude/longitude values are not going to change. If you’re not sure what your business could use geocoding for, visit the Bing Maps API Samples portal to get inspired.

Get a geocoding API key

From a simple store locator to an advanced fleet tracking solution for thousands of agents, a reliable geocoding platform is what any robust mapping solution is built upon. Start building your own today by creating a free Bing Maps API key, and exploring everything the platform has to offer.


How can I manage my address and coordinate lists?

The Geocode Dataflow API is complemented by another spatial data service that allows for seamless creation and management of location data: the Data Source Management API. It can be used to quickly load in, update, and download your data sources.

What is the difference between a query versus an address Geocode API call?

The suite of Bing Maps Locations APIs offer the option to call with just a string of characters, known as a query string or to have the call with the address segments broken out.

Which Bing Maps API key is best for me?

Developers looking to try out geocoding can get a Basic API key for free, while businesses working on high-volume apps would benefit immensely from an Enterprise key. Visit our licensing page or contact us to learn more.