Zip2Geo offers a simple and fast way to convert postal codes into geographic coordinates. To use the API, send a GET request to the following endpoint:
GET https://zip2geo.dev/api/lookup
country
โ The ISO 3166-1 alpha-2 country code (e.g. DE
, US
, FR
)zip_code
โ The postal code you want to look upYou can authenticate using one of the following methods:
Authorization: Bearer YOUR_API_KEY
?key=YOUR_API_KEY
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://zip2geo.dev/api/lookup?country=DE&zip_code=10115"
[
{
"zip_code": "10435",
"country": "DE",
"latitude": 52.5378,
"longitude": 13.4112,
"name": "Berlin",
"state": "Berlin"
}
]
401 Unauthorized
:
{ "error": "Invalid API Key" }
403 Forbidden
:
{ "error": "Host not allowed" }
404 Not Found
with an empty array:
[]
Below is a list of all ISO 3166-1 alpha-2 country codes currently supported by the Zip2Geo API:
Country | ISO Code |
---|---|
๐ฆ๐ฉ Andorra | AD |
๐ฆ๐ช United Arab Emirates | AE |
๐ฆ๐ฎ Anguilla | AI |
๐ฆ๐ฑ Albania | AL |
๐ฆ๐ท Argentina | AR |
๐ฆ๐ธ American Samoa | AS |
๐ฆ๐น Austria | AT |
๐ฆ๐บ Australia | AU |
๐ฆ๐ฝ ร land Islands | AX |
๐ฆ๐ฟ Azerbaijan | AZ |
๐ง๐ฉ Bangladesh | BD |
๐ง๐ช Belgium | BE |
๐ง๐ฌ Bulgaria | BG |
๐ง๐ฒ Bermuda | BM |
๐ง๐ท Brazil | BR |
๐ง๐พ Belarus | BY |
๐จ๐ฆ Canada | CA |
๐จ๐จ Cocos (Keeling) Islands | CC |
๐จ๐ญ Switzerland | CH |
๐จ๐ฑ Chile | CL |
๐จ๐ณ China | CN |
๐จ๐ด Colombia | CO |
๐จ๐ท Costa Rica | CR |
๐จ๐ฝ Christmas Island | CX |
๐จ๐พ Cyprus | CY |
๐จ๐ฟ Czech Republic | CZ |
๐ฉ๐ช Germany | DE |
๐ฉ๐ฐ Denmark | DK |
๐ฉ๐ด Dominican Republic | DO |
๐ฉ๐ฟ Algeria | DZ |
๐ช๐จ Ecuador | EC |
๐ช๐ช Estonia | EE |
๐ช๐ธ Spain | ES |
๐ซ๐ฎ Finland | FI |
๐ซ๐ฐ Falkland Islands | FK |
๐ซ๐ฒ Micronesia | FM |
๐ซ๐ด Faroe Islands | FO |
๐ซ๐ท France | FR |
๐ฌ๐ง United Kingdom | GB |
๐ฌ๐ซ French Guiana | GF |
๐ฌ๐ฌ Guernsey | GG |
๐ฌ๐ฎ Gibraltar | GI |
๐ฌ๐ฑ Greenland | GL |
๐ฌ๐ต Guadeloupe | GP |
๐ฌ๐ธ South Georgia and South Sandwich Islands | GS |
๐ฌ๐น Guatemala | GT |
๐ฌ๐บ Guam | GU |
๐ญ๐ฐ Hong Kong | HK |
๐ญ๐ฒ Heard Island and McDonald Islands | HM |
๐ญ๐ณ Honduras | HN |
๐ญ๐ท Croatia | HR |
๐ญ๐น Haiti | HT |
๐ญ๐บ Hungary | HU |
๐ฎ๐ฉ Indonesia | ID |
๐ฎ๐ช Ireland | IE |
๐ฎ๐ฒ Isle of Man | IM |
๐ฎ๐ณ India | IN |
๐ฎ๐ด British Indian Ocean Territory | IO |
๐ฎ๐ธ Iceland | IS |
๐ฎ๐น Italy | IT |
๐ฏ๐ช Jersey | JE |
๐ฏ๐ต Japan | JP |
๐ฐ๐ช Kenya | KE |
๐ฐ๐ท South Korea | KR |
๐ฑ๐ฎ Liechtenstein | LI |
๐ฑ๐ฐ Sri Lanka | LK |
๐ฑ๐น Lithuania | LT |
๐ฑ๐บ Luxembourg | LU |
๐ฑ๐ป Latvia | LV |
๐ฒ๐ฆ Morocco | MA |
๐ฒ๐จ Monaco | MC |
๐ฒ๐ฉ Moldova | MD |
๐ฒ๐ญ Marshall Islands | MH |
๐ฒ๐ฐ North Macedonia | MK |
๐ฒ๐ด Macao | MO |
๐ฒ๐ต Northern Mariana Islands | MP |
๐ฒ๐ถ Martinique | MQ |
๐ฒ๐น Malta | MT |
๐ฒ๐ผ Malawi | MW |
๐ฒ๐ฝ Mexico | MX |
๐ฒ๐พ Malaysia | MY |
๐ณ๐จ New Caledonia | NC |
๐ณ๐ซ Norfolk Island | NF |
๐ณ๐ฑ Netherlands | NL |
๐ณ๐ด Norway | NO |
๐ณ๐ท Nauru | NR |
๐ณ๐บ Niue | NU |
๐ณ๐ฟ New Zealand | NZ |
๐ต๐ฆ Panama | PA |
๐ต๐ช Peru | PE |
๐ต๐ซ French Polynesia | PF |
๐ต๐ญ Philippines | PH |
๐ต๐ฐ Pakistan | PK |
๐ต๐ฑ Poland | PL |
๐ต๐ฒ Saint Pierre and Miquelon | PM |
๐ต๐ณ Pitcairn | PN |
๐ต๐ท Puerto Rico | PR |
๐ต๐น Portugal | PT |
๐ต๐ผ Palau | PW |
๐ท๐ช Rรฉunion | RE |
๐ท๐ด Romania | RO |
๐ท๐ธ Serbia | RS |
๐ท๐บ Russia | RU |
๐ธ๐ช Sweden | SE |
๐ธ๐ฌ Singapore | SG |
๐ธ๐ฎ Slovenia | SI |
๐ธ๐ฏ Svalbard and Jan Mayen | SJ |
๐ธ๐ฐ Slovakia | SK |
๐ธ๐ฒ San Marino | SM |
๐น๐จ Turks and Caicos Islands | TC |
๐น๐ญ Thailand | TH |
๐น๐ท Turkey | TR |
๐บ๐ฆ Ukraine | UA |
๐บ๐ธ United States | US |
๐บ๐พ Uruguay | UY |
๐ป๐ฆ Vatican City | VA |
๐ป๐ฎ U.S. Virgin Islands | VI |
๐ผ๐ซ Wallis and Futuna | WF |
๐ผ๐ธ Samoa | WS |
๐พ๐น Mayotte | YT |
๐ฟ๐ฆ South Africa | ZA |
That's it. No registration hoops, no unnecessary complexity โ just zip-to-geo lookup, done right.