Skip to content
/ ziplookup Public

API to http://www.usps.com/zip4/. You can write a program to process your entire personal address book (subject to the USPS Terms and Conditions, which are included and linked to). This is a port of my Perl module Scrape::USPS::ZipLookup.

License

Notifications You must be signed in to change notification settings

gnp/ziplookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ziplookup

Copyright © 2006 Gregor N. Purdy. All rights reserved.

This program is free software. It is subject to the same license as Ruby.

Description

The United States Postal Service (USPS) has on its web site an HTML form at C<www.usps.com/zip4/> for standardizing an address. Given a firm, urbanization, street address, city, state, and zip, it will put the address into standard form (provided the address is in their database) and display a page with the resulting address.

This Ruby module provides a programmatic interface to this service, so you can write a program to process your entire personal address book without having to manually type them all in to the form.

Because the USPS could change or remove this functionality at any time, be prepared for the possibility that this code may fail to function. In fact, as of this version, there is no error checking in place, so if they do change things, this code will most likely fail in a noisy way. If you discover that the service has changed, please email the author your findings.

TERMS OF USE

BE SURE TO READ AND FOLLOW THE UNITED STATES POSTAL SERVICE TERMS OF USE PAGE (AT C<www.usps.com/homearea/docs/termsofuse.htm> AT THE TIME THIS TEXT WAS WRITTEN). IN PARTICULAR, NOTE THAT THEY DO NOT PERMIT THE USE OF THEIR WEB SITE’S FUNCTIONALITY FOR COMMERCIAL PURPOSES. DO NOT USE THIS CODE IN A WAY THAT VIOLATES THE TERMS OF USE.

As the user of this code, you are responsible for complying with the most recent version of the Terms of Use, whether at the URL provided above or elsewhere if the U.S. Postal Service moves it or updates it. As a convenience, here is a copy of the most relevant paragraph of the Terms of Use as of 2006-07-04:

Material on this site is the copyrighted property of the United States
Postal Service¨ (Postal Serviceª). All rights reserved. The information
and images presented here may not under any circumstances be reproduced
or used without prior written permission. Users may view and download
material from this site only for the following purposes: (a) for personal,
non-commercial home use; (b) where the materials clearly state that these
materials may be copied and reproduced according to the terms stated in
those particular pages; or (c) with the express written permission of the
Postal Service. In all other cases, you will need written permission from
the Postal Service to reproduce, republish, upload, post, transmit,
distribute or publicly display material from this Web site. Users agree not
to use the site for sale, trade or other commercial purposes. Users may not
use language that is threatening, abusive, vulgar, discourteous or criminal.
Users also may not post or transmit information or materials that would
violate rights of any third party or which contains a virus or other harmful
component. The Postal Service reserves the right to remove or edit any
messages or material submitted by users.

The author believes that the example usage given above does not violate these terms, but sole responsibility for conforming to the terms of use belongs to the user of this code, not the author.

BUG REPORTS

When contacting the author with bug reports, please provide a test address that exhibits the problem, and make sure it is OK to add that address to the test suite.

Be sure to let me know if you don’t want me to mention your name or email address when I document the changes and contributions to the release. Typically I put this information in the CHANGES file.

History

$Id$

Author

Gregor N. Purdy, C<gregor@focusresearch.com>.

Copyright

Copyright © 2006 Gregor N. Purdy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Ruby itself.

About

API to http://www.usps.com/zip4/. You can write a program to process your entire personal address book (subject to the USPS Terms and Conditions, which are included and linked to). This is a port of my Perl module Scrape::USPS::ZipLookup.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages