Sunrise and sunset API
Official MET Norway Sunrise 3.0 sunrise, sunset, and solar noon for a city or coordinates. Credit Data from MET Norway. POST /api/v1/weather/sunrise costs $0.002 USDC on Base via x402. HTTP 2xx with status complete or partial and real data is charged; status failed, empty payloads, and HTTP 4xx/5xx are not charged. Sources: MET Norway Locationforecast 2.0 and Sunrise 3.0 (CC BY 4.0) GeoNames cities dump (CC BY 4.0) US National Weather Service alerts API Limits: Not a severe-weather warning service or health diagnosis. Air quality is not included.
Official MET Norway Sunrise 3.0 sunrise, sunset, and solar noon for a city or coordinates. Credit Data from MET Norway. POST /api/v1/weather/sunrise costs $0.002 USDC on Base via x402. HTTP 2xx with status complete or partial and real data is charged; status failed, empty payloads, and HTTP 4xx/5xx are not charged. Sources: MET Norway Locationforecast 2.0 and Sunrise 3.0 (CC BY 4.0) GeoNames cities dump (CC BY 4.0) US National Weather Service alerts API Limits: Not a severe-weather warning service or health diagnosis. Air quality is not included.
/api/v1/weather/sunriseExample request
curl -i -X POST "https://www.brainiac.software/api/v1/weather/sunrise" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"city": "Oslo",
"countryCode": "NO",
"date": "2026-11-21"
}
JSONExample response
{
"status": "complete",
"location": {
"name": "Oslo",
"countryCode": "NO",
"latitude": 59.91,
"longitude": 10.75,
"timezone": "Europe/Oslo"
},
"date": "2026-11-21",
"sunrise": "2026-11-21T07:28:00+00:00",
"sunset": "2026-11-21T14:36:00+00:00",
"solarNoon": "2026-11-21T11:02:00+00:00",
"source": "MET Norway Sunrise 3.0",
"attribution": "Data from MET Norway",
"license": "CC BY 4.0",
"missing_items": []
}An unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.
Errors: HTTP 4xx/5xx are not charged. HTTP 2xx with status complete or partial and real data is charged; failed or empty results are not charged. Invalid cursor returns HTTP 400 (uncharged).
Limits: Not a severe-weather warning service or health diagnosis. Air quality is not included. When both city and coordinates are sent, coordinates win and city is not geocoded.
FAQ
- Do I need an API key? No. Pay the listed USDC amount with x402.
- What network? Base (eip155:8453), USDC.
- Is this an official determination? No. Results are for human review against the cited sources.
Related operations
- City weather report — $0.002 USDC
- US NWS weather alerts — $0.002 USDC
Related APIs
- Building Energy & Facilities Intelligence API
- Electricity Market & Grid Intelligence API
- Electrical Engineering & Installation Intelligence API
MET Norway City Weather Sunrise NWS Alerts API APIGroup docsHow it works