深色模式
在线试用
经纬度快速选择:
经度
纬度
日出时间(系统时区):
日落时间(系统时区):
接口文档
调用示例
sh
POST https://open.apihub.net/api/sun-rising
apihub-token: {{ apihub_token }}
{
"lon": 116.4074,
"lat": 39.9042,
"date": 1745683200000
}
sh
curl -X POST \
"https://open.apihub.net/api/sun-rising" \
-H "apihub-token: {{ apihub_token }}" \
-H "Content-Type: application/json" \
-d '{
"lon": 116.4074,
"lat": 39.9042,
"date": 1745683200000
}'
参数说明
参数 | 位置 | 类型 | 必传 | 说明 |
---|---|---|---|---|
lon | JsonBody | number | 是 | 经度 |
lat | JsonBody | number | 是 | 纬度 |
date | JsonBody | number | 否 | 时间戳毫秒数,将返回这个时间点后的下次日出日落时间。 默认为当前时间 |
返回值说明
sunrise 下次日出 时间戳毫秒数
sunset 下次日落 时间戳毫秒数
{>...3
"success": true,
"trace": "e47cbf4a232f11f09d56d2ef7d2b87a3",
"result": {>...2
"sunrise": 1745702384343,
"sunset": 1745751895911
}
}