schmidtjano
Joined: 06/06/2020 17:16:12
Messages: 1
Offline
|
Hello.
I am wondering if it is possible to limit search results to a particular record using an API parameter to get at the ISO 3166-2 state/province code included in "adminCodes1": {"ISO3166_2": "ON"}.
Since most of the countries use a FIPS number for states/provinces, which many users do not know, I was hoping to let users enter the more widely-known ISO 3166-2 code.
For example, for Ontario, Canada, the ISO code and postal abbreviation is "ON", while the adminCode1 is "08". For North Rhine-Westphalia, Germany most people know "NW" but not the adminCode1 is "07".
I tried the parameter &adminCodes1=on, but that does not work.
I am using the below request to get one record back which I want to use with the WEBSERVICE() function of MS Excel :
http://api.geonames.org/search?&style=full&country=us&fcode=adm2&name=harris&adminCode1=tx&username=XXX
This works fine in the US, where the adminCode1 is the ISO3166-2 code, but in the other example above, this does not work.
Any suggestions? Many thanks!
Best regards,
JOS
[u][b]
|