Python爬虫视频教程零基础小白到scrapy爬虫高手-轻松入门
How to get API key (APPID)
to get unique API key on your account page
How to use API key in API call
Description:
To get access to weather API you need an API key whatever account you chose from Free to Enterprise.
We keep right to not to process API requests without API key.
API call:
http://api.openweathermap.org/data/2.5/forecast/city?id=524901&APPID={APIKEY}
Parameters:
APPID {APIKEY} is your unique API key
Example of API call:
How to get accurate API response
1 Do not send requests more then 1 time per 10 minutes from one device/one API key. Normally the weather is not changing so frequently.
2 Use the name of the server as api.openweathermap.org. Please never use the IP address of the server.
3 Call API by city ID instead of city name, city coordinates or zip code. In this case you get precise respond exactly for your city.
4 Free account has limitation of capacity and data availability. If you do not get respond from server do not try to repeat your request immediately, but only after 10 min. Also we recommend to store your previous request data.
Find more details in our or contact us via
https://home.openweathermap.org/ 我的API号码
0383ae59663e14ab5a6855d5b6ad5d00
下载城市号ID
http://bulk.openweathermap.org/sample/
举例,输入以下网址
http://api.openweathermap.org/data/2.5/forecast/city?id=524901&APPID=0383ae59663e14ab5a6855d5b6ad5d00
得到