免费天气api_高速稳定的天气数据_高速稳定的天气API接口_宵蓝的博客-程序员宅基地

技术标签: json  

天气API (https://www.tianqiapi.com) 提供的是真正免费的天气api接口

接口没有调用次数、频率、IP等限制!

提供的接口完全满足广大开发者的日常需求, 而且使用接口无需注册, 不需要key, 一行代码就可以搞定

curl "https://www.tianqiapi.com/api/?version=v1"

7日天气 / 15日天气 / 40日天气 / 全球天气 / 每小时预报 /

生活指数 / 空气质量 / 预警信息 / 机场天气 / 每日气象云图 /

白天天气 / 晚上天气 / 每日日出 / 每日日落 / 湿度 / 气压 等等

调用接口可选参数

cityid String 城市ID, 官网提供json和sql数据
city String 城市名称, 不要带市和区; 如: 青岛微山
ip String IP所在城市天气, 默认返回当前IP地区天气

看一下预警信息字段, 类型, 等级, 详细内容

alarm: {
alarm_type: "大风",
alarm_level: "蓝色",
alarm_content: "济南市气象台2019年04月03日16时00分发布大风蓝色预警信号:预计3日夜间至6日我市将出现大风天气,其中3日夜间至5日南风短时东北风4~5级阵风7级,6日北风4~5级阵风7级,森林火险等级极高。(预警信息来源:国家预警信息发布中心)"
}

目前平台收集了14种天气图标素材供大家下载使用, 大家可以去官网下载

实况天气, 最近1小时左右天气, 返回字段很全很实用

{
cityid: "101120101",
date: "2019-04-04",
week: "星期四",
update_time: "07:40",
city: "济南",
country: "China",
wea: "晴",
wea_img: "qing",
tem: "15",
win: "南风",
win_speed: "3级",
win_meter: "<12km/h",
humidity: "52%",
visibility: "17.68km",
pressure: "997",
air: "97",
air_pm25: "97",
air_level: "良",
air_tips: "空气好,可以外出活动,除极少数对污染物特别敏感的人群以外,对公众没有危害!",
alarm: {
alarm_type: "大风",
alarm_level: "蓝色",
alarm_content: "济南市气象台2019年04月03日16时00分发布大风蓝色预警信号:预计3日夜间至6日我市将出现大风天气,其中3日夜间至5日南风短时东北风4~5级阵风7级,6日北风4~5级阵风7级,森林火险等级极高。(预警信息来源:国家预警信息发布中心)"
}
}

在看下7日天气接口返回的内容吧

{
cityid: "101110101",
city: "西安",
update_time: "2019-04-04 05:30:00",
data: [
{
day: "04日(星期四)",
date: "2019-04-04",
week: "星期四",
wea: "晴",
wea_img: "qing",
wea_day: "晴",
wea_night: "晴",
tem1: "23",
tem2: "9",
win: [
"西南风",
"西南风"
],
win_speed: "<3级",
sunrise: "06:29",
sunset: "19:06",
air: "54",
air_level: "良",
air_tips: "空气好,可以外出活动,除极少数对污染物特别敏感的人群以外,对公众没有危害!",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "11",
win: "西南风",
win_speed: "<3级"
},
{
hours: "09时",
wea: "晴",
tem: "13",
win: "西南风",
win_speed: "6-7级"
},
{
hours: "10时",
wea: "晴",
tem: "16",
win: "西南风",
win_speed: "6-7级"
},
{
hours: "11时",
wea: "晴",
tem: "18",
win: "西南风",
win_speed: "<3级"
},
{
hours: "12时",
wea: "晴",
tem: "20",
win: "西南风",
win_speed: "<3级"
},
{
hours: "13时",
wea: "晴",
tem: "21",
win: "西南风",
win_speed: "<3级"
},
{
hours: "14时",
wea: "晴",
tem: "22",
win: "西南风",
win_speed: "<3级"
}
],
index: [
{
title: "紫外线指数",
level: "中等",
desc: "涂擦SPF大于15、PA+防晒护肤品。"
},
{
title: "减肥指数",
level: "五颗星",
desc: "小长假将至,突击甩肉忙。天气较舒适,快去运动吧。"
},
{
title: "血糖指数",
level: "较易波动",
desc: "血糖较易波动,注意监测。"
},
{
title: "穿衣指数",
level: "较舒适",
desc: "建议穿薄外套或牛仔裤等服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "中",
desc: "易感人群应适当减少室外活动。"
}
]
},
{
day: "05日(星期五)",
date: "2019-04-05",
week: "星期五",
wea: "晴",
wea_img: "qing",
wea_day: "晴",
wea_night: "晴",
tem1: "27",
tem2: "9",
win: [
"西南风",
"南风"
],
win_speed: "3-4级转<3级",
sunrise: "06:27",
sunset: "19:06",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "12",
win: "西南风",
win_speed: "<3级"
},
{
hours: "09时",
wea: "晴",
tem: "16",
win: "西南风",
win_speed: "<3级"
},
{
hours: "10时",
wea: "晴",
tem: "19",
win: "西南风",
win_speed: "<3级"
},
{
hours: "11时",
wea: "晴",
tem: "22",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "12时",
wea: "晴",
tem: "24",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "13时",
wea: "晴",
tem: "26",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "14时",
wea: "晴",
tem: "27",
win: "西南风",
win_speed: "3-4级"
}
],
index: [
{
title: "紫外线指数",
level: "强",
desc: "涂擦SPF大于15、PA+防晒护肤品。"
},
{
title: "减肥指数",
level: "三颗星",
desc: "风有点大,可选择室内运动燃脂。"
},
{
title: "血糖指数",
level: "较易波动",
desc: "血糖较易波动,注意监测。"
},
{
title: "穿衣指数",
level: "较舒适",
desc: "建议穿薄外套或牛仔裤等服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "良",
desc: "气象条件有利于空气污染物扩散。"
}
]
},
{
day: "06日(星期六)",
date: "2019-04-06",
week: "星期六",
wea: "晴",
wea_img: "qing",
wea_day: "晴",
wea_night: "晴",
tem1: "32",
tem2: "12",
win: [
"西南风",
"北风"
],
win_speed: "3-4级转<3级",
sunrise: "06:26",
sunset: "19:07",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "12",
win: "南风",
win_speed: "<3级"
},
{
hours: "09时",
wea: "晴",
tem: "16",
win: "西南风",
win_speed: "5-6级"
},
{
hours: "10时",
wea: "晴",
tem: "21",
win: "西南风",
win_speed: "4-5级"
},
{
hours: "11时",
wea: "晴",
tem: "26",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "12时",
wea: "晴",
tem: "28",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "13时",
wea: "晴",
tem: "29",
win: "西南风",
win_speed: "3-4级"
},
{
hours: "14时",
wea: "晴",
tem: "31",
win: "西南风",
win_speed: "3-4级"
}
],
index: [
{
title: "紫外线指数",
level: "很强",
desc: "涂擦SPF20以上,PA++护肤品,避强光。"
},
{
title: "减肥指数",
level: "一颗星",
desc: "天热风大,可选择低强度运动。"
},
{
title: "血糖指数",
level: "易波动",
desc: "血糖易波动,注意监测。"
},
{
title: "穿衣指数",
level: "炎热",
desc: "建议穿短衫、短裤等清凉夏季服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "良",
desc: "气象条件有利于空气污染物扩散。"
}
]
},
{
day: "07日(星期日)",
date: "2019-04-07",
week: "星期日",
wea: "晴转阴",
wea_img: "yin",
wea_day: "晴",
wea_night: "阴",
tem1: "31",
tem2: "17",
win: [
"东南风",
"东北风"
],
win_speed: "<3级转3-4级",
sunrise: "06:25",
sunset: "19:08",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "15",
win: "北风",
win_speed: "<3级"
},
{
hours: "11时",
wea: "晴",
tem: "23",
win: "西南风",
win_speed: "<3级"
},
{
hours: "14时",
wea: "晴",
tem: "30",
win: "东南风",
win_speed: "<3级"
},
{
hours: "17时",
wea: "晴",
tem: "27",
win: "东风",
win_speed: "<3级"
},
{
hours: "20时",
wea: "晴",
tem: "23",
win: "东南风",
win_speed: "<3级"
},
{
hours: "23时",
wea: "多云",
tem: "23",
win: "东南风",
win_speed: "3-4级"
},
{
hours: "02时",
wea: "阴",
tem: "20",
win: "东北风",
win_speed: "3-4级"
}
],
index: [
{
title: "紫外线指数",
level: "强",
desc: "涂擦SPF大于15、PA+防晒护肤品。"
},
{
title: "减肥指数",
level: "一颗星",
desc: "天气有点热,运动多补水。"
},
{
title: "血糖指数",
level: "易波动",
desc: "血糖易波动,注意监测。"
},
{
title: "穿衣指数",
level: "热",
desc: "适合穿T恤、短薄外套等夏季服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "中",
desc: "易感人群应适当减少室外活动。"
}
]
},
{
day: "08日(星期一)",
date: "2019-04-08",
week: "星期一",
wea: "阴转小雨",
wea_img: "yin",
wea_day: "阴",
wea_night: "小雨",
tem1: "26",
tem2: "9",
win: [
"东北风",
"东北风"
],
win_speed: "4-5级转3-4级",
sunrise: "06:23",
sunset: "19:09",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "阴",
tem: "19",
win: "东北风",
win_speed: "3-4级"
},
{
hours: "11时",
wea: "多云",
tem: "22",
win: "东风",
win_speed: "4-5级"
},
{
hours: "14时",
wea: "多云",
tem: "26",
win: "东北风",
win_speed: "4-5级"
},
{
hours: "17时",
wea: "多云",
tem: "22",
win: "东北风",
win_speed: "4-5级"
},
{
hours: "20时",
wea: "阴",
tem: "19",
win: "东北风",
win_speed: "4-5级"
},
{
hours: "23时",
wea: "小雨",
tem: "14",
win: "南风",
win_speed: "4-5级"
},
{
hours: "02时",
wea: "多云",
tem: "12",
win: "东北风",
win_speed: "3-4级"
}
],
index: [
{
title: "紫外线指数",
level: "最弱",
desc: "辐射弱,涂擦SPF8-12防晒护肤品。"
},
{
title: "减肥指数",
level: "三颗星",
desc: "风有点大,可选择室内运动燃脂。"
},
{
title: "血糖指数",
level: "易波动",
desc: "气温多变,血糖易波动,注意监测血糖变化。"
},
{
title: "穿衣指数",
level: "较舒适",
desc: "建议穿薄外套或牛仔裤等服装。"
},
{
title: "洗车指数",
level: "不宜",
desc: "有雨,雨水和泥水会弄脏爱车。"
},
{
title: "空气污染扩散指数",
level: "良",
desc: "气象条件有利于空气污染物扩散。"
}
]
},
{
day: "09日(星期二)",
date: "2019-04-09",
week: "星期二",
wea: "多云转晴",
wea_img: "yun",
wea_day: "多云",
wea_night: "晴",
tem1: "22",
tem2: "13",
win: [
"东北风",
"东北风"
],
win_speed: "<3级",
sunrise: "06:22",
sunset: "19:09",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "11",
win: "东北风",
win_speed: "<3级"
},
{
hours: "11时",
wea: "多云",
tem: "16",
win: "东北风",
win_speed: "<3级"
},
{
hours: "14时",
wea: "多云",
tem: "21",
win: "东北风",
win_speed: "<3级"
},
{
hours: "17时",
wea: "晴",
tem: "21",
win: "东北风",
win_speed: "<3级"
},
{
hours: "20时",
wea: "晴",
tem: "18",
win: "东北风",
win_speed: "<3级"
},
{
hours: "23时",
wea: "晴",
tem: "16",
win: "东风",
win_speed: "<3级"
},
{
hours: "02时",
wea: "晴",
tem: "15",
win: "东北风",
win_speed: "<3级"
}
],
index: [
{
title: "紫外线指数",
level: "弱",
desc: "辐射较弱,涂擦SPF12-15、PA+护肤品。"
},
{
title: "减肥指数",
level: "五颗星",
desc: "天气较舒适,减肥正当时。"
},
{
title: "血糖指数",
level: "较易波动",
desc: "血糖较易波动,注意监测。"
},
{
title: "穿衣指数",
level: "较舒适",
desc: "建议穿薄外套或牛仔裤等服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "中",
desc: "易感人群应适当减少室外活动。"
}
]
},
{
day: "10日(星期三)",
date: "2019-04-10",
week: "星期三",
wea: "晴",
wea_img: "qing",
wea_day: "晴",
wea_night: "晴",
tem1: "23",
tem2: "9",
win: [
"东北风",
"东北风"
],
win_speed: "<3级",
sunrise: "06:21",
sunset: "19:10",
air: "",
air_level: "",
air_tips: "",
alarm: {
alarm_type: "",
alarm_level: "",
alarm_content: ""
},
hours: [
{
hours: "08时",
wea: "晴",
tem: "15",
win: "东北风",
win_speed: "<3级"
},
{
hours: "11时",
wea: "晴",
tem: "20",
win: "东北风",
win_speed: "<3级"
},
{
hours: "14时",
wea: "晴",
tem: "22",
win: "东北风",
win_speed: "<3级"
},
{
hours: "17时",
wea: "晴",
tem: "22",
win: "东北风",
win_speed: "<3级"
},
{
hours: "20时",
wea: "晴",
tem: "14",
win: "东北风",
win_speed: "<3级"
},
{
hours: "23时",
wea: "晴",
tem: "13",
win: "东南风",
win_speed: "<3级"
},
{
hours: "02时",
wea: "晴",
tem: "12",
win: "东北风",
win_speed: "<3级"
}
],
index: [
{
title: "紫外线指数",
level: "中等",
desc: "涂擦SPF大于15、PA+防晒护肤品。"
},
{
title: "减肥指数",
level: "五颗星",
desc: "天气较舒适,减肥正当时。"
},
{
title: "血糖指数",
level: "较易波动",
desc: "血糖较易波动,注意监测。"
},
{
title: "穿衣指数",
level: "较舒适",
desc: "建议穿薄外套或牛仔裤等服装。"
},
{
title: "洗车指数",
level: "较适宜",
desc: "无雨且风力较小,易保持清洁度。"
},
{
title: "空气污染扩散指数",
level: "中",
desc: "易感人群应适当减少室外活动。"
}
]
}
]
}

  

欢迎小伙伴们对接, 有问题联系网站技术QQ就可以了, 随时解答~

 

 

 

转载于:https://www.cnblogs.com/ccjin/p/10652832.html

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_30307921/article/details/99191302

智能推荐

git push首次提交报错问题解决_白开水_0001的博客-程序员宅基地

刚配置好的git仓库服务器,首次提交的时候会报如下错误:remote: error: refusing to update checked out branch: refs/heads/master  remote: error: By default, updating the current branch in a non-bare repository remote: error:

java xssf生成_通过poi的XSSF实现生成excel文件_令狐诗楠的博客-程序员宅基地

importjava.io.File;importjava.io.FileOutputStream;importjava.util.ArrayList;importjava.util.List;importorg.apache.poi.hssf.util.HSSFColor;importorg.apache.poi.ss.usermodel.CellStyle;importorg.apache.p...

Web框架UI系列--MVC常用控件讲解_云微开发框架的博客-程序员宅基地_mvc控件

按钮、下拉框、文本框等控件在C/S结构和Web Form都是界面可视化可拉动的服务端控件形式,在.NET MVC Web开发框架中则采用HTML表单标签来实现, 如果用纯Html标签代码写控件,效率并不高,且容易出错。为了方便开发人员,也为了提高效率,从MVC3开始,@Html.XXX(),这个.net 提供的HtmlHelper类及其辅助类,辅助我们快速开发前台页面,也提供了可扩展的接口,前台页面的标签可以做到高度可重用。

java8 实践_java8 新特性实践_weixin_39621075的博客-程序员宅基地

构造stream的几种方法:经过list获得:Arrays.asList(1, 2).stream();经过数组:int[] a = {1, 2, 3};Arrays.stream(a);使用stream初始化方法:Stream.of(1,2,3);stream拼接:Stream.concat(stream1, stream2);stream.builder:Stream.builder().ad...

android sqlite 用外键关联,SQlite – Android – 外键语法_王梓键的博客-程序员宅基地

我一直在试图让外键在我的Android sqlite数据库中工作。我试过下面的语法,但它给了我一个力close:private static final String TASK_TABLE_CREATE = "create table "+ TASK_TABLE + " (" + TASK_ID+ " integer primary key autoincrement," + TASK_TITLE...

随便推点

centos自带php么,centos自带服务器吗?_麻天龙的博客-程序员宅基地

centos不是自带服务器的,安装方法:首先在root操作下新增oper用户;然后将oper用户加入到sudoers中;接着切换到oper重新登录;最后创建常用目录即可。centos不是自带服务器的,安装方法:1. 新增oper用户(root下操作)useradd oper# 修改密码:根据提示输入两次密码passwd oper将oper用户加入到sudoers中(可使用sudo命令)vi /et...

python flask_小小灰烬的博客-程序员宅基地

资料:官方文档:https://dormousehole.readthedocs.io/en/latest/quickstart.html#id2中文文档杂:https://www.kancloud.cn/hartnett/flask1.安装sudo pip install virtualenvpip install Flask。。。。2.极简例子from flask import Flaskapp = Flask(__name__)@app.route('/upload', met

sparkSQL基础_fengge18306的博客-程序员宅基地

目录1.sparksql概述1.1、什么是Spark SQL1.2、SparkSQL的数据源1.3、SparkSQL底层架构2. sparksql的四大特性2.1、易整合2.2、统一的数据源访问2.3、兼容hive2.4、支持标准的数据库连接3. DataFrame概述3.1、DataFrame是什么3.2、DataFrame和RDD的优缺点3.4、DataFrame常用操作4. DataSet概述4.1、DataSet是什么4.2、RDD、D

棋盘覆盖(分治--导向性--算法第二章)_BIue eyes°的博客-程序员宅基地

算法举例分析(分治,导向性)主要解决“不知道用什么方法,但经过分析之后得到分治解决思路”的问题棋盘覆盖在一个2k∗2k2^k*2^k2k∗2k个方格组成的棋盘中,恰有一个方格与其它方格不同,称该方格为一特殊方格,且称该棋盘为一特殊棋盘。需要用四种不同形态的L型骨牌,覆盖给定特殊棋盘上除特殊方格以外的所有方格,且任何2个L型骨牌不得重叠。本问题实际即用可旋转的L型骨牌覆盖棋盘,使其仅剩下一个方格。问题规模过于庞大,从最简单的开始想起。正方形棋盘,根据题意,棋盘最小规模为11,此时不需要骨牌即满足题

markdown,实现粘贴图片上传_jiangdaquan的博客-程序员宅基地_markdown paste

uploadImg.jsfunction initPasteDragImg(Editor){ var doc = document.getElementById(Editor.id) doc.addEventListener('paste', function (event) { var items = (event.clipboardData || window.clipboardData).items; var file = null; .

力扣——整数反转_七寻北里的博客-程序员宅基地

整数反转给你一个 32 位的有符号整数 x ,返回将 x 中的数字部分反转后的结果。如果反转后整数超过 32 位的有符号整数的范围 [−231, 231 − 1] ,就返回 0。假设环境不允许存储 64 位整数(有符号或无符号)。示例 1:输入:x = 123输出:321示例 2:输入:x = -123输出:-321示例 3:输入:x = 120输出:21示例 4:输入:x = 0输出:0提示:-231 &lt;= x &lt;= 231 - 1pack

推荐文章

热门文章

相关标签