I am querying a list of the worlds parks with something like this query:


but is it possible to query for the type of park it is (county/national/state/city) or also to break it down by state and country, or just query within one country?

Is that asking too much or is that possible to do with that API? How could I get those values? And how do I get the total number of parks they have?


The API supports querying by country by adding the country parameter, which accepts an ISO-3166 formatted name, e.g.


You can similarly restrict it by state by using adminCode{1-3}, where that data is available. For the 'type' of park you'll likely hit semantic issues: the distinctions you listed hold for the US, but how parks are divided up isn't done consistently between countries, and what defines a park may vary greatly. You can probably figure it out fairly quickly without going too far down the semantics path, I'd start with passing style=full to the end of your query which will give you many additional fields, this in conjunction with Wikipedia top-level 'List of parks in ...' queries should get you pretty far along.

  • @scw Thank you. I think what is most confusing is that lets say I want to query by each country code....I don't know what the codes are :) And even in the query you gave me, there is a parameter called fcl - what is that? :) – Genadinik May 17 '11 at 4:10
  • @scw Oh that style=full hit the spot :) ...was looking for that kind of info!! :) – Genadinik May 17 '11 at 4:11
  • @scw also, is it possible to know how many results there are total, and how many would crash the server? – Genadinik May 17 '11 at 4:15
  • I think we're getting a bit out of the spatial questioning area and into specific questions relating to the nature of the Geonames API -- you may want to poke around at the forum as that's a community dedicated to just that one resource: forum.geonames.org The 'totalResultsCount' attribute gives the count, if you're going to be heavily using the service you may want to just download a copy of the data, but the geonames folks would know best. – scw May 17 '11 at 4:21
  • Yes, once again, thank you very much. You really helped me out and saved me countless hours of time!! :) – Genadinik May 17 '11 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.