GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Limit full search API results to country code only  XML
Forum Index -> General
Author Message
santinop



Joined: 02/02/2017 16:02:02
Messages: 1
Offline

Hi all,
first post in the form.

I'm integrating with the Geonames APIs for a website I'm developing and I have a question about an API call that I make to get all the ADM1 and ADM2 of a country.

The url that I use is like the following:
http://api.geonames.org/searchJSON?country=FR&lang=fr&featureCode=ADM1&featureCode=ADM2&username=myUsername

The result that I get back includes the administrative divisions as I expect but they also includes divisions for countries that are dependent on the one that I query for.

For instance using the above URL I want to get divisions for France but I'm also getting back some divisions for the French Southern Territories (country code: TF) and RĂ©union (country code: RE) just to give an example which are countries dependent from France but have their own country code so I expect to get their divisions querying against their country codes.

Is there a way, most likely some additional query parameter, that can allow me to restrict the results of this search to include only divisions which country code is the one passed in the query parameter (in the example above: FR)?


Thanks in advance for your help.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team