Code Monkey home page Code Monkey logo

zippopotamus's Introduction

Zippopotamus Cloud


New Management

Zippopotam.us has been taken over and re-launched.

For now, the primary concern was getting it back up on stable hosting.

I look forward to adding some features including caching and variable nearby query distances, etc in the near future.

I'm very grateful to Samir and Jeff for cooperating in this transition, and their original work for this project.

Please dont hesitate to contact me with any questions, comments, or concerns. You can file an issue on this repository, or you may email me at [email protected].

Thanks,

Trea Hauet


This is a repository for Zippopotamus the global postal code API

If you want to contribute to the improving the site, back-end, front-end etc. Just fork away and submit pull requests.

Sample Implementations

Checkout the static/ folder to see some of the sample implementations of Zippopotamus for inspiration and examples for how to implement Zippopotamus API for use in your website etc.

If you want to share an implementation, we would love to post example cases of Zippopotamus on our homepage.

Response Format

On May 1st Zippopotamus changed their JSON response format to work better with international postal codes. Now we support a one-to-many format service. That is that one zip code may map to many regions, this is common in countries like Spain and France (but not in the US and Germany).

Postal Code Information

For now, I'm looking at the best possible way to collaborate on any additional postal code information. Information coming soon.

Technical Information

What is Zippopotamus built on

At the moment the zippopotamus is built on Python, MongoDB and bottle.py framework.

Local Testing?

The site is configured to run on Apache mod_wsgi, if you want to test out the web interface you can change the wsgi.py file to include the last commented line, which is used to run the site on your local host.

Suggestions and Comments?

Open an issue if you have any questions, comments, or concerns.

zippopotamus's People

Contributors

clarkenheim avatar crowell avatar curtisgibby avatar kha-faz avatar kultprok avatar pavelito avatar samirahmed avatar trea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zippopotamus's Issues

Problems country grouping e.g. Needs a United Kingdom

Hi,

I noticed a few problems that has stopped me from using this fully. I run a UK website which gets international orders.

Firstly there is a slightly strange setup for the following:

Great Britain
Guernsey
Isle of Man
Jersey
Northern Ireland

Personally I would create another country so to speak as the "United Kingdom". This would at as an alias for all the above. e.g. a call to the United Kingdom would call all of them. Should a fairly simply change maybe with an extra field in the database. They all have the EXACTLY the same postcode format control by the Royal Mail. You grouped Scotland, England and Wales for Great Britain so why not allow the UK. Retailers here in the UK tend to do it that way expect for courier posting !

support for uk?

Hi,

Is there support for uk in the works?

And how many requests per hour can this handle?

Thanks

Request: Timezone

I've received a request that we begin including timezone data along with the responses we're currently sending. That new response might look like:

{
    "post code": "90210",
    "country": "United States",
    "country abbreviation": "US",
    "places": [
        {
            "place name": "Beverly Hills",
            "longitude": "-118.4065",
            "state": "California",
            "state abbreviation": "CA",
            "latitude": "34.0901"
        }
    ],
   "timezone": {
      "name": "Pacific Time Zone",
      "standard": -8,
      "dst": -7
   }
}

State/county/postal town issue for Great Britain, Guernsey, Isle of Man, Jersey, Northern Ireland

So in Great Britain, Guernsey, Isle of Man, Jersey, Northern Ireland you don't have a STATE.
The closest match would be a county.

However it would be very good idea to return the county, the postal town.
The Royal Mail likes address is this format http://www.royalmail.com/personal/help-and-support/How-do-I-address-my-mail-correctly

Which means the county is usually left out. Of course people using this service may want to check the address and county.

Basically the data that is returned for these countries needs to be returned in a format that we can use. At the moment it is not very usable.

Latitude Values broken for at least many german cities

Hi,

I'd really like to use the API for it's lat/long values, but there seems to be an issue:
E.g. if you search for the german city Bonn (http://api.zippopotam.us/de/nw/bonn) you'll get a result like this:

{"place name": "Bonn", "longitude": "50.7362", "post code": "53111", "latitude": "05314"}

Am I messing something up, or what means a latitude of 05314?

It's the same for other cities as well:
http://api.zippopotam.us/de/nw/k%C3%B6ln
http://api.zippopotam.us/de/nw/dortmund

Thank you,
Torsten

Request Range of Codes

Requested via Email

User wants to be able to request a range of zip/postal codes. Say 56000-56999. Though pagination would likely be needed.

Japan - State Names

{"post code": "100-0001", "country": "Japan", "country abbreviation": "JP", "places": [{"place name": "Chiyoda", "longitude": "139.7559", "state": "Toukyouto", "state abbreviation": "", "latitude": "35.6845"}]}

The State Name comes back as "Toukyouto" and not "Tokyo". Is there any way we could update this?

Same with "Saitamaken"

How to know if a country is supported?

Hello,

How can I know if a country is supported? For example, New Caledonia isn't in the supported countries list but the API returns the same thing as when the user has entered a wrong postal code.

Example:

  • A customer from France enters 99999 as a postal code, the API returns nothing. It's normal because it doesn't exist in France so we raise an error "Your postal code is not valid for this country..."
  • A customer from New Caledonia enters 98800 as a postal code, the API returns the same thing as my first example. However, this zip code is valid in New Caledonia! But because this country is not supported yet, we raise the same error "Your postal code is not valid...".

Is is possible to have a different result when the zip code is not valid and when the country is not supported?

Thanks!

Add Missing Data (United Kingdom, etc)

As pointed out on another issue, there is data missing in the API from areas like the UK. I checked specific examples against the latest download from GeoNames and they do exist there, so it's a matter of getting those downloads and processing them into the existing data set.

I'm going to consider what I feel would be the best way to handle that, and I'll update this issue with further thoughts in the near future.

Thanks,
Trea

Crossdomain Policy File

The current FireFox FlashPlayer plugin (27.0.0.130) fails to load the crossdomain.xml policy file and subsequently denies our FlashPlayer application from accessing this service. The IE and Chrome plugins do not have this issue. The error message returned is as follows:

OK: Root-level SWF loaded: https://SomeFlashPlayerApp/app.html
OK: Searching for in policy files to authorize data loading from resource at https://api.zippopotam.us/us/63031 by requestor from https://SomeFlashPlayerApp/app.html
Warning: Failed to load policy file from https://api.zippopotam.us/crossdomain.xml
Error: Request for resource at https://api.zippopotam.us/us/63031 by requestor from https://SomeFlashPlayerApp/app.html is denied due to lack of policy file permissions.

Suggestion: Add "endonym" country names in native languages

hi, the one and only thing i am missing here ;)
"country endonym"

{
   "post code":"29308",
   "country":"Germany",
   "country abbreviation":"DE",
   "country endonym":"Deutschland",
   "places":[
      {
         "place name":"Winsen (Aller)",
         "longitude":"9.9087",
         "state":"Niedersachsen",
         "state abbreviation":"NI",
         "latitude":"52.6793"
      }
   ]
}

http://en.wikipedia.org/wiki/List_of_countries_and_dependencies_and_their_capitals_in_native_languages

btw, good job (:

regards, Stefano

Missing Cities

Hello,

I have an example of "Farmers Branch, TX" that doesn't return data. I saw that the project was based on data from geonames.org. When i look at their site they appear to have data for "Farmers Branch, TX" so i am wondering why this might be missing.

Sample call i am using is: http://api.zippopotam.us/us/tx/Farmers%20Branch

Any chance you can include this city's data.

Thanks.

Missing zip codes for US

Newly introduced zip codes are missing for US,

some of them are,

84009 - South Jordon
97003 - Beaverton/Aloha

Brazil Postal Codes

Hello,

Trying to use the api for Brazil Postal Codes but I can't get it to work. Using the api.zippopotam.us/BR/01000-000 sample, I tried api.zippopotam.us/BR/31035-460 and other postal codes and could not get a result. Thank you for any assistance.

Request: API over https

Absolutely love this api, and have found it very useful. However, I wish to use it on a site with an https address form, and I can't use the API in JS due to mixed http / https content (the API appears to only work via HTTP)

Is there a way, or any plan to add the API over https? The request/response can be the same, it just has to be served on an https domain.

If not I will have to make a serverside wrap for the API, however this is not ideal.

Thanks for all your hard work!

Support for Ro

Hello there, interesting project you have here. What can i do to help you guys support Romanian postal codes as well?

Needs to truncate request data

Postcodes and zipcodes can come in long and short versions. Zippopotamus should be able to handle both.

So United States 99577-0727 or 99577 should return a result. Just truncate requests for the US to 5 characters. Simple. Makes developer integration so much easier.

With the Great Britain and other countries it is worse. For example the postcode SW1A 2AA returns nothing. But if I request SW1A or SW1 I will get a response. The coding for this would be slightly more complex than a simple truncate but it would again make integration much easier.

Unexpected downtimes

The website's up-time page has been down for some time, so is there anyone still managing this project and/or domain? We have seen intermittent data issues (zip codes return empty values while the service returns a 200 OK response) -- can anyone speak to this issue?

For instance, Monday, December 25th at 12:10 PM EST, we attempted to request data for zip codes 34746 and 77532, both of which returned empty data sets "{}". A few moments later we resubmit the request and received the correct data. As we are using this for address validation for lead generation, you can understand our concern if the service is intermittently unusable.

Thanks.

Marc Fox

bug with a specific zip code

When trying to fetch data for zip code 50679 in Germany (api.zippopotam.us/DE/50679) it returns an invalid latitude, but the longitude seems to be correct.

return value:
{"post code": "50679", "country": "Germany", "country abbreviation": "DE", "places": [{"place name": "K\u00f6ln", "longitude": "50.9318", "state": "Nordrhein-Westfalen", "state abbreviation": "NW", "latitude": "05315"}]}

Optional parameters

Would it be possible to have some of optional parameters? Sometimes a postal code or city is all we have, or we don't recall a country's or state's abbreviation. In such cases one could live with a broader range of search results.

Looking at the code, it's pretty much static, since it demands a specific order of the request. Is there some way to make optional parameters possible?

Missing ZipCodes for Germany

As I currently need to update my database, I stumbled upon a missing German ZipCode:

City: Quickborn
ZipCode: 25442

As this might not be the last I find, is there a general way to send updates to the database?

Best Regards,

Tobias

Consider a Paid Plan

At this time I'm considering adding a paid plan with some additional features to the feature set currently implemented. Some of the features that could be included might be SSL/HTTPS serving, alternative endpoints (currently we're running off one node located in Dallas Texas. A decent chunk of our traffic appears to be served to international/EU consumers that may benefit from a European node), as well as some others. I think for the time being I would leave the existing API alone, and keep it free and maybe only add a request limit that was pretty high.

However, long before I do anything on this front I'd love some community input. If you were going to pay for Zippopotam.us, what would you like to see included and what would you be willing to pay?

Thank you all so much for your support!

Thanks,
Trea

Wrong Result

Hi,

I could not find any support link on the website. So had to write to you directly. They have reported that for some Zip Codes they are not getting the correct place name.

Following is an example of one of such zip code:

Zip Code: 6423
Result from https://api.zippopotam.us : Ingenbohl
Expected Result : Seewen

Please share some insight on why this difference is being seen. Is their some difference in the zippopotam database or is their some other reason for it.

Add Redis Caching

Add Redis Caching so that we're not hitting Mongo for every request

Return city name for UK (GB)

When requesting data for UK postcodes, it's returning 'state' as England, and 'place name' as the area / neighborhood, but there's no field for 'Greater london' which would be filled in a form for state / providence. For example api.zippopotam.us/GB/NW4 returns a bunch of areas like 'Brent Cross', but no mention of london.

An example (random choice from yelp) of an address would be in the form of:
Brent Cross Shopping Centre
London NW4 3FN
United Kingdom

Searching with "/" in city name bug

Hi,
How to search by area and the city with a slash in name, for example:

/de/bw/Eislingen/Fils ?

Response:
The requested URL /de/bw/Eislingen/Fils was not found on this server.

Error info in response

Is it possible to return an error instead of an empty response? Something like this maybe:

{
  "found": false,
  "message": "Zip not found because of wrong input for this country",
  "badRequest": {
    "length": {
      "min": 4,
      "max": 4
    },
    "format": "xxdd"
  }
}

Suggestion: Get all zip/postal codes for a county

Could we make it so that we can look up zip codes by county? Using the new reverse lookup feature, I can get every ZIP code in an NY borough, like Brooklyn or Manhattan. However, I can't currently do that with the borough of Queens, which is technically a county.

US APO/FPO/DPO Zip Codes

Hi,

Thanks for your awesome service.

Can u maybe add the following APO/FPO/DPO zip codes for the US Forces?

Zipcode,City,State,LocationType,Location
09002,APO,AE,EU-DE-AMERICAN ARMS HOTEL
09003,APO,AE,NA-US-
09004,APO,AE,NA-US-
09005,APO,AE,EU-DE-WEISBADEN AAF OMDC
09006,APO,AE,EU-DE-EDELWEISS LODGE
09007,APO,AE,EU-DE-KLEBER KASERNE
09008,APO,AE,EU-DE-MANNHEIM
09009,APO,AE,EU-DE-RAMSTEIN AB
09010,APO,AE,EU-DE-USAREUR INTERNATIONAL EXCHANGE
09011,APO,AE,EU-DE-DAGGER KASERNE
09012,APO,AE,EU-DE-RAMSTEIN AB
09013,APO,AE,NA-US-
09014,APO,AE,NA-US-
09020,APO,AE,EU-DE-ROBINSON BARRACKS
09021,APO,AE,EU-DE-KAPAUN
09028,APO,AE,EU-DE-BENJAMIN FRANKLIN VILLAGE
09033,APO,AE,EU-DE-LEDWARD BARRACKS
09034,APO,AE,EU-DE-HD SMITH BARRACKS
09038,APO,AE,EU-DE-MAINZ-KASTEL STORAGE FACILITY
09042,APO,AE,NA-US-
09046,APO,AE,EU-DE-PANZER KASERNE
09049,APO,AE,EU-DE-AMELIA EARHART CENTER
09051,APO,AE,EU-DE-SULLIVAN BARRACKS
09053,APO,AE,EU-DE-ARTILLERY KASERNE
09054,APO,AE,EU-DE-DAENNER KASERNE
09055,APO,AE,EU-DE-US ARMY CONFINEMENT FACILITY
09058,APO,AE,EU-DE-COLEMAN BARRACKS
09059,APO,AE,EU-DE-MIESAU ARMY DEPOT
09060,APO,AE,EU-DE-FRANKFURT AMT
09063,APO,AE,EU-DE-CAMPBELL BARRACKS
09067,APO,AE,EU-DE-RHINE ORDNANCE BARRACKS
09068,APO,AE,EU-DE-1ST HRSC
09069,APO,AE,EU-DE-CARL SCHURZ COMMERCIAL AREA
09075,APO,AE,EU-DE-SHIPTON KASERNE
09079,APO,AE,EU-DE-PATTON BARRACKS
09081,APO,AE,EU-DE-KILBOURNE KAS/TOMPKINS BKS
09086,APO,AE,EU-DE-FUNARI BARRACKS
09088,APO,AE,EU-DE-PULASKI BARRACKS
09090,APO,AE,EU-DE-MANNHEIM
09092,APO,AE,EU-DE-KLEBER KASERNE
09094,APO,AE,EU-DE-RAMSTEIN
09095,APO,AE,EU-DE-GERMERSHEIM SUB COMMUNITY
09096,APO,AE,EU-DE-WIESBADEN ARMY AIRFIELD
09099,APO,AE,NA-US-
09100,APO,AE,EU-DE-KLEBER KASERNE
09102,APO,AE,EU-DE-HEIDELBERG
09103,APO,AE,EU-DE-RHINEDAHLEN RAF BASE
09104,APO,AE,EU-DE-GEILENKIRCHEN
09107,APO,AE,EU-DE-KELLEY BARRACKS
09112,APO,AE,EU-DE-ROSE BARRACKS
09114,APO,AE,EU-DE-GRAFENWOEHR
09123,APO,AE,EU-DE-SPANGDAHLEM
09126,APO,AE,EU-DE-SPANGDAHLEM AB
09128,APO,AE,EU-DE-PATCH BARRACKS
09131,APO,AE,EU-DE-PATCH BARRACKS
09136,APO,AE,EU-DE-SEMBACH AIR BASE
09137,APO,AE,EU-DE-BITBURG
09138,APO,AE,EU-DE-HUSTERHOEH KASERNE
09139,APO,AE,EU-DE-WARNER BARRACKS
09140,APO,AE,EU-DE-STORCK BARRACKS
09142,APO,AE,EU-DE-SEMBACH AIR BASE
09143,APO,AE,EU-DE-GIESSEN
09154,APO,AE,EU-DE-ROBINSON BARRACKS
09172,APO,AE,EU-DE-NATO SCHOOL
09173,APO,AE,EU-DE-JOINT MULTINATL READINESS CTR
09177,APO,AE,EU-DE-KATTERBACH
09180,APO,AE,EU-DE-LANDSTUHL REG MED CTR
09186,APO,AE,EU-DE-SPINELLI KASERNE (PFSB)
09201,APO,AE,EU-DE-GERMANY AIR MAIL TERMINAL
09211,APO,AE,NA-US-
09213,DPO,AE,EU-DE-FRANKFURT
09214,APO,AE,EU-DE-BUCHEL AIR BASE
09226,APO,AE,EU-DE-CONN BARRACKS
09227,APO,AE,EU-DE-ESC-K PANZER KASERNE
09229,APO,AE,NA-US-
09237,APO,AE,NA-US-
09245,APO,AE,EU-DE-HQ AAFES
09250,APO,AE,EU-DE-KATTERBACH KASERNE
09261,APO,AE,EU-DE-KALKAR
09263,APO,AE,EU-DE-PANZER KASERNE
09264,APO,AE,EU-DE-KATTERBACH ARMY AIR FIELD
09265,DPO,AE,EU-DE-BERLIN
09267,APO,AE,EU-DE-SULLIVAN BARRACKS
09301,APO,AE,ME-IQ-BAGHDAD INTERNATIONAL AIRPORT
09302,APO,AE,EU-GE-KRTANASI TRAINING AREA (IF UNITS ARE TRAINING)
09306,APO,AE,ME-KW-CFLCC CAMP ARIFJAN
09307,APO,AE,ME-BH-BAHRAIN MAIL CONTROL ACTIVITY
09308,APO,AE,ME-IQ-FOB HAMMER
09309,APO,AE,ME-QA-AL UDEID AIR BASE
09310,APO,AE,ME-AF-FOB JALALABAD
09311,APO,AE,ME-AF-FOB SHARANA
09313,APO,AE,ME-AF-FOB RAMROD
09314,APO,AE,ME-AF-FOB SALERNO
09319,APO,AE,NA-US-
09320,APO,AE,ME-AF-CAMP PHOENIX
09323,APO,AE,ME-IQ
09327,APO,AE,ME-KW-CAMP VIRGINIA
09328,APO,AE,AS-OM-THUMRAIT
09330,APO,AE,ME-KW-CAMP BUEHRING
09337,APO,AE,ME-KW-KUWAIT NAVAL BASE
09338,APO,AE,ME-IQ-KIRKUK
09340,APO,AE,NA-XK-CAMP BONDSTEEL - KOSOVO
09343,APO,AE,ME-IL-JUNIPER COBRA
09347,APO,AE,ME-AF-451 AEW
09348,APO,AE,ME-IQ-FOB UNION 3 INTERNATIONAL ZONE
09352,APO,AE,ME-AF-455 AEW BAGRAM
09353,APO,AE,AS-KG-BISHKEK-MANAS IAP
09354,APO,AE,ME-AF-BAGRAM AB
09355,APO,AE,ME-AF-KANDAHAR (KAF)
09356,APO,AE,ME-AF-CAMP EGGERS
09357,APO,AE,ME-KW-JMMT KUWAIT
09360,APO,AE,CA-CU-JTF - GUANTANAMO BAY
09363,FPO,AE,AF-DJ-CAMP LEMONIER
09364,APO,AE,ME-AF-FOB SHANK - LOGAR PROVINCE
09365,APO,AE,ME-QA-USCENTCOM - DOHA
09366,APO,AE,ME-KW-CAMP ARIFJAN
09367,APO,AE,NA-US-
09368,APO,AE,ME-AF-CAMP MIKE SPANN
09369,FPO,AE,ME-AF-USMC DELARAM
09370,APO,AE,ME-AF-FOB WILSON
09372,FPO,AE,ME-AF-USMC BASTION
09373,FPO,AE,ME-AF-USMC DWYER
09374,APO,AE,ME-IQ-CAMP BASRAH
09378,APO,AE,ME-IQ-CAMP TAJI
09380,APO,AE,ME-AF-FOB TARIN KOWT
09382,APO,AE,ME-AF-FOB FARAH
09383,APO,AE,ME-AF-FOB LAGMAN
09384,APO,AE,NA-US-
09387,APO,AE,NA-US-
09393,APO,AE,ME-IQ-CAMP SPEICHER TIKRIT
09394,FPO,AE,NA-US-
09397,APO,AE,NA-US-
09399,APO,AE,NA-US-
09403,APO,AE,NA-GB-ARRC - UK
09421,APO,AE,NA-GB-BLENHEIM CRESCENT
09447,APO,AE,NA-GB-GEO SEP UNITS (GSU)/ MCA
09454,APO,AE,NA-GB-SUSLO
09459,APO,AE,NA-GB-MILDENHALL
09461,APO,AE,NA-US-
09463,APO,AE,NA-GB-ALCONBURY AMT
09464,APO,AE,NA-GB-LAKENHEATH
09468,APO,AE,NA-GB-MENWITH HILL
09469,APO,AE,NA-GB-RAF MOLESWORTH
09470,APO,AE,NA-GB-ALCONBURY / MOLESWORTH
09494,APO,AE,NA-GB-CROUGHTON
09496,APO,AE,NA-US-
09498,DPO,AE,NA-US-
09501,FPO,AE,NA-GB-STANDING NATO MARITIME GRP ONE
09502,FPO,AE,NA-US-
09503,FPO,AE,NA-US-
09504,FPO,AE,NA-US-
09505,FPO,AE,NA-US-
09506,FPO,AE,NA-US-
09507,FPO,AE,NA-US-
09508,FPO,AE,NA-US-
09509,FPO,AE,NA-US-
09510,FPO,AE,NA-US-
09511,FPO,AE,NA-US-
09513,FPO,AE,NA-US-
09517,FPO,AE,NA-US-
09524,FPO,AE,NA-US-
09532,FPO,AE,NA-US-
09534,FPO,AE,NA-US-
09543,FPO,AE,NA-US-
09545,FPO,AE,NA-US-
09549,FPO,AE,NA-US-
09550,FPO,AE,NA-US-
09554,FPO,AE,NA-US-
09556,FPO,AE,NA-US-
09557,FPO,AE,NA-US-
09564,FPO,AE,NA-US-
09565,FPO,AE,NA-US-
09566,FPO,AE,NA-US-
09567,FPO,AE,NA-US-
09568,FPO,AE,NA-US-
09569,FPO,AE,NA-US-
09570,FPO,AE,NA-US-
09573,FPO,AE,NA-US-
09574,FPO,AE,NA-US-
09575,FPO,AE,NA-US-
09576,FPO,AE,NA-US-
09577,FPO,AE,NA-US-
09578,FPO,AE,NA-US-
09579,FPO,AE,NA-US-
09581,FPO,AE,NA-US-
09582,FPO,AE,NA-US-
09586,FPO,AE,NA-US-
09587,FPO,AE,NA-US-
09588,FPO,AE,NA-US-
09589,FPO,AE,CA-CU-U.S. NAVAL HOSPITAL - GUANTANAMO BAY
09590,FPO,AE,NA-US-
09591,FPO,AE,NA-US-
09593,FPO,AE,CA-CU-NAVAL STATION - GUANTANAMO BAY
09594,FPO,AE,NA-US-
09599,FPO,AE,NA-US-
09602,APO,AE,EU-IT-MILAN MAIL CONTROL ACTIVITY
09603,APO,AE,EU-IT-AVIANO AIR BASE
09604,APO,AE,NA-US-
09605,APO,AE,EU-IT-WARNER BARRACKS
09606,APO,AE,NA-US-
09607,FPO,AE,NA-US-
09608,FPO,AE,EU-IT-FISCSI SITE ROME DOD
09609,FPO,AE,EU-IT-FISC SIGONELLA GAETA
09610,APO,AE,EU-IT-GHEDI
09611,APO,AE,NA-US-
09613,APO,AE,EU-IT-CAMP DARBY
09617,APO,AE,EU-IT-U.S. NAVAL HOSPITAL
09618,FPO,AE,EU-IT-US NAVY SUPPORT SITE AVERSA
09620,FPO,AE,EU-IT-NAPLES JOINT FORCES COMMAND (JFC)
09621,FPO,AE,EU-IT-NCTS NAPLES
09622,FPO,AE,EU-IT-NSA CAPODOCHINO
09623,FPO,AE,EU-IT-NAS SIGONELLA
09624,DPO,AE,NA-US-
09625,FPO,AE,EU-IT-MCA ROME
09626,FPO,AE,EU-IT-CNE-C6F
09627,FPO,AE,EU-IT-FISC SIGONELLA
09630,APO,AE,EU-IT-CASERMA EDERLE
09631,FPO,AE,EU-IT-NAS II SIGONELLA
09633,APO,AE,EU-IT-NATO FACILITY POGGIO RENATICO
09636,FPO,AE,EU-IT-U.S. NAVAL HOSPITAL
09642,DPO,AE,EU-ES-MADRID
09643,APO,AE,EU-ES-MORON
09645,FPO,AE,EU-ES-NAVAL STATION ROTA
09647,APO,AE,EU-ES-MADRID - AMT
09648,FPO,AE,NA-US-
09649,FPO,AE,NA-US-
09701,DPO,AE,NA-US-
09702,APO,AE,EU-BE-NATO HQ US DELEGATION
09703,APO,AE,EU-NL-SHINNEN
09704,APO,AE,NA-GL-THULE AIR FORCE BASE
09705,APO,AE,EU-BE-NATO HEADQUARTERS- BELGIUM
09706,APO,AE,EU-NO-STAVABGER
09707,DPO,AE,EU-NO-OLSO
09708,APO,AE,EU-BE-CHIEVRES AIR BASE
09709,APO,AE,EU-NL-598TH SDDC
09710,DPO,AE,NA-US-
09711,APO,AE,EU-NL-AMSTERDAM
09713,APO,AE,EU-BE-NATO PROGRAMMING CENTER GLONS
09714,APO,AE,EU-BE-US ARMY GARRISON BENELUX
09715,DPO,AE,EU-NL-DEN HAGUE
09716,DPO,AE,EU-DK-COPENHAGEN
09717,APO,AE,EU-NO-VOLKEL
09718,DPO,AE,AF-MA-RABAL
09719,APO,AE,EU-DE-KLEIN BROGEL
09720,APO,AE,NA-PT-LAJES FIELD - AZORES
09721,DPO,AE,EU-RU-MOSCOW
09722,APO,AE,EU-PL-NRDC SZCZECIN POLAND
09723,DPO,AE,EU-FI-HELSINKI
09724,APO,AE,EU-BE-US ARMY NATO MISSION HQS
09726,DPO,AE,EU-PT-LISBON
09727,DPO,AE,NA-US-
09728,DPO,AE,NA-US-
09729,FPO,AE,EU-PT-USN SUPPORT ELEMENT LISBON
09730,DPO,AE,NA-US-
09731,DPO,AE,NA-US-
09732,APO,AE,NA-US-
09733,FPO,AE,NA-CA-PEP HALIFAX NOVA SCOTIA
09734,DPO,AE,NA-US-
09735,APO,AE,NA-CA-WINNIPEG
09736,DPO,AE,NA-US-
09737,DPO,AE,NA-US-
09738,DPO,AE,NA-US-
09739,DPO,AE,NA-US-
09741,DPO,AE,NA-US-
09742,DPO,AE,NA-US-
09743,APO,AE,EU-PL-NRDC - BYDGOSZCZ
09744,DPO,AE,NA-US-
09745,APO,AE,EU-DE-PAPA
09747,FPO,AE,NA-GI-GIBRALTAR
09748,DPO,AE,NA-US-
09749,APO,AE,EU-RO-MIHAIL KOGALNICEONU AIR BASE
09750,DPO,AE,NA-US-
09751,APO,AE,EU-DE-AFRICOM HQ - STUTTGART
09752,APO,AE,EU-NL-NATO JRC AF NORTH
09757,APO,AE,EU-BE-SHAPE
09758,DPO,AE,NA-US-
09759,DPO,AE,NA-US-
09762,DPO,AE,NA-US-
09769,DPO,AE,NA-US-
09777,DPO,AE,EU-FR-PARIS
09780,APO,AE,NA-BA-OPN JOINT FORGE - BOSNIA-HERZEGOVINA
09798,APO,AE,EU-FR-EUROCORPS HQ'S
09801,APO,AE,AS-AE-DUBAI MAIL CONTROL ACTIVITY
09803,APO,AE,ME-SA-RIYADH-ESKAN VILLAGE
09804,APO,AE,EU-TR-ISTANBUL
09805,FPO,AE,ME-BH-NAVAL FORCES CENTRAL COMMAND
09806,APO,AE,NA-US-
09807,DPO,AE,NA-US-
09809,FPO,AE,NA-US-
09810,APO,AE,EU-TR-NRDC (ISTANBUL)
09811,DPO,AE,NA-US-
09812,DPO,AE,NA-US-
09813,DPO,AE,NA-US-
09814,DPO,AE,NA-US-
09815,APO,AE,NA-US-
09816,DPO,AE,NA-US-
09817,DPO,AE,NA-US-
09818,APO,AE,AS-CY-AKROTIRI
09820,DPO,AE,NA-US-
09821,APO,AE,EU-TR-IZMIR
09822,APO,AE,EU-TR-ANKARA
09823,DPO,AE,NA-US-
09824,APO,AE,EU-TR-INCIRLICK
09825,DPO,AE,NA-US-
09826,DPO,AE,NA-US-
09827,DPO,AE,EU-TR-ISTANBUL
09828,DPO,AE,NA-US-
09829,APO,AE,ME-IL-MFO TEL AVIV
09830,DPO,AE,ME-IL-TEL AVIV
09831,DPO,AE,NA-US-
09832,APO,AE,AF-EG-EL GORAH EG NORTH SITE
09833,APO,AE,AF-EG-SHARM EL SHIEK SOUTH SITE
09834,FPO,AE,ME-BH-MANAMA BA
09835,FPO,AE,AF-EG-NAMRU III - CAIRO
09836,DPO,AE,NA-GB-AKROTIRI
09837,FPO,AE,AS-AE-FOWARD LOGISTIC SITE - FUJAIRAH
09838,FPO,AE,ME-BH-FLEET MAIL CENTER - MAHARRAQ
09839,APO,AE,NA-US-
09840,FPO,AE,ME-BH-NAVAL SECURITY FORCE - ASU
09841,APO,AE,EU-GR-ATHENS AMT
09842,DPO,AE,NA-US-
09844,FPO,AE,EU-GR-NATO HEADQUARTERS LARISSAGR
09845,DPO,AE,NA-US-
09846,DPO,AE,NA-US-
09848,APO,AE,
09852,APO,AE,ME-SA-ESKAN VILLAGE
09853,APO,AE,AS-AE-AL DHAFRA AB U.A.E.
09855,APO,AE,ME-KW-ALI AL SALEM AB KUWAIT
09858,APO,AE,ME-SA-DHAHRAN
09859,FPO,AE,ME-BH-SHAIKH ISA AIR BASE
09865,FPO,AE,NA-GR-NSA SOUDA BAY - CRETE
09868,APO,AE,AF-EG-CAIRO
09870,DPO,AE,NA-US-
09871,DPO,AE,NA-US-
09872,DPO,AE,NA-US-
09873,DPO,AE,NA-US-
09874,DPO,AE,NA-US-
09875,DPO,AE,NA-US-
09876,DPO,AE,NA-US-
09880,DPO,AE,NA-US-
09890,APO,AE,NA-US-
09892,DPO,AE,NA-US-
09898,APO,AE,ME-QA-CAMP AS SAYLIYAH - DOHA
34002,DPO,AA,SA-PA-Panama City - Panama
34004,DPO,AA,NA-US-
34006,APO,AA,NA-US-
34007,FPO,AA,CA-SV-CSL-EL SALVADOR
34008,DPO,AA,NA-US-
34011,DPO,AA,NA-US-
34020,DPO,AA,NA-US-
34021,DPO,AA,NA-US-
34022,DPO,AA,NA-US-
34023,DPO,AA,NA-US-
34024,DPO,AA,NA-US-
34025,DPO,AA,NA-US-
34030,DPO,AA,NA-US-
34031,DPO,AA,NA-US-
34032,DPO,AA,NA-US-
34033,DPO,AA,NA-US-
34034,DPO,AA,NA-US-
34035,DPO,AA,NA-US-
34036,DPO,AA,NA-US-
34037,DPO,AA,NA-US-
34038,APO,AA,NA-US-
34039,DPO,AA,NA-US-
34041,DPO,AA,NA-US-
34042,APO,AA,CA-HN-SOTO CANO AB
34050,FPO,AA,NA-US-
34055,DPO,AA,NA-US-
34058,FPO,AA,CA-BS-NAVUNDERWATER SYS CEN DET - ANDROS ISLAND
34060,DPO,AA,NA-US-
34078,APO,AA,NA-US-
34090,FPO,AA,NA-US-
34091,FPO,AA,NA-US-
34092,FPO,AA,NA-US-
34093,FPO,AA,NA-US-
34095,FPO,AA,NA-US-
34098,FPO,AA,NA-US-
34099,FPO,AA,NA-US-
96201,APO,AP,AS-KR-INCHEON MMT - KIMPO
96202,APO,AP,AS-KR-K-16/ SUNGNAMK-16 SEOUL AIR BASE
96203,APO,AP,AS-KR-YONGSAN (JUSMAG)
96204,APO,AP,AS-KR-YONGSAN (PSC 303)
96205,APO,AP,AS-KR-YONGSAN
96206,APO,AP,AS-KR-YONGSAN (PSC 450)
96207,APO,AP,AS-KR-YONGSAN (CASUAL MAIL DIR)
96209,DPO,AP,NA-US-
96213,APO,AP,AS-KR-DAEGU AIR BASE K-2
96214,APO,AP,AS-KR-GIMHAE POST OFFICE
96218,APO,AP,AS-KR-CAMP WALKER - TAEGU
96220,APO,AP,NA-US-
96224,APO,AP,AS-KR-CAMP CASEY - TONGDUCHON
96257,APO,AP,AS-KR-CAMP STANLEY - UIJONGBU
96258,APO,AP,AS-KR-CAMP RED CLOUD - UIJONGBU CITY
96259,APO,AP,NA-US-
96260,APO,AP,AS-KR-CAMP CARROLL - WAEGWAN
96262,APO,AP,AS-KR-KWANG - JU APO
96264,APO,AP,AS-KR-KUNSAN AIR BASE
96266,APO,AP,AS-KR-OSAN AIR BASE
96267,APO,AP,AS-KR-OSAN AIR BASE
96269,FPO,AP,AS-KR-DET CHINHAE
96271,APO,AP,AS-KR-CAMP HUMPHREYS
96275,APO,AP,AS-KR-SUWON AIR BASE
96276,APO,AP,AS-KR-INCHEON AERIAL MAIL TERMINAL
96278,APO,AP,AS-KR-OSAN AIR BASE
96283,APO,AP,AS-KR-CAMP MARKET
96284,APO,AP,NA-US-
96303,DPO,AP,NA-US-
96306,FPO,AP,AS-KR-FISCY DET ATSUGI
96309,FPO,AP,AS-JP-KANSAI INT AIRPORT
96310,FPO,AP,AS-JP-MCAS IWAKUNI
96319,APO,AP,AS-JP-MISAWA AIR BASE
96321,FPO,AP,AS-JP-HARIO FAMILY HOUSING AREA
96322,FPO,AP,AS-JP-FISCY DET SASEBO
96323,APO,AP,AS-JP-YOKOTA AIR BASE
96326,APO,AP,AS-JP-YOKOTA AIR BASE
96328,APO,AP,AS-JP-YOKOTA AIR BASE
96330,APO,AP,AS-JP-PCDA AAFES
96336,APO,AP,AS-JP-NARITA INTL AIRPORT
96337,APO,AP,AS-JP-NEW SANNO HOTEL
96338,APO,AP,AS-JP-CAMP ZAMA
96339,FPO,AP,AS-JP-ORIENT SHIELD
96343,APO,AP,AS-JP-CAMP ZAMA
96346,FPO,AP,AS-JP-NAVSHIPYD AND IMF DET YOKO
96347,FPO,AP,AS-JP-FMC YOKOHAMA
96348,FPO,AP,AS-JP-FISCY DET NEGISHI
96349,FPO,AP,AS-JP-U.S. FISC YOKOSUKA
96350,FPO,AP,AS-JP-YOKOSUKA NAVAL HOSPITAL
96351,FPO,AP,AS-JP-FISC YOKOSUKA DET
96362,FPO,AP,AS-JP-CAMP LESTER - OKINAWA NAVAL HOSPITAL
96365,APO,AP,AS-JP-MAIL CONTROL ACTIVITY
96367,APO,AP,AS-JP-KADENA AIR BASE
96368,APO,AP,AS-JP-KADENA AIR BASE
96370,FPO,AP,AS-JP-FISC YOKOSUKA DET. OKINAWA
96372,FPO,AP,AS-JP-USMC MCB BUTLER
96373,FPO,AP,AS-JP-USMC MCB BUTLER
96374,FPO,AP,AS-JP-USMC MCB BUTLER
96375,FPO,AP,AS-JP-CAMP KINSER
96376,APO,AP,AS-JP-USMC TORII STATION
96377,FPO,AP,AS-JP-USMC CAMP COURTNEY
96378,APO,AP,AS-JP-USMC CATC CAMP FUJI
96379,FPO,AP,AS-JP-USMC CAMP FOSTER
96384,APO,AP,AS-JP-USMC CAMP HANSEN
96386,APO,AP,AS-JP-USMC MCAS FUTENMA
96387,FPO,AP,AS-JP-USMC CAMP FUJI
96388,FPO,AP,AS-JP-USMC CAMP SCHWAB
96401,APO,AP,NA-PH-ZAMBOANGA
96426,FPO,AP,ME-IQ-CAMP TAQADDUM
96427,FPO,AP,ME-AF-USMC MOBILE MARFORPAC
96444,FPO,AP,NA-US-
96447,APO,AP,AS-TH-COBRA GOLD - BANGKOK
96501,FPO,AP,NA-US-
96502,FPO,AP,AS-ID-FISC DETACHMENT JAKARTA
96503,FPO,AP,AS-TH-BANGKOK
96507,DPO,AP,NA-US-
96510,FPO,AP,NA-CA-NANOOSE TEST RANGE
96511,FPO,AP,NA-CA-CANADIAN FORCES STATION - BC
96515,DPO,AP,NA-PH-FISC DET MANILLA
96516,FPO,AP,NA-PH-FISC DET MANILLA
96517,FPO,AP,NA-US-
96520,DPO,AP,NA-US-
96521,DPO,AP,NA-US-
96522,FPO,AP,AS-CN-FISC DET SSO HKG
96530,DPO,AP,NA-US-
96531,FPO,AP,PO-NZ-OL-E DET 4 PACAF AIRPS - CHRISTCHURCH
96532,DPO,AP,NA-US-
96534,FPO,AP,AS-SG-FISC DET SINGAPORE
96535,DPO,AP,NA-US-
96537,FPO,AP,NA-US-
96538,FPO,AP,NA-US-
96540,FPO,AP,NA-US-
96541,APO,AP,NA-US-
96542,APO,AP,NA-US-
96543,APO,AP,NA-US-
96544,FPO,AP,AS-TH-CSF-536 UTAPAO BANGKOD
96546,APO,AP,AS-TH-BANGKOK APO
96548,APO,AP,AU-AU-ALICE SPRINGS
96549,DPO,AP,NA-US-
96550,APO,AP,AU-AU-NAVY MOBILE UNIT DISPATCHING - SYDNEY
96551,DPO,AP,NA-US-
96552,APO,AP,AS-TH-NAVAL OPERATION BANGKOK
96553,APO,AP,AU-AU-SYDNEY AERIAL MAIL TERMINAL
96554,DPO,AP,AU-AU-US CONSULATE - SYDNEY
96555,APO,AP,NA-MH-KWAJALEIN MISSILE RANGE
96557,APO,AP,NA-MH-ROI-NAMUR ISLAND
96562,DPO,AP,NA-US-
96577,APO,AP,AU-AU-LEARMOUTH OBSERVATORY
96595,FPO,AP,NA-IO-NAVAL SUPPORT FACILITY - DIEGO GARCIA
96598,FPO,AP,NA-US-SOUTH POLE STATION - AMUNDSEN-SCOTT
96599,FPO,AP,WW-AQ-OL F DET 4 PACAF AIRPS/APO - MCMURDO STATION
96601,FPO,AP,AS-JP-US FLEET ACTIVITIES SASEBO
96602,FPO,AP,NA-US-
96603,FPO,AP,NA-US-
96604,FPO,AP,NA-US-
96605,FPO,AP,NA-US-
96606,FPO,AP,NA-US-
96607,FPO,AP,NA-US-
96608,FPO,AP,NA-US-
96609,FPO,AP,NA-US-
96610,FPO,AP,NA-US-
96611,FPO,AP,NA-US-
96612,FPO,AP,NA-US-
96613,FPO,AP,NA-US-
96614,FPO,AP,NA-US-
96615,FPO,AP,NA-US-
96616,FPO,AP,NA-US-
96617,FPO,AP,NA-US-
96619,FPO,AP,NA-US-
96620,FPO,AP,NA-US-
96621,FPO,AP,NA-US-
96622,FPO,AP,NA-US-
96624,FPO,AP,NA-US-
96628,FPO,AP,NA-US-
96629,FPO,AP,NA-US-
96643,FPO,AP,NA-US-
96650,FPO,AP,NA-US-
96657,FPO,AP,NA-US-
96660,FPO,AP,NA-US-
96661,FPO,AP,NA-US-
96662,FPO,AP,NA-US-
96663,FPO,AP,NA-US-
96664,FPO,AP,NA-US-
96665,FPO,AP,NA-US-
96666,FPO,AP,NA-US-
96667,FPO,AP,NA-US-
96668,FPO,AP,NA-US-
96669,FPO,AP,NA-US-
96670,FPO,AP,NA-US-
96671,FPO,AP,NA-US-
96672,FPO,AP,NA-US-
96673,FPO,AP,NA-US-
96674,FPO,AP,NA-US-
96675,FPO,AP,NA-US-
96677,FPO,AP,NA-US-
96678,FPO,AP,NA-US-
96679,FPO,AP,NA-US-
96681,FPO,AP,NA-US-
96682,FPO,AP,NA-US-
96683,FPO,AP,NA-US-
96686,FPO,AP,NA-US-
96687,FPO,AP,NA-US-
96698,FPO,AP,NA-US-

Request: US Territories under US

I've received a request that we treat US territories as states in the US. Initially I'm thinking that we may just choose to map certain places to multiple country codes. Take for example Puerto Rico which is a territory of the US. Right now zipcodes for Puerto Rico have to be accessed via /pr instead of /us, yet the USPS handles them as states (same goes for Marshal Islands, Virgin Islands, etc.).

Any other input?

Update Samples/Examples area

Right now, the samples point to the old hosting for the API rather than api.zippopotam.us. I'd also like to see example source code made available directly on the sample page so developers can see what's going on without having to do a view source, etc.

If anybody wants to do that themselves, I'd happily answer any questions or provide input in any way possible. Otherwise, I can take care of this myself.

Thanks,
Trea

Is this project under active development?

Hey,

there was no update since 2 years now. I wonder whether this project is still alive. The uptime looks very good, but if the project is abandoned I wouldn't use it in my project.

Perhpas you could do a small status update and tell us about your goals.

Best wishes,
AxlF

Remove spaces from keys

I don't think the keys in the response object should contain spaces. This forces a response to be used like response['post code'] instead of simply response.postcode.

I know that's a pretty big API change, but it should be done at some point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.