Weather forecasting services for China, including: querying weather forecasts for web sites: http://weather-china.appspot.com/JSON-based rest API Interfaces

Source: Internet
Author: User

Advantage: Data and style separation

Disadvantage: not complete. City retrieval is not supported.

 

Google Code: http://code.google.com/p/weather-china/

 

Weather-China encapsulates weather RSS feed provided by Yahoo and provides a rest API interface in JSON format. To obtain weather forecasts for a city, such as Beijing, send the following GET request:

Http://weather-china.appspot.com/api? City = Beijing

Parameter description:

City: city name. You can use Pinyin.

Returns a string in JSON format, encoded using a standard UTF-8, for example:

{
"Pub ",
"Wind ":{
"Chill": 33,
"Direction": 340,
"Speed": 14.48
},
"Astpolicmy ":{
"Sunrise": "4: 49 ",
"Sunset": "19: 46"
},
"Atmosphere ":{
"Humidity": 26,
"Visibility": 9.99,
"Pressure": 982.05,
"Rising": 0
},
"Forecasts ":[
{
"Date": "2010-07-05 ",
"Day": 1,
"Code": 32,
"Text": "clear ",
"Low": 23,
"High": 33,
"Image_large": "http://weather-china.appspot.com/static/w/img/d32.png ",
"Image_small": "http://weather-china.appspot.com/static/w/img/s32.png"
},
{
"Date": "2010-07-06 ",
"Day": 2,
"Code": 32,
"Text": "clear ",
"Low": 23,
"High": 34,
"Image_large": "http://weather-china.appspot.com/static/w/img/d32.png ",
"Image_small": "http://weather-china.appspot.com/static/w/img/s32.png"
}
]
}

Pub: current weather information release time;

WIND: Wind Power Information;

Astpolicmy: sunrise and sunset time;

Atmosphere: atmospheric information;

Forecasts: includes the weather forecast for the current day and the next day:

  • Date: Date
  • Day: Week
  • Code: weather code (Please query the meaning of the code here)
  • Text: Weather Information
  • Low: Minimum Temperature
  • High: maximum temperature
  • Image_large: large image (250x180) Address
  • Image_small: small image (61X34) Address

The weather information is not updated frequently and can be safely cached on the client for 1 hour.

Free for individuals or non-profit organizations.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.