How to use it!

A simple example of retrieving the Country, State, City.

Enter your postal code!

JavaScript

<script type="text/javascript">
  var client = new XMLHttpRequest();
  client.open("GET", "http://zip.elevenbasetwo.com/v2/US/48867", true);
  client.onreadystatechange = function() {
    if(client.readyState == 4) {
    alert(client.responseText);
    };
  };
    

  client.send();
</script>
          

Result:

{"country": "US", "state": "Michigan", "city": "Owosso"}

The API

New and so much better

Ziptastic supports a smattering of countries via their two-letter country code. Querying the new API looks like this:

Example:
http://zip.elevenbasetwo.com/v2/US/48867

The original

If you only deal with the US, you can still query the original Ziptastic API

Example:
http://zip.elevenbasetwo.com/48867
and
http://zip.elevenbasetwo.com/?zip=48867

Plugins and more free stuff!