Simple address validation with Google maps - google-maps

Saw some answers here which suggest paid services or complicated address validation designs, but it doesn't apply to our specific case.
We have a lead capture form that lets users start typing the address and it autocompletes it for them:
And there's 2 common mistakes which we keep seeing:
1) Missing door number
2) Missing city name (as in the screenshot)
We're looking for a loose address verification which has room for error and that checks if there is a:
a street number and city name in the address
We could do a simple regex to make sure there's numbers in users' input, but if we could do both using Google API that would be great.
P.S: We do display a Google map so we're not breaking their TOS by making API calls to validate the address.
Update:
I was thinking of using JSON like this http://maps.googleapis.com/maps/api/geocode/json?address=45.4993726,%20-73.5653678&sensor=false
which is returned by Google maps and does contain street numbers etc. By door number I mean street number (it's under long_name)

I work for a company called Addressy, and we offer the exact product you're looking for. It will integrate into your form in a very similar way to the Google Maps API, but we are very proud of our data quality.
Have a play around with the service on our website, and see if it's for you. We offer 100 free USA lookups per month, with plans starting at $25 per month for 500 USA and Canadian lookups.
Please feel free to get in touch with me on StackOverflow or through the contact form on our website if you have any queries. :)

Related

Getting all addresses on a street - Google Maps Geocoding API

My task is to take a specific street and find all of the houses on that street. My input is a complete address with city, zip, etc - except without the house number. The desired output is a literal list of every home on that street and their respective house numbers. (411 Street Dr., 413 Street Dr.)
I can't find anything in the Maps / Geocoding API which provides this functionality, or even something similar like finding all of the addresses within a polygon.
The only real solution is to "guess" house numbers on the street and verify whether not it's a real address. To make this slightly more accurate, the TIGER database could potentially be leveraged. It does include "address ranges" for streets, such as "400 - 432".
My question is: does anybody know of alternate API or another combination which provides complete results (every address 99% of the time)?
It is so burdensome to make that many requests and having to essentially throw most of them in the trash!
PS. The Places API will not work here because the need is residential homes.
The Google Maps APIs do not offer bulk download of maps data as you seem to be looking for. You can use the APIs to let users find places, but they are not for you to obtain exhaustive maps data sets.
Maybe you can use the Google Maps APIs to build your application/s in such a way that you don't really need to have all houses in each street, enabling each user to find the one place s/he needs.

Google myBuisness data propagation issue with Google Maps, no placeID for buisness profile

I need a placeID, for our business, so I can make api calls.
Business name: Maler-Teamet.dk
Address: Engkær 15, 2650 Hvidovre, Danmark
Address-placeID: ChIJCYGE6K5WUkYRVxTvbfHLWd8
I have a piece of working javascript code, that I'm using to extract reviews of another business, in a test environment, from the Google Places/Maps api, using placeID, and displaying them on a webpage.
After updating our Google myBusiness profile, with the assistance of the Google support, who actually made most of the changes. We, and Google myBusiness, are no longer able to find the business on Google Maps, and therefore retrieve a placeID.
Using normal Google search, the myBusiness profile never displays either. I'm actually really concerned how this might be affecting seo and rankings.
When including either Hvidovre or Engkær in the seach, it does display correctly, and the business profile has a map on it, that links to the business profile on maps, which seems to be registered to the city address only, Hvidovre. This doesn't get any results in placeID finder either though. But the profile is there somewhere then.
Using f.ex the Google placeID finder with our company name, returns no autocomplete, or results. If I use the address registered on our profile, I do get a placeID, but our business is not registered on that placeID, when I make api calls.
With support from Google's myBuisness department, Google has been able to identify that there is an issue, and they have reported the issue on, internally. The reference number for the case is 2-8475000011449.
They have not been able to support the part of the issue related to the Maps/Places Api, or give me a timeline for resolving the issue, since Maps is a different department/branch related to the developers console.
Since technical support through the developers console, apparently requires a premium subscription, I have attempted to contact the sales department, to confirm that I need to pay more than 400$ to report this issue, and create what they call a P1 support case, as I understand it.
Since explaining the issue in a reply, I have actually not heard from them in 4 days now. Despite numerous attempts on my behalf.
Since the only other option Google myBusiness support was able to give was, to report the issue here with the tags google-places-api and google-maps and cross my fingers, I guess I'm hoping the right persons find this.
I looked into your issue and was able to find your business place ID. The place ID related to Maler-Teamet.dk is ChIJ91ouygNUUkYRCPVhhABpMMk.
However, as I can see this place has a service area information. Please note that "Service Area Business" results do not appear in Places API. Typically, these businesses don't have an exact location, but rather their service area. That's why they are excluded from the search.
I can suggest keeping in touch with Google My Business team and changing this business to not "Service Area Business".

Google maps API - geocoder doesn't find 'Carson, CA'

I have a customer with store locator functionality based on Google maps API. Couple days ago the complained about locator not able to find 'Carson, CA'
Here's a really simple demo from Google itself and it doesn't work either:
http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html
Is there a way to contact Google support? I tried to search for any contact information but couldn't find anything useful.
It does look like a bug as there is a Carson marked on the map south of Los Angeles. It happens: geocoder data gets updated and sometimes things get missed off. Bugs need to be raised in the issue tracker. Be sure to search first (although I didn't find a previous report for this) and choose the right template when raising a new bug.
http://code.google.com/p/gmaps-api-issues/issues/list
For a store locator app, you may find searching for West Carson provides a decent start point, although this is hardly a usable workaround. Try using the zip code instead.
I don't think this is actually a bug; let me gently suggest that I think you are probably using the wrong API for looking up "Carson, CA." I'm not being harsh, just trying to help. But Geocoding has two basic functions:
Given an address as input, reply with the best Lat-Lng coordinates for that address.
Given coordinates as input, reply with the closest known address (sometimes called Reverse Geocoding).
With "Carson, CA" as input, it doesn't seem like you have given enough information to have defined an address, which probably means that the Geocoder just didn't have enough information. The same goes for the Store Locator; "Carson, CA" isn't a store.
I think what you do want to use for a search of this kind is the Google Places APIdev-guide, because you are actually looking for a place, not coordinates or an address. Using the Google Places Autocomplete, for example, you can set the tool to search for different types, for example: countries, cities, or geocode (and there are others). The first, countries will let you find places such as: Australia, Bahamas, or Canada. The second, cities, will let you find places such as: Albuquerque, Baton Rouge, or Carson, CA. The last, geocode will restrict you to address searches, which is essentially what you are using when using the Geocoder.
I made the same mistake myself the other day when I sent a request to the Geocoder that contained "Wrigley Field"; the result was some address in Georgia on "Wrigley Field Road," which had me very confused until I thought about it for awhile and then it made sense. Wrigley Field is a place, not an address. I have been working with the Autocomplete a bunch lately and that has really made the difference between the two modes of lookup clear. As a possible solution for you, if you don't provide a specific type to the Autocomplete, it will use all of them, which will allow you to find places and/or addresses. It might give you a more functional solution for your site.
Anyway, just trying to offer some helpful feedback and I hope I did help -

Google Maps API: Can you explicitly qualify address parts

We're using the Google Maps API for an application to determine distance and driving directions for a set of addresses in a database. Overall, we're dealing with around a 1000 addresses and some have typos, abbreviations,... that are causing some problems with returning the proper address hit (lat/long).
For addresses that don't return a proper result, we are trying to drop parts of the address (i.e. just use Address and Zip, and not City, State). But we're finding that some of the results are waaaaay off (i.e. somewhere in Poland).
So, we're wondering if it's possible to qualify the address parts (i.e. address=1600 Pennsylvania Avenue&zipcode=49455) to avoid misinterpretation by Google maps. Anyone know if it's possible to do this?
I think you're stuck with just sending the string to google and dealing with what you get back. One thing you can do is use GClientGeocoder.setViewport() to specify a bounding box where your results should show up and/or use GClientGeocoder.setBaseCountryCode() to specify that your results should be in a specific country.
http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out "GIGO" is the rule when it comes to addresses.
Rather than trying to clean the list yourself, there are plenty of mailing list companies that will cleanup your address list for a fee.
They will correct addresses, and identify bogus addresses. They will also run your list through the post office's Forwarding database. That will give you the current addresses for your older data.
People and businesses move constantly.
Added--
If you have good zip codes, you can use them instead of the city, state. Just use "10 main st, 10045" as your input to Google. But you need to know that your zip codes are correct. (A mailing list company will handle that for you.)

How to geocode non-standard business addresses

I have small database of business and their addresses. Using the Google Geocode API, I've been abel to get maybe 80% accuracy. If a business has a simple address on a street, Google usually does a good job. However, many business have odd addresses, which are presented differently depending on the database. Example:
Royal Copenhagen
Manly 1
Shop 2A, The Corso (Wharf End)
Manly NSW 2095
(02) 9977 1618‎
Google's Geocoder fails to find a good address for this location. However, if I Google for 'Royal Copenhagen, Manly NSW 2095', I can easily find the address, and the pin has the correct location:
2 The Corso
Manly New South Wales 2095, Australia
(02) 9977 1618‎
Right now, I have my geocoding program trying various combinations of the address fields in attempt to get the best location. Note, on Google Maps, entering the phone number and city returns very good results, but the geocoder returns much different results.
Has anyone had any success programatically geocoding databases like this?
Personally I use YAHOO's geocoder for getting the long/lat information and I use Google's API to map the data. I ran into the same issue where Google just wasn't quite up to the job of more complicated addresses but the Yahoo API has more flexibility. I'm also running a very small application and its not an issue using both but your mileage may vary.
It's possible that the Google API is not sufficiently sophisticated for this purpose.
I once used a commercial product for geocoding. The product included a stack of DVDs, updated monthly, for geocode data for as much of the world as you might wish to pay for. This was not a trivial system to use, but it got its parsing and geocoding data from the Postal Authorities of countries around the world, so could stay up to date. The theory was that any address which would permit a letter to be delivered could be parsed and geocoded.
I do not recommend this product. I will tell you the name only so that you can search and find their competitors. The product was Trillium.
I found I could use the Google AJAX Search API for my purposes. It's design to be used from within JavaScript, but it's possible to call directly from Python. For a search, it will return a list of matching business, and their geocoded locations.
google only can geocode those address which is in there database , it is not dynamic
if you want to do this i think that yopu have to write an application to find the latitude and longitude and save to your database then it will be easy.......... :)