GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
City, State search  XML
Forum Index -> Discussion of GeoNames Toponyms
Author Message
blameMike



Joined: 18/10/2007 22:44:55
Messages: 1
Offline

I've been looking through the forum and couldn't find anything that specifically answers this...

I want to query for something like Buffalo and have the API return back, Buffalo, New York. In fact the Topnym results don't seem to give me back the state information at all unless I use th ADM1 feature_code. Any help would be greatly appreciated.
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Did you try the parameter 'style=FULL' ? This returns all information in the xml response : http://ws.geonames.org/search?q=buffalo&maxRows=10&style=FULL

Hope this helps

Marc

[WWW]
mellis



Joined: 29/01/2013 20:50:59
Messages: 1
Offline

Old thread I know, but marc: can you suggest any other parameters or post-search filtering one could do to make this type of search most effective?

Doing a search on "philadelphia" (http://api.geonames.org/search?q=philadelphia&countryBias=US&maxRows=8), I get the following results:

Philadelphia
Philadelphia-Camden-Wilmington
City of Philadelphia
Philadelphia County
North Philadelphia Airport
City of Philadelphia
City of Philadelphia
Township of Philadelphia

Being that I only want City, State results, there really are only 4 results I'm interested in: Philadelphia (the city) in PA, TN, MS, and NY.

Is there anything I can do to filter the results to either only get these results or filter out only these results using data from the FULL-style search?

Thanks in advance.
 
Forum Index -> Discussion of GeoNames Toponyms
Go to:   
Powered by JForum 2.1.5 © JForum Team