Astonomical Data (Sunrise, sunset, twilight, etc) avatar
Astonomical Data (Sunrise, sunset, twilight, etc)

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Astonomical Data (Sunrise, sunset, twilight, etc)

Astonomical Data (Sunrise, sunset, twilight, etc)

The Sun Data Scraper collects daily astronomical data for a given city. It gives sunrise, sunset, day length, solar noon, and various twilight times (civil, nautical, astronomical) which are ideal for solar planning, photography, research, and integration with various platfroms

Pricing

from $1.00 / 1,000 results

Rating

5.0

(3)

Developer

Acceleration

Acceleration

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

5

Monthly active users

5 days ago

Last modified

Categories

Share

Sun Scraper (TimeAndDate)

Overview

Sun Scraper scrapes sunrise, sunset, day length, twilight phases, and solar data from timeanddate.com for a given city, month, and year. The actor supports any month of any year and enriches the data with latitude and longitude


Features

  • Scrapes daily sun data for a full month
  • Supports any year and any month
  • extracts city & country from URL
  • Fetches latitude & longitude
  • Collects sunrise, sunset, twilight phases & solar noon
  • Supports bulk URL input

Input

Perfect! We can update the Input section of the Sun Scraper README to clearly explain both ways users can provide multiple URLs, just like your Weather Scraper. Here’s the revised section:


Input Methods

The Sun Scraper supports two ways to provide URLs:


Form Input (Default)

Users can manually add one or more TimeAndDate Sun URLs in the Start URLs field.

Example:

https://www.timeanddate.com/sun/algeria/constantine?month=3&year=2026
https://www.timeanddate.com/sun/uk/london?month=1&year=2025
  • Suitable for a small number of URLs.

  • Each URL must follow the format:

    https://www.timeanddate.com/sun/{country}/{city}?month={MM}&year={YYYY}

Text File Upload (Bulk URLs)

For scraping multiple cities, months, or years, users can either upload a text file containing the URLs or can add bulk urls too.

  • Each URL must be on a new line.
  • Only valid TimeAndDate Sun URLs are supported.

Example urls.txt file:

https://www.timeanddate.com/sun/germany/berlin?month=1&year=2026
https://www.timeanddate.com/sun/uk/london?month=1&year=2026
https://www.timeanddate.com/sun/india/new-delhi?month=1&year=2026
  • Ideal for bulk scraping or automated workflows.
  • Each URL will produce one month of daily sun data in the output dataset.

Output

Each dataset item represents one day of sun-related data for the selected month.

Example Output (Single Record)

{
"date": "2026-01-01",
"city": "berlin",
"country": "germany",
"latitude": 52.52437,
"longitude": 13.41053,
"sunrise": "8:17 am ↑ (129°)",
"sunset": "4:03 pm ↑ (232°)",
"day_length": "7:45:45",
"day_diff": "+1:09",
"astronomical_twilight_start": "6:10 am",
"astronomical_twilight_end": "6:09 pm",
"nautical_twilight_start": "6:51 am",
"nautical_twilight_end": "5:28 pm",
"civil_twilight_start": "7:36 am",
"civil_twilight_end": "4:44 pm",
"solar_noon": "12:10 pm (14.6°)",
"distance_mil_km": "91.405"
}

Sample Output Table (Rows)

DateCityCountryLatitudeLongitudeSunriseSunsetDay LengthDay DiffAstronomical Twilight StartAstronomical Twilight EndNautical Twilight StartNautical Twilight EndCivil Twilight StartCivil Twilight EndSolar NoonDistance (mil km)
2026-01-01BerlinGermany52.5243713.410538:17 am ↑ (129°)4:03 pm ↑ (232°)7:45:45+1:096:10 am6:09 pm6:51 am5:28 pm7:36 am4:44 pm12:10 pm (14.6°)91.405
2026-01-02BerlinGermany52.5243713.410538:17 am ↑ (128°)4:04 pm ↑ (232°)7:47:01+1:156:10 am6:10 pm6:51 am5:29 pm7:35 am4:45 pm12:10 pm (14.7°)91.404

Use Cases

  • Solar & daylight analysis
  • Renewable energy planning
  • Astronomy & research projects
  • Time-based analytics
  • Education & visualization tools