Solar API
Sunrise, sunset, twilight, solar noon and day length for any coordinate and date.
/api/1/solarCurrent plan limits
Free includes Routing, Route Optimization, Geocoding (including reverse lookup and autocomplete) and Matrix APIs within plan limits. Map Matching, Isochrone, Truck Routing, Fuel Estimate and other separate APIs require a paid plan, including PAYG. API access follows the account’s effective plan; a positive balance alone does not override Free restrictions. Road Data and AI retain their separate Business requirements.
Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.
Current plans and pricingOverview
The Solar API returns sunrise, sunset, civil dawn and dusk, solar noon, golden hour and total day length for any coordinate and date. Pure astronomy — no map data — so it works everywhere. Ideal for solar planning, photography, agriculture and smart-home automation.
API reference
/api/1/solar| Parameter | Type | Status |
|---|---|---|
| point | string | Required |
| date | string | Optional |
Example request
Credit cost: 1 creditcurl "https://osrmroute.com/api/1/solar?point=40.4093,49.8671&date=2026-07-07" -H "Authorization: Bearer YOUR_KEY"