Search code examples
c#.netgeocoding

Best way to do bulk geocode look-up with Google Maps API


Our company frequently receives large lists of addresses, upwards of 6000 that we need to geocode and put into our database. We already have a Google Maps API for Business License to get this done with.

I'm working on creating an application to do a bulk geocode look-up after I parse and separate the relevant parts of the list to make the URL to send off to Google. The parser is already done for me. I've tried making a separate thread for each address and sending a request to Google in the individual thread, and this works for a small number addresses (about 10 to 100), but not for larger numbers (above 500). I get lots of 403 errors. So this probably isn't a good way to go about this. I also don't know too much about network programming, so I'm trying to learn as I go here.

So I'm wondering what the best way to do this might be. I can use VB.NET or C# to get this done; it doesn't matter too much. Thank you!


Solution

  • It looks like you might be bumping up against Google's usage limits. Another option that's available to you is to use a commercial service that doesn't impose such limits. One such service is the US Street Address API from Smarty. This API allows you to send batches of addresses (up to 100 at a time) for verification and geocoding. This API is geodistributed and will service requests as fast as it receives them. There's a good amount of sample code on github and you can sign up for a free trial.

    Update: SmartyStreets now provides international address verification.

    Full disclosure: I'm a software developer at Smarty.