Get an abbreviation of 2 letter states / provinces

So, I use the GeoNames API to get information about the country and state / province, which I use to fill out the drop-down lists in the form. This form submits this information to the SOAP web service, and the SOAP server only understands country and state / province data in 2 forms. i.e. CA for Canada, USA for USA. The GeoNames API provides this information for different countries, but not for their children (states / provinces).

Does anyone know how to get a 2 letter abbreviation for state / province / territory from GeoNames or is there any other API that I can try?

+5
source share
3 answers

API GeoNames, , , -ISO-3166 alpha-2: http://www.iso.org/iso/country_codes.htm

, ISO 3166-2: 2007 . , .

-, , . (, , ).

+1

@user640118 , -, . .

, - LiveAddress, / REST. , , , , , . , .

, -, Javascript:

LiveAddress.verify("123 main st 12345", function(results) {
   console.log(results);
});

API.

+2

Geonames 2 , .

- ( ), .

+1

All Articles