GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Get Country name and City name using postal code  XML
Forum Index -> General
Author Message
jkpatel1463



Joined: 25/01/2017 07:26:24
Messages: 1
Offline

Hello

I have only postal code and i need city name and country name based on postal code.

Let's take an Example:
I have

Postal code:10023

If i call a API of geonames then i will have City name as "10023" and country name as "United States"

I have Postal code "395006" & then i call API of geonames, i will have City as "SURAT" and country name as "India"


Can anyone help me ?

Thanks in advance
JOleg



Joined: 22/01/2017 01:02:39
Messages: 6
Offline

I did not look into postal codes within geonames, but common sense in your case says that it's not possible, at least for now. Postal codes may not contain ISO country codes and therefore your postal code 10023 may exist in more than 1 country, hence ambiguity. Some countries do have ISO 3166 code prefixed in front of postal code, but it has not been widely adopted. So, you need to know the country this postal code belongs to, to infer the city.

src:
https://en.wikipedia.org/wiki/Postal_code


Country code prefixes

ISO 3166-1 alpha-2 country codes were recommended by The European Committee for Standardization as well as the Universal Postal Union to be used in conjunction with postal codes starting in 1994,[11][12] but they have not become widely used. Andorra, Azerbaijan, Barbados, Ecuador, Latvia and Saint Vincent and the Grenadines use the ISO 3166-1 alpha-2 as a prefix in their postal codes.

In some countries (such as those of continental Europe, where a numeric postcode format of four or five digits is commonly used) the numeric postal code is sometimes prefixed with a country code when sending international mail to that country.
 
Izadore



Joined: 11/02/2017 09:11:34
Messages: 1
Offline

Ah, it makes sense when you put it like that. Still I'm trying to think of a workaround as there must be one.
NathanAverill



Joined: 20/07/2018 11:06:12
Messages: 1
Offline

Izadore wrote:

JOleg wrote:
Postal codes may not contain ISO country codes and therefore your postal code 10023 may exist in more than 1 country, hence ambiguity. I did not look into postal codes within geonames, but common sense in your case says that it's not possible, at least for now. Postal codes may not contain ISO country codes and therefore your postal code 10023 may exist in more than 1 country, phenq uk can be found on TSV hence ambiguity. Some countries do have ISO 3166 code prefixed in front of postal code, but it has not been widely adopted. So, you need to know the country this postal code belongs to, to infer the city.
 


Ah, it makes sense when you put it like that. Still I'm trying to think of a workaround as there must be one. 


There isn't any. Some postal codes are common in many countries, so unless you have your data and master database country-wise, this is not possible.
Danaity



Joined: 20/12/2018 15:16:10
Messages: 1
Offline

JOleg wrote:
I did not look into postal codes within geonames, but common sense in your case says that it's not possible, at least for now. Postal codes may not contain ISO Anavar Oxandrolone country codes and therefore your postal code 10023 may exist in more than 1 country, hence ambiguity. Some countries do have ISO 3166 code prefixed in front of postal code, but it has not been widely adopted. So, you need to know the country this postal code belongs to, to infer the city.

src:
https://en.wikipedia.org/wiki/Postal_code


Country code prefixes

ISO 3166-1 alpha-2 country codes were recommended by The European Committee for Standardization as well as the Universal Postal Union to be used in conjunction with postal codes starting in 1994,[11][12] but they have not become widely used. Andorra, Azerbaijan, Barbados, Ecuador, Latvia and Saint Vincent and the Grenadines use the ISO 3166-1 alpha-2 as a prefix in their postal codes.

In some countries (such as those of continental Europe, where a numeric postcode format of four or five digits is commonly used) the numeric postal code is sometimes prefixed with a country code when sending international mail to that country.
 
 



Hi There isn't any.
Some postal codes are common in many countries, so unless you have your data and master database country-wise, this is not possible.
romancast



Joined: 06/01/2019 01:06:30
Messages: 1
Offline

it is true In some countries the numeric postal code may have the prefix of a country provided that international mail is sent to the country in question.
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team