4

Too much useless json data is being fetched when I request a specific country cities by hitting this URL:

http://api.geonames.org/searchJSON?username=ksuhiyp&country=us&maxRows=1000

This returns too many json fields as you can see, question is hot to play with the query to get only city, country name ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Suhayb
  • 3,163
  • 3
  • 23
  • 30

1 Answers1

8

You can try with the additional parameter style=SHORT

http://api.geonames.org/searchJSON?username=ksuhiyp&country=us&maxRows=1000&style=SHORT

The docs says: style, String SHORT,MEDIUM,LONG,FULL (optional), verbosity of returned xml document, default = MEDIUM

YMomb
  • 2,366
  • 1
  • 27
  • 36