× New Management The Zippopotam.us project is under new management. View the Github Repository for details.

Zip Code Galore!

Zip·po·pot·amus   /ˈzipōpätəməs/

Postal Codes and Zip Codes made easy

  • Free API with JSON Response Format

  • Over 60 Countries Supported

  • Perfect for Form Autocompletion

  • Open for Crowdsourcing and Contribution


  • Structure: api.zippopotam.us/country/postal-code
    Example: api.zippopotam.us/us/90210
    NEW! City->Zip: api.zippopotam.us/country/state/city
    Example: api.zippopotam.us/us/ma/belmont


    Autocomplete Examples:
    USA

    How to use it!


    It's JSON! Here is a simple javascript example

    <script type="text/javascript">
    var client = new XMLHttpRequest();
    client.open("GET", "http://api.zippopotam.us/us/90210", true);
    client.onreadystatechange = function() {
    	if(client.readyState == 4) {
    		alert(client.responseText);
    	};
    };
    
    client.send();
    </script>
    			

    JSON Result:

    {
       "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"
           }
       ]
    }
    			

    Countries Supported


    Data adapted from the fine folks at geonames.org


    Country Code Example URL Range Count
    AndorraADapi.zippopotam.us/AD/AD100AD100 : AD7007
    ArgentinaARapi.zippopotam.us/AR/16011601 : 943120260
    American SamoaASapi.zippopotam.us/AS/9679996799 : 967991
    AustriaATapi.zippopotam.us/AT/10101010 : 99924877
    AustraliaAUapi.zippopotam.us/AU/02000200 : 972610161
    BangladeshBDapi.zippopotam.us/BD/10001000 : 94611323
    BelgiumBEapi.zippopotam.us/BE/10001000 : 99923386
    BulgariaBGapi.zippopotam.us/BG/10001000 : 99745304
    BrazilBRapi.zippopotam.us/BR/01000-00001000-000 : 99990-0005526
    CanadaCAapi.zippopotam.us/CA/A0AA0A : Y1A1621
    SwitzerlandCHapi.zippopotam.us/CH/10001000 : 96584614
    Czech RepublicCZapi.zippopotam.us/CZ/100 00100 00 : 798 6215507
    GermanyDEapi.zippopotam.us/DE/0106701067 : 9999816482
    DenmarkDKapi.zippopotam.us/DK/08000800 : 99901182
    Dominican RepublicDOapi.zippopotam.us/DO/1010110101 : 11906546
    SpainESapi.zippopotam.us/ES/0100101001 : 5208056542
    FinlandFIapi.zippopotam.us/FI/0000200002 : 999994637
    Faroe IslandsFOapi.zippopotam.us/FO/100100 : 970130
    FranceFRapi.zippopotam.us/FR/0100001000 : 9879951129
    Great BritainGBapi.zippopotam.us/GB/AB1AB1 : ZE327769
    French GuyanaGFapi.zippopotam.us/GF/9730097300 : 9739025
    GuernseyGGapi.zippopotam.us/GG/GY1GY1 : GY98
    GreenlandGLapi.zippopotam.us/GL/24122412 : 399233
    GuadeloupeGPapi.zippopotam.us/GP/9710097100 : 9719033
    GuatemalaGTapi.zippopotam.us/GT/0100101001 : 22027548
    GuamGUapi.zippopotam.us/GU/9691096910 : 9693223
    GuyanaGYapi.zippopotam.us/GY/9731297312 : 973609
    CroatiaHRapi.zippopotam.us/HR/1000010000 : 532966943
    HungaryHUapi.zippopotam.us/HU/10111011 : 99854041
    Isle of ManIMapi.zippopotam.us/IM/IM1IM1 : IM986
    IndiaINapi.zippopotam.us/IN/110001110001 : 85512615226
    IcelandISapi.zippopotam.us/IS/101101 : 902148
    ItalyITapi.zippopotam.us/IT/0001000010 : 9816819940
    JerseyJEapi.zippopotam.us/JE/JE1JE1 : JE34
    JapanJPapi.zippopotam.us/JP/100-0001100-0001 : 999-853194388
    LiechtensteinLIapi.zippopotam.us/LI/94859485 : 949813
    Sri LankaLKapi.zippopotam.us/LK/ * * : 961671832
    LithuaniaLTapi.zippopotam.us/LT/0000100001 : 9906920558
    LuxembourgLUapi.zippopotam.us/LU/L-1009L-1009 : L-99994334
    MonacoMCapi.zippopotam.us/MC/9800098000 : 9800029
    MoldaviaMDapi.zippopotam.us/MD/MD-2000MD-2000 : MD-77311753
    Marshall IslandsMHapi.zippopotam.us/MH/9696096960 : 969702
    MacedoniaMKapi.zippopotam.us/MK/10001000 : 7550220
    Northern Mariana IslandsMPapi.zippopotam.us/MP/9695096950 : 969524
    MartiniqueMQapi.zippopotam.us/MQ/9720097200 : 9729034
    MexicoMXapi.zippopotam.us/MX/0100001000 : 9999875203
    MalaysiaMYapi.zippopotam.us/MY/0100001000 : 988592818
    HollandNLapi.zippopotam.us/NL/10001000 : 99995314
    NorwayNOapi.zippopotam.us/NO/00010001 : 99914574
    New ZealandNZapi.zippopotam.us/NZ/01100110 : 98931737
    PhillippinesPHapi.zippopotam.us/PH/04000400 : 98112232
    PakistanPKapi.zippopotam.us/PK/1001010010 : 9732011847
    PolandPLapi.zippopotam.us/PL/00-00100-001 : 99-44021980
    Saint Pierre and MiquelonPMapi.zippopotam.us/PM/9750097500 : 975002
    Puerto RicoPRapi.zippopotam.us/PR/0060100601 : 00988187
    PortugalPTapi.zippopotam.us/PT/1000-0011000-001 : 9980-999204006
    French ReunionREapi.zippopotam.us/RE/9740097400 : 9749037
    RussiaRUapi.zippopotam.us/RU/101000101000 : 90199343538
    SwedenSEapi.zippopotam.us/SE/1000510005 : 9849916079
    SloveniaSIapi.zippopotam.us/SI/10001000 : 9600557
    Svalbard & Jan Mayen IslandsSJapi.zippopotam.us/SJ/80998099 : 91788
    Slovak RepublicSKapi.zippopotam.us/SK/010 01010 01 : 992 014152
    San MarinoSMapi.zippopotam.us/SM/4789047890 : 4789926
    ThailandTHapi.zippopotam.us/TH/1010010100 : 96220902
    TurkeyTRapi.zippopotam.us/TR/0100001000 : 8195051379
    United StatesUSapi.zippopotam.us/US/0021000210 : 9995043624
    VaticanVAapi.zippopotam.us/VA/0012000120 : 001202
    Virgin IslandsVIapi.zippopotam.us/VI/0080100801 : 0085116
    MayotteYTapi.zippopotam.us/YT/9760097600 : 9768017
    South AfricaZAapi.zippopotam.us/ZA/00020002 : 99923920

    License

    This Zippopotam.us API is made available under the Open Database License: http://opendatacommons.org/licenses/odbl/1.0/. Any rights in individual contents of the database are licensed under the Database Contents License: http://opendatacommons.org/licenses/dbcl/1.0/


    View details »