0

Cannot get weather forecasts in json for specific woeids

Hello. I'm trying to get the weather for "Kharkov, Ukraine", woeid is 922137. So I'm using this query:

select * from weather.forecast where location=922137

but it returns "City not found", "Invalid Input /forecastrss?p=922137". However, if I'm trying to use "forecastrss?w=922137" (using "w" instead of "p"), it returns all necessary information, but the problem is that I need json format instead of xml. Are there any ways to solve this problem?

by
3 Replies
  • Looks like the table need some updates. I will log a local ticket for this, and once its fixed, will get back to you.

    For getting it in json, you can check console and select json as the output. And It will print the sample url at the bottom.
    0
  • The same is for Warsaw, Poland (http://weather.yahoo.com/poland/masovian/warsaw-523920/).YQL-call (select * from weather.forecast where location=523920) fails with "City not found" error.
    0
  • You should use the "woeid" field in your where condition instead of the "location" field you are currently using in your query.

    The correct query should look like this:

    select * from weather.forecast where woeid=922137

    Cheers

    QUOTE(Daniil @ 12 Feb 2012 4:22 AM)
    Hello. I'm trying to get the weather for "Kharkov, Ukraine", woeid is 922137. So I'm using this query:

    select * from weather.forecast where location=922137

    but it returns "City not found", "Invalid Input /forecastrss?p=922137". However, if I'm trying to use "forecastrss?w=922137" (using "w" instead of "p"), it returns all necessary information, but the problem is that I need json format instead of xml. Are there any ways to solve this problem?
    0

Recent Posts

in YQL