API Address:PM2.5 APIhttp://api.lib360.net/open/pm2.5.json?city= Luoyang7 days 24 Hours weather APIhttp://api.lib360.net/open/weather.json?city= SuzhouGET RequestParametersProv optional provinces such as: Jiangsu, HebeiCity name: Suzhou, ShanghaiReturn Data format JSONThe data field returns 7 days of weather conditions, including todayData24 back to today's forec
The China Meteorological Bureau provides three API interfaces for weather queries:"1" http://www.weather.com.cn/data/sk/101190101. html"2" http://www.weather.com.cn/data/cityinfo/101190101. html"3" http://m.weather.com.cn/data/101190101. htmlReturns data in JSON format, the first and second interfaces return real-time weather data for the current day, and a third
You can use the Google weather API to query weather forecasts. The Google weather API can only be used in the United States to query weather forecasts. For example:
Http://www.google.com/ig/
Call the Sina weather API (returned in xml format) to get the xml string, but it cannot be output after it is loaded into the object. Why? {Code...} calls the Sina weather API (returned in xml format) to obtain the xml string, but it cannot be output after being loaded into the object. What is the problem?
GetWe
A few days ago there was a company to prepare for a second interview. The candidate is an iOS development intern, but has been doing android,ios just contact for one months, will not be very much, so decided to do a practical project to show the interviewer, more students gave a suggestion: can do a similar to the "Lazy Weather" project. are doing. I hope we can pass it well.The
":----The number of steps"Repin_count": 1,----favorite times"group_id": "4006917770"----News ID, no concern}]}Weather APIDescription: Returns the weather conditions for the next few days after the callHow to useRequest Address: Http://114.215.158.105:8080/bizserver/weather/list.doPS: Weather
Step1: Select the interface "National Weather forecast Interface" aggregated data url:http://www.juhe.cn/docs/api/id/39/aid/87 The example in this article
Step2: Each interface needs to pass in a parameter key, which is equivalent to the user's token, so the first step is to apply for a key.
step3: The students who have studied Java know that when we do not understand a class or method of their intentions
This article mainly introduces how to obtain weather information from Baidu API by using Python. The example analyzes the skills of using Python to operate Baidu API, which has some reference value, for more information about how to obtain weather conditions from Baidu API,
Preview diagram (simpler and rougher)
Aggregation data National Weather forecast interface: HTTPS://WWW.JUHE.CN/DOCS/API/ID/39
Interface Address: Http://v.juhe.cn/weather/indexSupport format: Json/xmlRequest Mode: GetRequest Example: http://v.juhe.cn/weather/index?format=2cityname=%E8%8B%8F%E5%B7%9Ekey= The key you
Weather forecast query Interface API, here I am using the National Weather forecast interfaceUse more also: Sina weather interface, Baidu weather interface, Google weather interface, Yahoo wea
The base URL:Http://www.google.com/ig/api?
This is the base URL which can be extended with the following parameters:
The weather parameter:Weather =Location
WhereLocationCan be eitherZip code(Weather = 24060 );City name,State(Weather = woodland, PA );City name,Country(Weather
Use bo api to create weather check software, boapi
Let's take a look at the effect.
Interface address: http://service.boapi.net/Weather/Weather.ashx? Appkey = The appkey city = city name you applied
Interface Description view http://www.boapi.net/weather.htm
Key code of request service
JToken WheatherJson (string city) {WebClient wc = new WebClient (); strin
Direction" , "NWD" Span class= "pun" >: "No continuous wind Direction" , "DWP" : "Breeze" ,: "Breeze" , "ss" : "05:24|19:01" } ]} Return parameter description
C
City Code
Fi
Weather Index
cn
Name
Cin
Chinese index name
Pn
Name of province municipality
Ic
Index level
Dn
City Name
Ad
Index related recommendations
Unch
This example describes Python's approach to getting the weather from the Baidu API. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
__author__ = ' Saint '
Import OS
Import Urllib.request
Import Urllib.parse
Import JSON
Class Weather (object):
# get the URI of the city code
Code_uri =
Ajax obtains data by city name (National Weather Forecast API) and ajaxapi
Preview a chart (relatively simple and rough)
Aggregate Data National Weather Forecast interface: https://www.juhe.cn/docs/api/id/39
Interface address: http://v.juhe.cn/weather/indexSupported formats
Yahoo has reopened the weather API, and can only get 2000/IP per day without using OAuth
The Python code that uses OAuth to get the weather is as follows, using Requests_oauthlib for authentication
Use OAuth to get the weather for 2w times per hour, 10w times a day.
Please register a Yahoo app before use to get key
#
Baidu provides weather forecast query interface API, can be based on latitude/longitude/city Name query weather conditions.Interface descriptionSearch for weather results based on latitude/longitude/city nameinterface ExampleHttp://api.map.baidu.com/telematics/v3/weather?loc
This article shares a three line can get your designated city Weather information Php+google API implementation code, the need for friends can refer to.
The code is as follows
Copy Code
$xml = simplexml_load_file (' http://www.google.com/ig/api?weather= Changsha ');$information = $xml
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.