Sunrise and Sunset
Sunrise, sunset, twilight, golden hour, sun position and moon phase for any place and date.
base https://prod.api.market/api/v1/claimcheckai/sunrise-and-sunset/sun/v1- endpoints
- 4
- free plan, paid from
- $2.50/mo
- data
- Self-contained
Calculate sunrise, sunset, dawn, dusk and day length for a location and date or a date range, the sun's position at a moment, and the moon phase.
// When does the sun set in New York on the solstice?
curl "https://prod.api.market/api/v1/claimcheckai/sunrise-and-sunset/sun/v1/times?lat=40.7128&lon=-74.006&date=2026-12-21&zone=America/New_York" \
-H "x-api-market-key: $API_MARKET_KEY"{
"latitude": 40.7128,
"longitude": -74.006,
"zone": "America/New_York",
"date": "2026-12-21",
"sunrise": "2026-12-21T07:16:51-05:00",
"sunset": "2026-12-21T16:31:33-05:00",
"solar_noon": "2026-12-21T11:53:51-05:00",
"day_length_seconds": 33282,
"day_length": "09:14:42",
"civil_dawn": "2026-12-21T06:45:15-05:00",
"civil_dusk": "2026-12-21T17:03:08-05:00",
"nautical_dawn": "2026-12-21T06:10:55-05:00",
"nautical_dusk": "2026-12-21T17:37:28-05:00",
"astronomical_dawn": "2026-12-21T05:37:37-05:00",
"astronomical_dusk": "2026-12-21T18:10:46-05:00",
"evening_golden_hour": {
"start": "2026-12-21T15:48:58-05:00",
"end": "2026-12-21T16:51:29-05:00"
},
"condition": null,
"moon": {
"age_days": 11.16,
"phase": "waxing gibbous",
"illumination_percent": 90
}
}Endpoints
Sunrise, sunset and twilight for one day
latqueryrequiredlonqueryrequireddatequeryYYYY-MM-DD. Defaults to today in the chosen zone.
zonequeryIANA time zone for the returned times, for example Europe/London.
Sunrise and sunset for up to 366 days
latqueryrequiredlonqueryrequiredstartqueryrequireddaysqueryzonequeryIANA time zone for the returned times, for example Europe/London.
Where the sun is in the sky
latqueryrequiredlonqueryrequiredtimequeryISO 8601 time. Without an offset it is read in the chosen zone. Defaults to now.
zonequeryIANA time zone for the returned times, for example Europe/London.
Moon phase for a date
datequeryYYYY-MM-DD. Defaults to today (UTC).
Data and limits
source
Calculated locally with the astral library.
Answers from bundled data or local computation. No upstream call.
limits
- Accurate to about a minute; terrain and weather are not considered.
- Polar day and night return nulls.
Plans
Monthly, in US dollars. Each plan stops at its quota, with no overage charges. Subscribe and pay on api.market.
| plan | price | calls / month | per 1k calls | |
|---|---|---|---|---|
| Free trial | Free | 100, once, for 7 days | — | start free on api.market ↗ |
| Basic | $2.50 | 10,000 | $0.25 | subscribe on api.market ↗ |
| Pro | $9.50 | 100,000 | $0.095 | subscribe on api.market ↗ |
| Ultra | $21 | 500,000 | $0.042 | subscribe on api.market ↗ |