freeapis

Sunrise and Sunset

给定经纬度的日落和日出时间

认证方式
No auth
HTTPS
Yes
CORS
No

简介

Sunrise-Sunset API 返回任意经纬度的日出、日落、晨昏蒙影和正午时间——免费、免密钥、零依赖。是摄影规划、智能家居照明和户外应用的实用工具。

快速开始

某地点的太阳时间(实测可用):

curl "https://api.sunrise-sunset.org/json?lat=36.72&lng=-4.42"
{
  "results": {
    "sunrise": "5:40:22 AM",
    "sunset": "7:08:21 PM",
    "solar_noon": "12:24:21 PM",
    "day_length": "13:27:59",
    "civil_twilight_begin": "5:12:21 AM",
    "civil_twilight_end": "7:36:22 PM",
    "nautical_twilight_begin": "4:38:36 AM",
    "nautical_twilight_end": "8:10:07 PM",
    "astronomical_twilight_begin": "4:03:07 AM",
    "astronomical_twilight_end": "8:45:37 PM"
  },
  "status": "OK"
}

指定日期:

curl "https://api.sunrise-sunset.org/json?lat=36.72&lng=-4.42&date=2026-12-21"

24 小时制:

curl "https://api.sunrise-sunset.org/json?lat=36.72&lng=-4.42&formatted=0"

认证方式

无需认证——免密钥。

速率限制与注意事项

  • 免费;没有文档化的硬性限制——请礼貌使用。
  • 时间是所请求坐标的当地时间(API 返回该位置时区的时间)。
  • formatted=0 返回 ISO-8601 时间戳而非人读字符串。
  • 需要十进制的 lat/lngdate 可选(默认今天)。

常见问题

Sunrise-Sunset 免费吗? 是的——免费且免密钥。

时间是本地时区吗? 是所请求坐标的时区——不是你的本地时区。

能获取 ISO 时间戳吗? 可以——加 formatted=0

科学与数学 分类更多

APIAuthHTTPSCORS
arcsecond.io

Multiple astronomy data sources

No authYesUnknown
arXiv

Curated research-sharing platform: physics, mathematics, quantitative finance, and economics

No authYesUnknown
CodeCogs

Render LaTeX equations in PNG, GIF, SVG, EMF, PDF, JSON, or download formats with styling options

No authYesUnknown
CORE

Access the world's Open Access research papers

API KeyYesUnknown
CycleCalcs

Interpreted astronomy: sun and moon times, moon phases, planets, eclipses, seasons

No authYesYes