Yahoo! API PlaceFinder cho phép bạn tìm WOEID tương ứng cho cặp vĩ độ/kinh độ. Hãy xem xét ví dụ này dịch vụ web gọi phương thức:
http://where.yahooapis.com/geocode?location=37.42,-122.12&flags=J&gflags=R&appid=zHgnBS4m
Bạn có thể chơi với các thông số yêu cầu theo yêu cầu của bạn, xem Yahoo! PlaceFinder API documentation để biết thêm. Và bạn nên thay thế appid bằng tài khoản Yahoo! appid, bạn có thể tạo một here.
Yêu cầu này trả về một phản ứng như thế, trong đó bao gồm rất nhiều dữ liệu hữu ích cùng với WOEID:
{
"ResultSet": {
"version": "1.0",
"Error": 0,
"ErrorMessage": "No error",
"Locale": "us_US",
"Quality": 99,
"Found": 1,
"Results": [
{
"quality": 99,
"latitude": "37.420000",
"longitude": "-122.120000",
"offsetlat": "37.420000",
"offsetlon": "-122.120000",
"radius": 500,
"name": "37.42,-122.12",
"line1": "3589 Bryant St",
"line2": "Palo Alto, CA 94306-4207",
"line3": "",
"line4": "United States",
"house": "3589",
"street": "Bryant St",
"xstreet": "",
"unittype": "",
"unit": "",
"postal": "94306-4207",
"neighborhood": "",
"city": "Palo Alto",
"county": "Santa Clara County",
"state": "California",
"country": "United States",
"countrycode": "US",
"statecode": "CA",
"countycode": "",
"hash": "",
"woeid": 12797284,
"woetype": 11,
"uzip": "94306"
}
]
}
}
Yahoo hiện nay có một API cho việc này: http://developer.yahoo.com/geo/placefinder/ –