稳定、快速的API服务

天气查询,我们致力于为用户提供专业的免费API数据接口服务

天气查询 v1.0

最后更新: 2026-03-22 00:05:58

用于查询某城市的天气,每天更新 拥有非常全面的天气数据,可以根据IP查询

免费 调用次数: 4 正常运行 响应速度: <100ms 无需API密钥

接口信息

接口地址:
http://api.tdyun.top/apis.php?api=tx
请求方式: GET
返回格式: json

调用统计

4
今日调用
4
总调用次数
请求示例 http://api.tdyun.top/apis.php?api=tx&city=[城市]&ip=[IP地]&type=[返回格式默认JSON可选text]

点击右侧按钮复制完整请求地址,参数值请替换为实际有效值

请求参数

参数名 是否必填 参数类型 参数说明
city
string 城市
ip
string IP地
type
string 返回格式默认JSON可选text

返回参数

参数名 参数类型 参数说明
weather
string 天气
degree
string 温度
max_degree
string 最高温度
min_degree
string 最低温度
windn
string 风向
windr
string 风力
humidity
string 湿度
precipitation
string 降水概率
pressure
string 气压
sunup
string 日出时间
sunset
string 日落时间
tips
string 提示语

返回示例

{
    "code": 200,
    "msg": "成功",
    "data": {
        "city": "北京",
        "cityEnglish": "beijing",
        "temp": "12.9",
        "tempn": "12",
        "weather": "多云转小雨",
        "wind": "西南风",
        "windSpeed": "3-4级转<3级",
        "time": "2026-03-21 08:00",
        "warning": [],
        "current": {
            "city": "北京",
            "cityEnglish": "beijing",
            "humidity": "51%",
            "wind": "西风",
            "windSpeed": "3级",
            "pressure": "1008",
            "visibility": "4km",
            "weather": "阴",
            "weatherEnglish": "Overcast",
            "temp": "12.9",
            "fahrenheit": "55.2",
            "tempn": "12",
            "air": "132",
            "air_pm25": "132",
            "limitnumber": "不限行",
            "date": "03月21日(星期六)",
            "time": "23:40"
        },
        "living": [
            {
                "name": "路况指数",
                "index": "潮湿",
                "tips": "有降水,路面潮湿,请小心驾驶。"
            },
            {
                "name": "晨练指数",
                "index": "不宜",
                "tips": "有较强降水,建议在室内做适当锻炼。"
            },
            {
                "name": "逛街指数",
                "index": "较不宜",
                "tips": "有降水,出门需带雨具并防暑。"
            },
            {
                "name": "空气污染扩散条件指数",
                "index": "良",
                "tips": "气象条件有利于空气污染物扩散。"
            },
            {
                "name": "舒适度指数",
                "index": "较不舒适",
                "tips": "白天有雨,天气较凉,注意添衣保暖。"
            },
            {
                "name": "啤酒指数",
                "index": "较不适宜",
                "tips": "有些凉意,少量饮用常温啤酒。"
            },
            {
                "name": "划船指数",
                "index": "不适宜",
                "tips": "天气不好,建议选择别的娱乐方式。"
            },
            {
                "name": "太阳镜指数",
                "index": "不需要",
                "tips": "白天能见度差不需要佩戴太阳镜"
            },
            {
                "name": "紫外线强度指数",
                "index": "最弱",
                "tips": "辐射弱,涂擦SPF8-12防晒护肤品。"
            },
            {
                "name": "风寒指数",
                "index": "凉",
                "tips": "感觉有点凉,室外活动注意适当增减衣物。"
            },
            {
                "name": "穿衣指数",
                "index": "较冷",
                "tips": "建议着厚外套加毛衣等服装。"
            },
            {
                "name": "放风筝指数",
                "index": "不宜",
                "tips": "天气不好,不适宜放风筝。"
            },
            {
                "name": "空调开启指数",
                "index": "较少开启",
                "tips": "体感舒适,不需要开启空调。"
            },
            {
                "name": "钓鱼指数",
                "index": "不宜",
                "tips": "天气不好,不适合垂钓。"
            },
            {
                "name": "晾晒指数",
                "index": "不宜",
                "tips": "降水可能会淋湿衣物,请选择在室内晾晒。"
            },
            {
                "name": "感冒指数",
                "index": "较易发",
                "tips": "天凉,湿度大,较易感冒。"
            },
            {
                "name": "洗车指数",
                "index": "不宜",
                "tips": "有雨,雨水和泥水会弄脏爱车。"
            },
            {
                "name": "旅游指数",
                "index": "适宜",
                "tips": "较弱降水和微风将伴您共赴旅程。"
            },
            {
                "name": "夜生活指数",
                "index": "较不适宜",
                "tips": "建议夜生活最好在室内进行。"
            },
            {
                "name": "心情指数",
                "index": "较差",
                "tips": "雨水可能会使心绪无端地挂上轻愁。"
            },
            {
                "name": "约会指数",
                "index": "较不适宜",
                "tips": "建议尽量不要去室外约会。"
            },
            {
                "name": "运动指数",
                "index": "较不宜",
                "tips": "有降水,推荐您在室内进行休闲运动。"
            },
            {
                "name": "过敏指数",
                "index": "较易发",
                "tips": "需注意远离过敏源,适当采取防护措施。"
            },
            {
                "name": "美发指数",
                "index": "适宜",
                "tips": "适合使用干性发质的护发素。"
            },
            {
                "name": "雨伞指数",
                "index": "带伞",
                "tips": "有降水,带雨伞,短期外出可收起雨伞。"
            },
            {
                "name": "防晒指数",
                "index": "弱",
                "tips": "涂抹8-12SPF防晒护肤品。"
            },
            {
                "name": "化妆指数",
                "index": "保湿",
                "tips": "请选用保湿型霜类化妆品。"
            },
            {
                "name": "中暑指数",
                "index": "无中暑风险",
                "tips": "天气舒适,对易中暑人群来说非常友善。"
            },
            {
                "name": "交通指数",
                "index": "一般",
                "tips": "有降水且路面湿滑,注意保持车距。"
            },
            {
                "name": "干燥指数",
                "index": "适宜",
                "tips": "天气条件较好,保持正常对皮肤的护理即可,可使用冬季滋润保湿型护肤品。"
            }
        ]
    }
}