views:

211

answers:

5

What's the best api/resource to get a zip +4 from an address?

I don't want something that needs to be downloaded and updated from time to time; I want one that's updated automagically.

The goal is to look up state and federal officials without getting "duplicate" positions.

+2  A: 

Yahoo has a zip + 4 in thier API, limit 5000 request per day.

Yahoo GeoCoding

Tommy
+2  A: 

The USPS has an API for finding/checking zip codes (among other things).

http://www.usps.com/webtools/address.htm

The Moof
you're only allowed to use it if you're shipping through USPS though. I've been rejected for an API key at least twice(with honest answers).
antony.trupe
+1  A: 

I've used Endicia at past jobs. It is a network HTTP-based API. (I can't remember if it was SOAP or REST.)

Raymond W
+1  A: 

The USPS updates the ZIP+4 database monthly. If you examine a specific address, it seems its ZIP+4 never changes. But a significant enough pool of addresses will always have some changes every month. So, to keep ZIP+4 codes up to date, you have to reprocess your addresses periodically.

If you're going to be doing regular reprocessing anyway, then you might as well keep a copy of the USPS databases yourself and make replacing the databases a part of your reprocessing step. The big advantage is that you then have direct access to the USPS DPV, DirectDPV, LACSLink, SuiteLink, and RDI databases, which aren't available through their web API.

http://semaphorecorp.com is a cheap source of USPS databases.

I assume you're not attempting to use ZIP+4 as an address key. One ZIP+4 typically covers all addresses on one side of a street for one block, so by itself it's not suitable for keying purposes.

joe snyder
good information(+1), but its not for "business use", so I don't need a high level of accuracy and/or currency.
antony.trupe
+2  A: 

have you tried Google Maps JavaScript API V3

UPDATED:

in responce to your comment

this is easy as count 1, 2 , 3 ;)

take a look at this:

you need to looking for google map geocoding service! ( Viewport Biasing )

example code would be:

using jQuery

$(function() {
    $.getJSON("http://maps.google.com/maps/api/geocode/json?address=Winnetka&sensor=false",
    function(data) {
        var zip_code = data.results[0].long_name;
        alert(zip_code);
    });
});
aSeptik
I'd love to use a google service, but I've not spent the time to figure out how to feed it an address and get back a "sanitized" address.
antony.trupe
see the updates!
aSeptik
I'm after zip+4. It doesn't look like Google exposes that data if they have it, but thanks for the example.
antony.trupe
just for curiosity can you give me an example address you should search!?
aSeptik
antony.trupe
aSeptik