Sunrise sunset times
Sunrise sunset times. Computes sunrise, sunset, solar noon, day length (seconds), and civil / nautical / astronomical twilight begin & end for any latitude/longitude on any date. Also covers golden hour, dawn / dusk, and full astronomy-times. UTC ISO8601 strings. Wraps sunrise-sunset.org's public API — no auth, commercial-OK.
5000 (raw units)
price
1
calls / 30d
1
unique payers
2026-09-09
updated
Provider
x402.agentutility.ai · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x6c0752c09e7F6fA6526fCDf40e456a159ebB5621",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "FJqAJ4dXkFbrp3EEo8E9x98iaBGUQwaU8Srz5ePfUXLH",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "5000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"discoverable": true,
"info": {
"input": {
"body": {
"latitude": 37.7749,
"longitude": -122.4194
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"date": "2026-05-06",
"location": {
"lat": 37.7749,
"lon": -122.4194
},
"source": "https://api.sunrise-sunset.org/json",
"times": {
"astronomical_twilight_begin": "2026-05-06T11:28:14+00:00",
"astronomical_twilight_end": "2026-05-07T04:51:59+00:00",
"civil_twilight_begin": "2026-05-06T12:39:31+00:00",
"civil_twilight_end": "2026-05-07T03:40:42+00:00",
"day_length_seconds": 50568,
"nautical_twilight_begin": "2026-05-06T12:04:38+00:00",
"nautical_twilight_end": "2026-05-07T04:15:36+00:00",
"solar_noon": "2026-05-06T20:10:06+00:00",
"sunrise": "2026-05-06T13:08:42+00:00",
"sunset": "2026-05-07T03:11:30+00:00"
}
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"date": {
"description": "Date in YYYY-MM-DD. Defaults to today (UTC) if omitted.",
"type": "string"
},
"latitude": {
"description": "Decimal degrees, range [-90, 90]. Positive north.",
"type": "number"
},
"longitude": {
"description": "Decimal degrees, range [-180, 180]. Positive east.",
"type": "number"
}
},
"required": [
"latitude",
"longitude"
]
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"date": {
"type": "string"
},
"location": {
"properties": {
"lat": {
"type": "number"
},
"lon": {
"type": "number"
}
},
"type": "object"
},
"source": {
"type": "string"
},
"times": {
"properties": {
"astronomical_twilight_begin": {
"type": "string"
},
"astronomical_twilight_end": {
"type": "string"
},
"civil_twilight_begin": {
"type": "string"
},
"civil_twilight_end": {
"type": "string"
},
"day_length_seconds": {
"type": "integer"
},
"nautical_twilight_begin": {
"type": "string"
},
"nautical_twilight_end": {
"type": "string"
},
"solar_noon": {
"type": "string"
},
"sunrise": {
"type": "string"
},
"sunset": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"a": "bc_awpbwsy3"
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
}
}Use it
curl
curl "https://x402.agentutility.ai/astro-times" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://x402.agentutility.ai/astro-times");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://x402.agentutility.ai/astro-times")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/5219.json, and this resource appears in /discovery/resources and /discovery/search.