# 免費天氣預報API接口
[免費天氣預報API接口 - 寒爵 - 博客園 (cnblogs.com)](https://www.cnblogs.com/Jimc/p/10250861.html)
一、中國氣象局
[http://mobile.weather.com.cn/data/sk/101010100.html](http://mobile.weather.com.cn/data/sk/101010100.html)
[http://www.weather.com.cn/data/sk/101010100.html](http://www.weather.com.cn/data/sk/101010100.html)
[http://www.weather.com.cn/data/cityinfo/101010100.html](http://www.weather.com.cn/data/cityinfo/101010100.html)
其中:**101010100**?是城市代碼。
json數據格式:
View Json
### ***1***|***2*****2.一周天氣預報接口**
?[http://mobile.weather.com.cn/data/forecast/101010100.html](http://mobile.weather.com.cn/data/forecast/101010100.html)
其中:**101010100**?是城市代碼。
json數據格式:
View Json
### ***1***|***3*****3.獲取全國所有城市代碼列表**
城市代碼
**獲取方式一(XML接口):**
全國省會城市一覽:?[http://flash.weather.com.cn/wmaps/xml/china.xml](http://flash.weather.com.cn/wmaps/xml/china.xml)
全國縣級以上城市一覽,比如:
上海:[http://flash.weather.com.cn/wmaps/xml/shanghai.xml](http://flash.weather.com.cn/wmaps/xml/shanghai.xml)?
四川:[http://flash.weather.com.cn/wmaps/xml/sichuan.xml
](http://flash.weather.com.cn/wmaps/xml/sichuan.xml%20)
成都:[http://flash.weather.com.cn/wmaps/xml/chengdu.xml](http://flash.weather.com.cn/wmaps/xml/chengdu.xml)
重慶:[http://flash.weather.com.cn/wmaps/xml/chongqing.xml](http://flash.weather.com.cn/wmaps/xml/chongqing.xml)
**獲取方式二(XML接口):**
一次性獲取全國+國外主要城市,8763個城市列表信息。URL:[http://mobile.weather.com.cn/js/citylist.xml](http://mobile.weather.com.cn/js/citylist.xml)
## ***2***|***0*****二、免費天氣API接口(http://www.tianqiapi.com)**
1.接口沒有調用次數、頻率和IP限制, 永久免費。
2.JSON接口調用文檔:[http://doc.tianqiapi.com/603579](http://doc.tianqiapi.com/603579)
3.IFrame調用:[http://www.tianqiapi.com/](http://www.tianqiapi.com/)
## ***3***|***0*****三、和風天氣(https://www.heweather.com)**
1.數據主要包含:實時天氣,3天內天氣預報,生活指數,空氣質量。
? 訪問流量:4000次/天。
? 訪問頻率:200次/分鐘。
2.URL:[https://free-api.heweather.com/v5/forecast?city=yourcity&key=yourkey](https://free-api.heweather.com/v5/forecast?city=yourcity&key=yourkey)
? ?city:城市名稱,city可通過城市中英文名稱、ID、IP和經緯度進行查詢,經緯度查詢格式為:經度,緯度。例:city=北京,city=beijing,city=CN101010100,city= 60.194.130.1
? ?key:用戶認證key
3.注冊頁面:[https://console.heweather.com/register](https://console.heweather.com/register)
接口文檔:[https://www.heweather.com/documents/](https://www.heweather.com/documents/)
## 和風天氣開發:
[開發文檔 | 和風天氣開發平臺 (qweather.com)](https://dev.qweather.com/docs/)
收集的免費key :
* 95cf38cd40b84df9beae340c610e8550
* fbb7fed63979495f88fc1ddc7296f497
* f3488e987bce466d8ae6b523becf278f
* 3cad9669ecba42c39ebfd73cdb566329
* 6ec2f3eef9bc448ba8a72e815dd86f12
* 8570f6b17578432d86eabe3290e5c659
- thinkphp
- thinkphp筆記
- 后臺登陸退出
- config配置
- 隱藏后臺模塊
- 單獨調用騰訊云行為驗證碼
- api接口跨域問題
- api接口創建案例代碼
- 使用gateway worker
- 使用swoole代碼筆記
- 使用隊列 think-queue筆記
- 后臺布局
- MySQL
- 1、關于lnmp mysql的一個坑
- 2、mysql實現group by后取各分組的最新一條
- 其他
- 搞笑的注釋代碼
- 分頁類
- nodejs 打包網址為exe
- 免費天氣預報API接口
- Ajax
- 簡單的ajax分頁1
- 通用ajax-post提交
- 引用的類庫文件
- Auth.php
- Auth.php權限控制對應的數據庫表結構
- Layui.php
- Pinyin.php
- Random.php
- Tree.php
- Tree2.php
- Js-Jq
- Git的使用
- 3、bootstrap-datetimepicker實現兩個時間范圍輸入
- CentOS安裝SSR做梯子
- Python爬蟲
- 1、安裝Gerapy
- 2、安裝Scrapy
- 3、Scrapy使用
- 4、Scrapy框架,爬取網站返回json數據(spider源碼)
- 0、Python pip更換國內源(一句命令換源)
- 服務器運維
- 1、寶塔使用webhook更新服務器代碼
- 2、搭建內網穿透
- 3、數據庫主從同步
- 4、數據庫復制
- hui-Shop問題
- 1、前端模板的注意事項
- 2、模板標簽