Fork me on GitHub

Extract postal addresses from the DOM

View the Project on GitHub sheriff/ziprip

Extract Postal Addresses from Web Pages, in the browser

ziprip looks for postal addresses on webpages, either in the browser or in node.js. It also works very hard to try and geocode the addresses it finds, usually by searching the page for things like Google Maps elements and so on.

It's intended especially to be used for bookmarklets and browser plugins, and used to power a website called PlaceSteal that never really took off.

Currently it handles UK and US addresses. Adding other English-speaking countries should be trivial, other languages a bit more challenging but certainly doable.

Getting It


You can download the latest browser version on the downloads page, or from the dist directory.

For node.js, simply:

npm install ziprip

And finally if you just want to play around with it in your browser's javascript console, you can do:

var script=document.createElement('script');script.type='text/javascript';script.src='';document.head.appendChild(script);

and then, having given it a second to load:

window.ziprip.extract( document, window.URL );


ziprip has one method you should be interested in: extract, which accepts a DOM object and a URL. For node.js you can use jsdom for your DOM object, and in the browser obviously you just pass in document.


var $ziprip = require('ziprip');
var addresses = $ziprip.extract( domObject, url );


<script type="text/javascript" src="ziprip.js"></script>
    var addresses = window.ziprip.extract( document, window.URL );

This will return several address objects:

Consider the address: Prime Minister's Residence, 10 Downing Street, SW1A 2AA, UK...



Build Status

ziprip is released under the MIT license, because all of its external dependencies use it. That, kids, is the magic of open source, or something.