Sunrise Sunset

Sunrise Sunset

Data Access

Say goodbye to guesswork when planning your day. SunriseSunset.io provides you with accurate sunrise and sunset times.

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with Sunrise Sunset

πŸš€ Quick Start Examples

Sunrise Sunset Javascript Examplejavascript
// Sunrise Sunset API Example
const response = await fetch('https://sunrisesunset.io/api/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Planning your day has never been easier with SunriseSunset.io! Say goodbye to guesswork and rely on our accurate sunrise and sunset times. Our API is designed to provide you with precise information, ensuring that you can make the most out of your time.

Benefits of Using SunriseSunset.io API:

  1. Precision: Get accurate sunrise and sunset times for any location.
  2. Planning: Plan your activities with confidence, knowing the exact times of sunrise and sunset.
  3. Automation: Integrate our API seamlessly into your applications and automate the retrieval of sunrise and sunset data.
  4. Weather Insights: Enhance your weather-related applications by incorporating precise sunrise and sunset information.
  5. Global Coverage: Access sunrise and sunset times for locations around the world.

Example Code in JavaScript:

// Sample JavaScript code to use SunriseSunset.io API
const apiUrl = 'https://api.sunrisesunset.io/json?lat=38.907192&lng=-77.036873';
fetch(apiUrl)
  .then(response => response.json())
  .then(data => {
    const sunriseTime = data.results.sunrise;
    const sunsetTime = data.results.sunset;
    console.log(`Sunrise: ${sunriseTime}`);
    console.log(`Sunset: ${sunsetTime}`);
  })
  .catch(error => console.error('Error fetching sunrise and sunset data:', error));

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

May 31Jun 2Jun 4Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 2904008001440Minutes
Online
Offline

Related APIs in Data Access