
Andrea M. answered 02/09/21
Data Analyst with 10+ Years of SQL Experience
In your URL query string, use the parameter 'featureCode' instead of 'q' as PRK and LAND are feature codes. The reason you want to use the featureCode parameter instead is that the parameter q is not specific enough; it looks across all the attributes of a pace for a match (e.g., place name, country name, continent, admin codes) not just the features of the place. There are places that are not parks or arctic spaces that match PRK and LAND respectively which is why you get places that aren't parks or arctic zones. The correct queries becomes:
http://api.geonames.org/search?featureCode=PRK&maxRows=10&username=demo
and
http://api.geonames.org/search?featureCode=LAND&maxRows=10&username=demo