How to get city's WOEID if I know latitude and longitude of city using YQL?
For those still trying to look up the WOEID by coordinates, the other answers are now outdated. Use the geo.placefinder
datatable to look up the latitude and longitude, and the WOEID will be in the returned results.
Via YQL:
SELECT * FROM geo.placefinder WHERE text="{$seedLat}, {$seedLon}" and gflags="R"
(Test it out on the YQL Console.)
Via REST:
http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20geo.placefinder%20WHERE%20text%3D%22{$seedLat}%2C{$seedLon}%22%20and%20gflags%3D%22R%22
You can reference the official web page: http://developer.yahoo.com/boss/geo/docs/free_YQL.html
Here is an exmpale: select * from geo.placefinder where text="37.416275,-122.025092" and gflags="R"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With