In a recent project at Redweb we had to provide a predictive location lookup and we were looking in to a bespoke solution using a postcode lookup service. The general functionality of the solution was to
- Take a location string
- Lookup in the postcode database the correctly location
However due to the fact that postcode data structure is flat and each record is primarily related to a postcode or primary address line this could not work. However we managed to find a little gem of a solution completely free from Google that despite some initial worries does the job perfect.
We at Redweb have used the Google Maps V3 API many a time for plotting map information but we had not come across the Places API. Essentially the places API allows you to look up places information as seen below.
The Google Places API comes in the following 2 flavours both of which allow you to pass in a query location and set of restrctions
- Service API – This allows you to call the API directly and deal with the results yourself
- Easy to use
- Limits based on end user given virtually limitless use
- Configurable and easy to restrict country or place types
- More powerful
- Allows registering a billing card (no costs are ever incurred) that gives up to 100,000 calls when the API key is passed in
- Allows use on a server side or C# application
This API is a really good service for use if you ever want to lookup places, it’s super easy to use and little restriction. The only caveat is having to display the powered by Google Logo but personally I like it.
- Places API – https://developers.google.com/places/documentation/