Sunrise & Sunset Times API
Daylight times for any latitude and longitude on any list of dates: sunrise, sunset, solar noon, day length and civil, nautical and astronomical twilight, in UTC. Built for tour operators, photographers and event planners.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from sunrise-sunset.org/api
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/sunrise-sunset-times/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"latitude": "43.65",
"longitude": "-79.38",
"dates": [
"2026-12-21"
]
},
"max_items": 50
}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
14 fields: 13 here, 1 technical one under Technical details.
Basics
- Day length (seconds)
Length of daylight in seconds.
Example 32,150
Location
- Latitude
Latitude asked for.
Example 43.65
- Longitude
Longitude asked for.
Example -79.38
Dates
- Date
The day the times are for.
Example Dec 21, 2026
- Sunrise (UTC)
Example Dec 21, 2026
- Sunset (UTC)
Example Dec 21, 2026
- Solar noon (UTC)
Example Dec 21, 2026
- Civil twilight begin
Start of civil twilight (UTC).
Example Dec 21, 2026
- Civil twilight end
End of civil twilight (UTC).
Example Dec 21, 2026
- Nautical twilight begin
Start of nautical twilight (UTC).
Example Dec 21, 2026
- Nautical twilight end
End of nautical twilight (UTC).
Example Dec 21, 2026
- Astronomical twilight begin
Start of astronomical twilight (UTC).
Example Dec 21, 2026
- Astronomical twilight end
End of astronomical twilight (UTC).
Example Dec 21, 2026
Technical detailsField names and types for developers, and the 1 field hidden above
Hidden by default
This field comes with each record too. It is an internal code, a note about how the record was read or a copy of what was searched for, so the lists above leave it out.
- ID
idLatitude, longitude and date joined, unique for each record.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
id | text | ID (hidden) | 3 of 3 |
date | date | Date | 3 of 3 |
latitude | number | Latitude | 3 of 3 |
longitude | number | Longitude | 3 of 3 |
sunrise | date and time | Sunrise (UTC) | 3 of 3 |
sunset | date and time | Sunset (UTC) | 3 of 3 |
solar_noon | date and time | Solar noon (UTC) | 3 of 3 |
day_length_seconds | number | Day length (seconds) | 3 of 3 |
civil_twilight_begin | date and time | Civil twilight begin | 3 of 3 |
civil_twilight_end | date and time | Civil twilight end | 3 of 3 |
nautical_twilight_begin | date and time | Nautical twilight begin | 3 of 3 |
nautical_twilight_end | date and time | Nautical twilight end | 3 of 3 |
astronomical_twilight_begin | date and time | Astronomical twilight begin | 3 of 3 |
astronomical_twilight_end | date and time | Astronomical twilight end | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Day length (seconds) | Latitude | Longitude | Date | Sunrise (UTC) | Sunset (UTC) | Solar noon (UTC) | Civil twilight begin | Civil twilight end | Nautical twilight begin | Nautical twilight end | Astronomical twilight begin | Astronomical twilight end |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 32,150 | 43.65 | -79.38 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 | Dec 21, 2026 |
| 2 | 32,152 | 43.65 | -79.38 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 | Dec 22, 2026 |
| 3 | 32,158 | 43.65 | -79.38 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 | Dec 23, 2026 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- One request per date, so a long list of dates takes time: requests are spaced about 1 second apart.
- Times are returned in UTC (ISO 8601); the local time zone is carried in time_zone only as the name you asked for.
- In polar regions on days without a sunrise, sunset or twilight, those fields are empty.
- Data comes from sunrise-sunset.org, which asks that you show a visible attribution link to sunrise-sunset.org when you publish it.
- At most 366 dates per run.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.