Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7026297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:05:55+00:00 2026-05-28T00:05:55+00:00

It seems a bug of Yahoo Weather API that every time I send a

  • 0

It seems a bug of Yahoo Weather API that every time I send a request I get the same weather. What’s interesting design, there isn’t any timestamp field in the response to identify the time of the weather.

$ curl "http://weather.yahooapis.com/forecastjson?p=CHXX0099&u=c" -v
* About to connect() to weather.yahooapis.com port 80 (#0)
*   Trying 180.233.115.34... connected
* Connected to weather.yahooapis.com (180.233.115.34) port 80 (#0)
> GET /forecastjson?p=CHXX0099&u=c HTTP/1.1
> User-Agent: curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.9.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7
> Host: weather.yahooapis.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 31 May 2011 12:58:10 GMT
< Cache-Control: private, max-age=1200
< Expires: Tue, 31 May 2011 13:18:10 GMT
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: application/json;charset=UTF-8
< 
* Closing connection #0
{"units":{"temperature":"C","speed":"km\/h","distance":"km","pressure":"mb"},"location":{"location_id":"CHXX0099","city":"Nanjing","state_abbreviation":"JI","country_abbreviation":"CH","elevation":3,"latitude":32,"longitude":118.80000000000000},"wind":{"speed":6.00000000000000,"direction":"N"},"atmosphere":{"humidity":"22","visibility":12.01000000000000,"pressure":1024.00000000000000,"rising":""},"url":"http:\/\/weather.yahoo.com\/forecast\/CHXX0099.html","logo":"http:\/\/l.yimg.com\/a\/i\/us\/nt\/ma\/ma_nws-we_1.gif","astronomy":{"sunrise":"06:22","sunset":"18:09"},"condition":{"text":"Sunny","code":"32","image":"http:\/\/l.yimg.com\/a\/i\/us\/we\/52\/32.gif","temperature":14.00000000000000},"forecast":[{"day":"Today","condition":"Mostly Clear","high_temperature":13.00000000000000,"low_temperature":3.00000000000000},{"day":"Tomorrow","condition":"Partly Cloudy","high_temperature":16.00000000000000,"low_temperature":5.00000000000000}]}

However, if I request the same interface via VPN, the data returned is just right.

$ curl "http://weather.yahooapis.com/forecastjson?p=CHXX0099&u=c" -v
* About to connect() to weather.yahooapis.com port 80 (#0)
*   Trying 180.233.115.34... connected
* Connected to weather.yahooapis.com (180.233.115.34) port 80 (#0)
> GET /forecastjson?p=CHXX0099&u=c HTTP/1.1
> User-Agent: curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/3.12.9.0 zlib/1.2.5 libidn/1.19 libssh2/1.2.7
> Host: weather.yahooapis.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 31 May 2011 12:58:10 GMT
< Cache-Control: private, max-age=1200
< Expires: Tue, 31 May 2011 13:18:10 GMT
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: application/json;charset=UTF-8
< 
* Closing connection #0
{"units":{"temperature":"C","speed":"km\/h","distance":"km","pressure":"mb"},"location":{"location_id":"CHXX0099","city":"Nanjing","state_abbreviation":"JI","country_abbreviation":"CH","elevation":3,"latitude":32,"longitude":118.80000000000000},"wind":{"speed":6.00000000000000,"direction":"N"},"atmosphere":{"humidity":"22","visibility":12.01000000000000,"pressure":1024.00000000000000,"rising":""},"url":"http:\/\/weather.yahoo.com\/forecast\/CHXX0099.html","logo":"http:\/\/l.yimg.com\/a\/i\/us\/nt\/ma\/ma_nws-we_1.gif","astronomy":{"sunrise":"06:22","sunset":"18:09"},"condition":{"text":"Sunny","code":"32","image":"http:\/\/l.yimg.com\/a\/i\/us\/we\/52\/32.gif","temperature":14.00000000000000},"forecast":[{"day":"Today","condition":"Mostly Clear","high_temperature":13.00000000000000,"low_temperature":3.00000000000000},{"day":"Tomorrow","condition":"Partly Cloudy","high_temperature":16.00000000000000,"low_temperature":5.00000000000000}]}

Personally, I think this is something related by Varnish or Squid stuff. Are you also affected by this issue? Before I can find the official support link, what can I do to expire the server-side cache ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:05:55+00:00Added an answer on May 28, 2026 at 12:05 am

    In your question as posted, the two Curl examples look identical, but I imagine you are noticing that the data returned was different depending on your network path.

    There is some level of caching on these JSON responses (30 minutes I believe), but there may be additional caching on your network.

    One important issue is the weather forecast data on the backend is updated on intervals, because the forecast itself does not change that frequently.

    In fact, the JSON weather interface you’re using is not officially supported, but I believe it’s just used by Yahoo itself on various pages.

    Refer to the Yahoo! Weather page on YDN for the “official” supported interface. By itself this interface is not as useful because it’s only in XML format. Instead you could use the YQL console to pass in your location and receive back JSON formatted data.

    For example, try this query: select * from weather.bylocation where location=”Nanjing, CN”. In the results, notice the lastBuildData value which is the last time the forecast was updated:

    {
     "query": {
      "count": 1,
      "created": "2011-12-30T20:03:17Z",
      "lang": "en-US",
      "results": {
       "weather": {
        "rss": {
         "version": "2.0",
         "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "yweather": "http://xml.weather.yahoo.com/ns/rss/1.0",
         "channel": {
          "title": "Yahoo! Weather - Nanjing, CN",
          "link": "http://us.rd.yahoo.com/dailynews/rss/weather/Nanjing__CN/*http://weather.yahoo.com/forecast/CHXX0099_f.html",
          "description": "Yahoo! Weather for Nanjing, CN",
          "language": "en-us",
          "lastBuildDate": "Sat, 31 Dec 2011 3:00 am CST",
          "ttl": "60",
          "location": {
           "city": "Nanjing",
           "country": "China",
           "region": ""
          },
          "units": {
           "distance": "mi",
           "pressure": "in",
           "speed": "mph",
           "temperature": "F"
          },
          "wind": {
           "chill": "25",
           "direction": "90",
           "speed": "4"
          },
          "atmosphere": {
           "humidity": "83",
           "pressure": "30.45",
           "rising": "2",
           "visibility": "0.99"
          },
          "astronomy": {
           "sunrise": "7:03 am",
           "sunset": "5:09 pm"
          },
          "image": {
           "title": "Yahoo! Weather",
           "width": "142",
           "height": "18",
           "link": "http://weather.yahoo.com",
           "url": "http://l.yimg.com/a/i/brand/purplelogo//uh/us/news-wea.gif"
          },
          "item": {
           "title": "Conditions for Nanjing, CN at 3:00 am CST",
           "lat": "32.05",
           "long": "118.78",
           "link": "http://us.rd.yahoo.com/dailynews/rss/weather/Nanjing__CN/*http://weather.yahoo.com/forecast/CHXX0099_f.html",
           "pubDate": "Sat, 31 Dec 2011 3:00 am CST",
           "condition": {
            "code": "20",
            "date": "Sat, 31 Dec 2011 3:00 am CST",
            "temp": "30",
            "text": "Fog"
           },
           "description": "
    \nCurrent Conditions:
    \nFog, 30 F
    \n
    Forecast:
    \nSat - Sunny. High: 50 Low: 28
    \nSun - Sunny. High: 51 Low: 28
    \n
    \nFull Forecast at Yahoo! Weather

    \n(provided by The Weather Channel)
    ", "forecast": [ { "code": "32", "date": "31 Dec 2011", "day": "Sat", "high": "50", "low": "28", "text": "Sunny" }, { "code": "32", "date": "1 Jan 2012", "day": "Sun", "high": "51", "low": "28", "text": "Sunny" } ], "guid": { "isPermaLink": "false", "content": "CHXX0099_2012_01_01_7_00_CST" } } } } } } } }
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be a bug in a Wordpress PHP function that leaves whitespace
This seems like a bug to me... I accept that automatic properties, defined as
There seems to be a bug in the Java varargs implementation. Java can't distinguish
It seems to be well-known there is a bug when using JMenuItem.getRootPane(). I read
I have come across a strange behavior of Java that seems like a bug.
I am getting an odd intermittent bug that seems to ve related to the
This seems like a bug in Rails to me, but there's probably not much
$('> img[src=folderopen.gif]',$scope) The above will fail,seems a bug of jQuery,is there a work around?
I have got a memory bug that seems to boil down to something happening
I'm trying to reproduce a bug that seems to appear when a user is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.