欢迎您!

经纬度天气预报

接口标识: lonlatweather 价格: 0.0002 元/次 VIP免费
接口简介
经纬度天气预报接口,根据经纬度坐标查询天气数据。支持天气实况、24小时逐时预报、15日天气预报三种模式,返回温度、湿度、风力、天气描述等完整天气信息。适用于地图应用、户外作业、物流配送、农业种植等需要精确坐标定位天气的场景。
详细介绍
接口地址: https://www.phpwc.cn/api/lonlatweather
请求方式: POST
业务请求参数
参数名类型必填默认值说明
lon string 必填 116.276277 经度,示例:116.276277
lat string 必填 40.041462 纬度,示例:40.041462
time_type string 必填 realtime
响应参数
字段名类型说明
codeint状态码,0=成功
descstring状态描述
data− object 业务数据(成功时返回)
location− object 位置信息
lon string 经度
lat string 纬度
condition− object 天气实况数据(仅 time_type=realtime 时返回)
temperature string 当前温度(℃)
weather_desc string 天气描述(如:晴、多云)
weather_code string 天气代码
humidity string 相对湿度
wind_desc string 风向风力描述
air_pressure string 气压
visibility string 能见度
cloud_rate string 云量
feel_temperature string 体感温度(℃)
uv string 紫外线指数
sunrise string 日出时间
sunset string 日落时间
publish_time string 数据发布时间
hourly− array 24小时逐时预报数组(仅 time_type=24hours 时返回)
forecast_time string 预报时间
weather_code string 天气代码
weather_desc string 天气描述
temperature string 温度(℃)
feel_temperature string 体感温度(℃)
humidity string 相对湿度
wind_desc string 风向风力描述
air_pressure string 气压
visibility string 能见度
sunrise string 日出时间
sunset string 日落时间
forecast− array 多日预报数组(仅 time_type=15days 时返回)
forecast_day string 预报日期
max_temperature string 最高温度(℃)
min_temperature string 最低温度(℃)
day_weather_desc string 白天天气描述
day_weather_code string 白天天气代码
night_weather_desc string 夜间天气描述
night_weather_code string 夜间天气代码
day_wind_desc string 白天风力描述
night_wind_desc string 夜间风力描述
day_wind_direction_desc string 白天风向
night_wind_direction_desc string 夜间风向
sunrise string 日出时间
sunset string 日落时间
day_humidity string 白天湿度
night_humidity string 夜间湿度
request_idstring请求追踪ID
JSON 示例:
调用成功:
{
  "code": 0,
  "desc": "success",
  "data": { ... },
  "request_id": "abc123..."
}
调用失败:
{
  "code": 999,
  "desc": "错误描述",
  "request_id": "abc123..."
}
请先 登录 后使用在线测试

© 网程科技(林州网程科技有限公司)   |  豫ICP备2025120409号-2   |  豫B2-20230220   |  豫公网安备 41058102000262号