Sunrise, Sunset, Golden Hour & Moon Phase Scraper avatar

Sunrise, Sunset, Golden Hour & Moon Phase Scraper

Pricing

from $7.56 / 1,000 sun and moon results

Go to Apify Store
Sunrise, Sunset, Golden Hour & Moon Phase Scraper

Sunrise, Sunset, Golden Hour & Moon Phase Scraper

Get sunrise, sunset, solar noon, day length, all twilight phases, golden and blue hour windows and moon phase for any city or coordinates and date. Local time plus UTC. Export to JSON, CSV or Excel.

Pricing

from $7.56 / 1,000 sun and moon results

Rating

0.0

(0)

Developer

Scrapers Lat

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 hours ago

Last modified

Share

Sunrise, Sunset, Golden Hour & Moon Phase Scraper

Sunrise, Sunset, Golden Hour & Moon Phase Scraper

Here is one real result, with every field the actor returns:

{
"input": "Nairobi, Kenya",
"resolvedLocation": "Nairobi",
"country": "Kenya",
"admin1": "Nairobi County",
"latitude": -1.28333,
"longitude": 36.81667,
"timezone": "Africa/Nairobi",
"date": "2026-08-23",
"sunrise": "2026-08-23T06:31:57+03:00",
"sunriseUtc": "2026-08-23T03:31:57.000Z",
"sunset": "2026-08-23T18:38:50+03:00",
"sunsetUtc": "2026-08-23T15:38:50.000Z",
"solarNoon": "2026-08-23T12:35:24+03:00",
"solarNoonUtc": "2026-08-23T09:35:24.000Z",
"dayLength": "12:06:53",
"dayLengthHours": 12.1,
"civilDawn": "2026-08-23T06:11:57+03:00",
"civilDusk": "2026-08-23T18:58:51+03:00",
"nauticalDawn": "2026-08-23T05:47:28+03:00",
"nauticalDusk": "2026-08-23T19:23:19+03:00",
"astronomicalDawn": "2026-08-23T05:22:58+03:00",
"astronomicalDusk": "2026-08-23T19:47:49+03:00",
"morningGoldenHourStart": "2026-08-23T06:31:57+03:00",
"morningGoldenHourEnd": "2026-08-23T07:31:57+03:00",
"eveningGoldenHourStart": "2026-08-23T17:38:50+03:00",
"eveningGoldenHourEnd": "2026-08-23T18:38:50+03:00",
"morningBlueHourStart": "2026-08-23T06:11:57+03:00",
"morningBlueHourEnd": "2026-08-23T06:31:57+03:00",
"eveningBlueHourStart": "2026-08-23T18:38:50+03:00",
"eveningBlueHourEnd": "2026-08-23T18:58:51+03:00",
"moonPhaseName": "Waxing Gibbous",
"moonIlluminationPct": 79.4,
"moonAgeDays": 10.34,
"nextFullMoon": "2026-08-27",
"nextNewMoon": "2026-09-11",
"weekAhead": null,
"aiBestShootingWindow": null,
"aiGoldenHourTips": null,
"aiBlueHourTips": null,
"aiMoonPhotographyTips": null,
"aiOverallAdvice": null,
"source": "sunrise-sunset.org + computed astronomy",
"observedAt": "2026-08-23T12:38:45.405Z",
"error": null
}

The most complete sun and moon scraper available. It returns sunrise, sunset, solar noon and day length, all three twilight phases, the morning and evening golden and blue hour windows, and full moon phase data with the next full and new moon, for any city name or coordinate pair and any date, in local time and UTC.

📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples

Apify Coverage Output Billing

Table of contents

What it does

Give it a list of locations and a date. For each location the actor resolves the place to coordinates (you can pass a city name like Sydney, Australia or a latitude,longitude pair), fetches the sun times, computes the golden and blue hour windows and the moon phase, and writes one record with every field above. Every time is returned twice, once in the location's own timezone with the correct offset and once in UTC, so you never have to convert.

Twilight phases that do not occur on a given day (for example astronomical twilight during the polar summer) are returned as null rather than a bogus value. Moon phase, illumination, moon age and the next full and new moon are computed deterministically from the date, so they are consistent worldwide for the same day.

Why choose this

  • All twilight phases: civil, nautical and astronomical dawn and dusk, not just sunrise and sunset.
  • Golden and blue hour windows: morning and evening, with a start and end time each, ready for planning a shoot.
  • Full moon data: phase name, illumination percent, moon age in days, plus the next full moon and next new moon dates.
  • City names or coordinates: pass Reykjavik, Iceland or -1.28,36.82. Geocoding is built in and not charged.
  • Local time and UTC: every timestamp in both, with the correct timezone offset per location.
  • One run, many locations: loop over a whole list of cities in a single run.
  • Optional 7-day week ahead and optional AI photography tips as opt-in add-ons.

How we compare

CapabilityThis actorsunrise-sunset.org APIsunrisesunset.ioTypical Apify sun-times actor
Sunrise, sunset, solar noonYesYesYesYes
Civil, nautical, astronomical twilightYes (all three)YesPartialYes
Golden hour window (start and end)Yes (morning and evening)NoGolden hour onlySometimes
Blue hour window (start and end)Yes (morning and evening)NoNoRarely
Moon phase name and illuminationYesNoYesRarely
Next full moon and next new moon datesYesNoNoNo
City name input (geocoded)YesNo (coordinates only)No (coordinates only)Sometimes
Local time and UTC in one recordYesSingle timezoneSingle timezoneVaries
Many locations per runYesOne call per locationOne call per locationVaries
AI photography tips add-onYesNoNoNo

Most alternatives cover either the sun side or the moon side, in a single timezone, one location at a time. This actor unifies sun times, every twilight phase, both golden and blue hour windows, and full moon phase data with the next full and new moon, for a whole list of cities in one run, in local time and UTC.

Quickstart

Open the actor, paste this into the input, and press Run. It returns today's sun and moon data for three cities.

{
"locations": ["Reykjavik, Iceland", "Nairobi, Kenya", "Sydney, Australia"],
"date": "2026-08-23"
}

Leave date empty to use today (UTC). Every field except locations is optional.

Use cases

  • Photographers: plan a shoot around the exact golden and blue hour windows in local time for any city.
  • Outdoor, fishing and hunting: line up sunrise, sunset, twilight and moon phase for a trip date.
  • Weather and religious apps: feed daily sunrise, sunset, twilight and moon phase into an app for any location.
  • Astronomy and night photography: use moon illumination and the next new moon to find the darkest nights.
  • Solar and energy planning: use solar noon and day length across a set of sites.

Input reference

FieldTypeRequiredDefaultDescription
locationsarrayyes(none)One or more locations. Each item is a place name like Reykjavik, Iceland or Sydney (auto-geocoded), or a latitude,longitude pair like -33.87,151.21. One record is returned per location.
datestringnotoday (UTC)Calendar date as YYYY-MM-DD, for example 2026-08-23. Past and future dates are supported.
includeWeekAheadbooleannofalseAdd-on. Adds a 7-day table (sunrise, sunset, solar noon, day length, moon phase) for the next seven days per location. Billed only when returned. Paid Apify plans only.
aiPhotographyTipsbooleannofalseAdd-on. Adds AI-written photography guidance per location (best window, golden and blue hour tips, moon photography tips). Billed only when produced. Paid Apify plans only.
maxResultsintegerno10Maximum number of locations to return in one run. Free Apify plans are capped at 10.

Output reference

One dataset item per location. Times are ISO 8601 strings; fields are null when the value is absent (for example a twilight phase that does not occur that day).

FieldTypeDescription
inputstringThe location string you passed in.
resolvedLocationstringResolved place name from geocoding.
countrystringCountry of the resolved location.
admin1stringState or region of the resolved location.
latitudenumberLatitude used for the query.
longitudenumberLongitude used for the query.
timezonestringIANA timezone used for the local times.
datestringCalendar date the record is for (YYYY-MM-DD).
sunrise / sunriseUtcstringSunrise in local time and in UTC.
sunset / sunsetUtcstringSunset in local time and in UTC.
solarNoon / solarNoonUtcstringSolar noon (sun at its highest) in local time and UTC.
dayLengthstringLength of daylight as HH:MM:SS.
dayLengthHoursnumberLength of daylight in decimal hours.
civilDawn / civilDuskstringCivil twilight begin and end, local time (UTC variants also returned).
nauticalDawn / nauticalDuskstringNautical twilight begin and end, local time (UTC variants also returned).
astronomicalDawn / astronomicalDuskstringAstronomical twilight begin and end, local time. null during polar day or night (UTC variants also returned).
morningGoldenHourStart / morningGoldenHourEndstringMorning golden hour window (UTC variants also returned).
eveningGoldenHourStart / eveningGoldenHourEndstringEvening golden hour window (UTC variants also returned).
morningBlueHourStart / morningBlueHourEndstringMorning blue hour window, the civil dawn to sunrise band (UTC variants also returned).
eveningBlueHourStart / eveningBlueHourEndstringEvening blue hour window, the sunset to civil dusk band (UTC variants also returned).
moonPhaseNamestringMoon phase (New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, Waning Crescent).
moonIlluminationPctnumberPercent of the moon's disc illuminated (0 to 100).
moonAgeDaysnumberDays since the last new moon (0 to about 29.5).
nextFullMoonstringDate of the next full moon (YYYY-MM-DD).
nextNewMoonstringDate of the next new moon (YYYY-MM-DD).
weekAheadarray7-day table of sunrise, sunset, solar noon, day length and moon phase (week-ahead add-on), else null.
aiBestShootingWindowstringAI-suggested best shooting window (AI add-on), else null.
aiGoldenHourTipsstringAI golden hour shooting tips (AI add-on), else null.
aiBlueHourTipsstringAI blue hour shooting tips (AI add-on), else null.
aiMoonPhotographyTipsstringAI moon and night photography tips for the phase (AI add-on), else null.
aiOverallAdvicestringAI overall photography advice (AI add-on), else null.
sourcestringData source.
observedAtstringISO 8601 timestamp of when the record was produced.
errorstringnull on success. On a failed location, one item with a populated error is written instead.

Example output record

Real record from a live run, Sydney on 2026-08-23:

{
"input": "Sydney, Australia",
"resolvedLocation": "Sydney",
"country": "Australia",
"admin1": "New South Wales",
"latitude": -33.86785,
"longitude": 151.20732,
"timezone": "Australia/Sydney",
"date": "2026-08-23",
"sunrise": "2026-08-23T06:23:48+10:00",
"sunset": "2026-08-23T17:32:01+10:00",
"solarNoon": "2026-08-23T11:57:55+10:00",
"dayLength": "11:08:13",
"dayLengthHours": 11.1,
"civilDawn": "2026-08-23T05:59:42+10:00",
"civilDusk": "2026-08-23T17:56:08+10:00",
"astronomicalDawn": "2026-08-23T05:01:32+10:00",
"morningGoldenHourStart": "2026-08-23T06:23:48+10:00",
"morningGoldenHourEnd": "2026-08-23T07:23:48+10:00",
"eveningGoldenHourStart": "2026-08-23T16:32:01+10:00",
"eveningGoldenHourEnd": "2026-08-23T17:32:01+10:00",
"morningBlueHourStart": "2026-08-23T05:59:42+10:00",
"morningBlueHourEnd": "2026-08-23T06:23:48+10:00",
"moonPhaseName": "Waxing Gibbous",
"moonIlluminationPct": 79.4,
"moonAgeDays": 10.34,
"nextFullMoon": "2026-08-27",
"nextNewMoon": "2026-09-11",
"source": "sunrise-sunset.org + computed astronomy",
"error": null
}

Run via API and CLI

Run synchronously and get dataset items in one call. Replace <TOKEN> with your Apify API token.

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunrise-sunset-moon-phase-scraper/run-sync-get-dataset-items?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"locations":["Reykjavik, Iceland","Nairobi, Kenya","Sydney, Australia"],"date":"2026-08-23"}'

Start a run asynchronously:

curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~sunrise-sunset-moon-phase-scraper/runs?token=<TOKEN>" \
-H "Content-Type: application/json" \
-d '{"locations":["-33.87,151.21"],"date":"2026-12-21","includeWeekAhead":true}'

Apify CLI:

apify call scrapers_lat/sunrise-sunset-moon-phase-scraper \
--input '{"locations":["Paris, France"],"aiPhotographyTips":true}'

Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV, or Excel by changing format:

# JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"
# CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"

<DATASET_ID> is returned as defaultDatasetId in the run object.

Billing

  • Pay per result. You are charged per location returned (result event). See the pricing tab for the current price.
  • Opt-in add-ons. The 7-day week ahead (week_ahead) and AI photography tips (ai_photography_tips) are charged only when they actually return data, and only on paid Apify plans.
  • No charge on failure. A location that cannot be resolved is written as a single item with a populated error field and is not charged. Empty runs cost nothing.
  • Spend cap respected. Set maxTotalChargeUsd on the run; once reached, the actor stops emitting and charging further results.
  • Free Apify plans are capped at 10 locations per run, with add-ons disabled.

FAQ and troubleshooting

Can I pass a city name instead of coordinates? Yes. Pass Reykjavik, Iceland or just Sydney. The actor geocodes it, and geocoding is not charged. You can also pass a latitude,longitude pair.

Why is astronomicalDawn null for some locations? At high latitudes in summer the sun never drops far enough below the horizon for astronomical twilight, so the phase does not occur that day. The actor returns null rather than inventing a time.

Are times in local time or UTC? Both. Every timestamp is returned in the location's own timezone with the correct offset, and again as a ...Utc field in UTC.

How accurate is the moon phase? Moon phase, illumination and moon age are computed from a standard synodic-month model and are consistent worldwide for the same date. The next full and new moon dates are computed the same way.

What is the difference between golden hour and blue hour here? Golden hour is the warm hour just after sunrise and just before sunset. Blue hour is the cooler band during civil twilight, from civil dawn to sunrise in the morning and from sunset to civil dusk in the evening.

Is this an official tool? No. This actor is independent and has no affiliation with any data provider. It reads only publicly available data.

More scrapers at scrapers.lat

Built and maintained by scrapers.lat, where we publish scrapers for public platforms: registries, government data, finance, e-commerce and more. Browse the catalog or request a custom scraper at scrapers.lat.


Independent tool, not affiliated with any data provider. Accesses only publicly available astronomical data.