4

I have a hiking website. I am trying to query for parks big and small around the world where people could potentially go walking or hiking.

I was trying to use the GeoNames data and was using query arguments from this table:

http://www.geonames.org/export/codes.html

Here is an example query I made trying to get parks:

http://api.geonames.org/search?maxRows=10&username=demo&q=PRK

and it gives me some things which are I have no idea what. Here is also another thing where I try to query for arctic spaces:

http://api.geonames.org/search?maxRows=10&username=demo&q=LAND 

And that gave places in the Caribbean :)

So I must be doing something totally wrong. My goal was to look up all parks in the world, and also cities (with state/country info) so that I can make that connection on my site for my users.

Is my goal possible to achieve? What was I doing wrong in my queries?

1 Answer 1

9

You're looking (Searching) for P R and K as strings.

You need to do FeatureCODE searches on Parks:

http://api.geonames.org/search?featureCode=PRK&maxRows=10&username=demo

More Geonames API search information:

http://www.geonames.org/export/geonames-search.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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