Sunrise and sunset times API
Sunrise, sunset, solar noon, civil dawn and dusk (UTC) and day length for any place and date, computed with the standard solar equations; handles polar day and night. No outside service. Use for photography, events and outdoor planning.
When to use it
- Get sunrise, sunset and day length for any coordinates and date
- Plan outdoor work or photography
$0.001 per call with prepaid credits: $1 by card pays for 1,000 calls, with no account and no subscription.
Inputs
| Name | Type | Description |
|---|---|---|
lat (required) | number | Latitude (-90 to 90) |
lon (required) | number | Longitude (-180 to 180) |
date | string | Date (default today) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://glyphcall.com/sun?lat=59.33&lon=18.07"
Or one of your 3 free calls, no key:
curl "https://glyphcall.com/sun?lat=59.33&lon=18.07&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.
Live result
The real answer to the request above, read 2026-11-15 18:44 UTC and refreshed every 15 minutes.
{
"date": "2026-11-15",
"sunrise": "2026-11-15T06:40:53.173Z",
"sunset": "2026-11-15T14:23:53.199Z",
"solarNoon": "2026-11-15T10:32:23.186Z",
"civilDawn": "2026-11-15T05:53:18.733Z",
"civilDusk": "2026-11-15T15:11:27.638Z",
"dayLengthMinutes": 463,
"polar": null
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is sun, and the first 25 successful calls are free:
https://glyphcall.com/mcp
Questions
Is it computed or looked up?
Computed from the coordinates and date.
How do I pay?
Each successful call costs $0.01; failed calls are not charged. The first 3 calls are free (25 through an MCP client). Then pay with card credits (from $1; the key goes in an Authorization header or, for clients that can only fetch a URL, as api_key= in the URL) or per call in USDC over x402 or MPP. No account is needed.