# Sunrise, Sunset & Twilight Times Scraper (`parseforge/sunrise-sunset-times-scraper`) Actor

Pull sunrise, sunset, solar noon, day length, civil, nautical, astronomical twilight, and golden hour times for any coordinate worldwide. Works for any date past or future. Bulk-query multiple cities and dates in one run.

- **URL**: https://apify.com/parseforge/sunrise-sunset-times-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🌅 Sunrise, Sunset & Twilight Times Scraper

> 🚀 **Export solar event times for any coordinate, any date, anywhere on Earth.** Pull **sunrise, sunset, solar noon, day length, civil/nautical/astronomical twilight, and golden hour** in one call. Bulk-query thousands of cities and dates per run. No API key, no registration, no manual JSON wrangling.

> 🕒 **Last updated:** 2026-05-22 · **📊 21 fields** per record · **🌍 worldwide coverage** · **📅 any past or future date** · **🌗 polar day/night detection**

The **Sunrise Sunset Times Scraper** queries the Sunrise Sunset Times feed and returns **21 structured fields per record**, including the geodetic location, the date, all solar event times, day-length in seconds and human-readable form, both twilight bands, and golden-hour start and end. Polar-day and polar-night locations are detected and flagged automatically.

The output covers **every land and ocean coordinate, every date past or future, and every twilight band photographers and astronomers care about**. This Actor delivers the data as CSV, Excel, JSON, or XML in seconds. All computations happen server-side, so you skip ephemeris-math entirely.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Photographers, drone pilots, agriculture analysts, solar-energy modelers, astronomy hobbyists, outdoor activity apps, smart-lighting controllers | Golden-hour planning, dawn/dusk drone restrictions, panel-orientation modeling, sky-watching schedules, lighting-automation triggers |

---

### 📋 What the Sunrise Sunset Times Scraper does

Three workflows in a single run:

- 📍 **Per-coordinate solar event lookup.** Sunrise, sunset, solar noon for any latitude and longitude.
- 📅 **Multi-date bulk export.** Pass a list of dates to chart seasonal day-length curves.
- 🌗 **Twilight + golden-hour computation.** Civil, nautical, astronomical twilights plus golden hour morning end and golden hour evening begin.

Each record includes the location label, lat/lon, date, IANA timezone of the response, polar-condition flag, every solar event, and day length in seconds and human-readable form.

> 💡 **Why it matters:** sunrise and twilight times shape photography workflows, drone-flight legality, solar-panel modeling, and outdoor-event scheduling. Computing them locally requires an ephemeris library and careful UTC/local conversion. This Actor returns ready-to-use times in seconds.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>coordinates</code></td><td>object[]</td><td><code>[{"name":"New York City","lat":40.7128,"lng":-74.0060}]</code></td><td>List of locations. Each entry: <code>{ name, lat, lng }</code>. Name is optional.</td></tr>
<tr><td><code>dates</code></td><td>string[]</td><td><code>[]</code></td><td>List of <code>YYYY-MM-DD</code> dates. Empty = today (UTC).</td></tr>
<tr><td><code>timeFormat</code></td><td>string</td><td><code>"iso"</code></td><td><code>iso</code> (ISO 8601 UTC) or <code>human</code> (12-hour readable).</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
</tbody>
</table>

**Example: golden-hour times for a New York wedding shoot.**

```json
{
    "coordinates": [{ "name": "Central Park", "lat": 40.7829, "lng": -73.9654 }],
    "dates": ["2026-06-21"],
    "timeFormat": "iso"
}
````

**Example: solstice day-length curve across five cities.**

```json
{
    "coordinates": [
        { "name": "Reykjavik", "lat": 64.1466, "lng": -21.9426 },
        { "name": "Oslo", "lat": 59.9139, "lng": 10.7522 },
        { "name": "Tokyo", "lat": 35.6762, "lng": 139.6503 },
        { "name": "Nairobi", "lat": -1.2921, "lng": 36.8219 },
        { "name": "Sydney", "lat": -33.8688, "lng": 151.2093 }
    ],
    "dates": ["2026-06-21", "2026-12-21"]
}
```

> ⚠️ **Good to Know:** at very high latitudes the sun may never rise or set on a given date. The `polarCondition` field flags `polar_day` or `polar_night` so downstream code can render UI states correctly instead of showing null timestamps.

***

### 📊 Output

Each solar-times record contains **21 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🏷️ `name` | string | `"New York City"` |
| 📍 `latitude` | number | `40.7128` |
| 📍 `longitude` | number | `-74.006` |
| 📅 `date` | string | `"2026-06-21"` |
| 🌐 `timezone` | string | `"UTC"` |
| 🌗 `polarCondition` | string | null | `"normal"` |
| 🌅 `sunrise` | ISO 8601 | `"2026-06-21T09:25:00.000Z"` |
| 🌇 `sunset` | ISO 8601 | `"2026-06-22T00:31:00.000Z"` |
| ☀️ `solarNoon` | ISO 8601 | `"2026-06-21T16:58:00.000Z"` |
| ⏱️ `dayLengthSeconds` | number | `54360` |
| ⏰ `dayLengthHuman` | string | `"15h 6m"` |
| 🌄 `civilTwilightBegin` | ISO 8601 | `"2026-06-21T08:52:00.000Z"` |
| 🌆 `civilTwilightEnd` | ISO 8601 | `"2026-06-22T01:04:00.000Z"` |
| ⛵ `nauticalTwilightBegin` | ISO 8601 | `"2026-06-21T08:08:00.000Z"` |
| ⛵ `nauticalTwilightEnd` | ISO 8601 | `"2026-06-22T01:48:00.000Z"` |
| 🔭 `astronomicalTwilightBegin` | ISO 8601 | `"2026-06-21T07:14:00.000Z"` |
| 🔭 `astronomicalTwilightEnd` | ISO 8601 | `"2026-06-22T02:42:00.000Z"` |
| 📸 `goldenHourMorningEnd` | ISO 8601 | `"2026-06-21T09:55:00.000Z"` |
| 📸 `goldenHourEveningBegin` | ISO 8601 | `"2026-06-22T00:01:00.000Z"` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>🌇 Summer-solstice golden hour in Central Park</strong></summary>

```json
{
    "name": "Central Park",
    "latitude": 40.7829,
    "longitude": -73.9654,
    "date": "2026-06-21",
    "timezone": "UTC",
    "polarCondition": "normal",
    "sunrise": "2026-06-21T09:25:00.000Z",
    "sunset": "2026-06-22T00:31:00.000Z",
    "solarNoon": "2026-06-21T16:58:00.000Z",
    "dayLengthSeconds": 54360,
    "dayLengthHuman": "15h 6m",
    "civilTwilightBegin": "2026-06-21T08:52:00.000Z",
    "civilTwilightEnd": "2026-06-22T01:04:00.000Z",
    "goldenHourMorningEnd": "2026-06-21T09:55:00.000Z",
    "goldenHourEveningBegin": "2026-06-22T00:01:00.000Z",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🌑 Polar night in Longyearbyen, Svalbard</strong></summary>

```json
{
    "name": "Longyearbyen",
    "latitude": 78.2232,
    "longitude": 15.6267,
    "date": "2026-12-21",
    "timezone": "UTC",
    "polarCondition": "polar_night",
    "sunrise": null,
    "sunset": null,
    "solarNoon": "2026-12-21T11:01:00.000Z",
    "dayLengthSeconds": 0,
    "dayLengthHuman": "0h 0m",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>☀️ Equator equinox in Quito</strong></summary>

```json
{
    "name": "Quito",
    "latitude": -0.1807,
    "longitude": -78.4678,
    "date": "2026-03-20",
    "timezone": "UTC",
    "polarCondition": "normal",
    "sunrise": "2026-03-20T11:24:00.000Z",
    "sunset": "2026-03-20T23:30:00.000Z",
    "dayLengthSeconds": 43560,
    "dayLengthHuman": "12h 6m",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🌍 | **Worldwide coverage.** Any latitude, any longitude, any date past or future. |
| 📸 | **Golden hour built in.** Morning end and evening begin computed server-side. |
| 🌗 | **Polar handling.** `polar_day` and `polar_night` flagged automatically. |
| ⚡ | **Fast.** 10 lookups in under 5 seconds, 10,000 in under a minute. |
| 📅 | **Bulk dates.** Pass a list and chart seasonal day-length curves with one run. |
| 🔁 | **Always fresh.** Every run computes against current astronomical algorithms. |
| 🚫 | **No authentication.** Public data, no login or token required. |

> 📊 Accurate solar event times underpin every photo workflow, drone-flight plan, lighting automation, and outdoor activity app on the planet.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Sunrise Sunset Times Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **Worldwide, any date** | **Per run** | coordinates, dates, format | ⚡ 2 min |
| Local ephemeris library | Free | Worldwide | Code-driven | Custom | 🐢 Days |
| Weather services with sunrise field | Free / $50+/month | Limited cities, today only | Daily | Few | ⏳ Hours |
| Photography golden-hour widgets | Free | Single location | Per click | Few | 🕒 Variable |

Pick this Actor when you want clean structured rows for many places and many dates at once.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Sunrise Sunset Times Scraper page on the Apify Store.
3. 🎯 **Set input.** Provide your coordinates and dates, choose ISO or human time format.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **2-4 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 📸 Photography & Cinema

- Golden-hour bookings for wedding photographers
- Blue-hour planning for cinematographers
- Location-scouting reports across multiple dates
- Client deliverable PDFs with solar event tables

</td>
<td width="50%" valign="top">

#### 🚁 Drone & Aviation

- Civil-twilight cutoff for night-flight regulations
- Crew-rest scheduling based on local sunrise
- Inspection-window planning by sun angle
- Aerial-photography golden-hour bookings

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🌾 Agriculture & Solar Energy

- Panel-orientation modeling by season
- Greenhouse light-cycle scheduling
- Field-irrigation timing
- Yield-prediction models that include day length

</td>
<td width="50%" valign="top">

#### 🏠 Smart Lighting & IoT

- Sunset-triggered outdoor light automation
- Tunable-white indoor lighting calibration
- HOA street-light scheduling
- Smart-blind closure triggers

</td>
</tr>
</table>

***

### 🔌 Automating Sunrise Sunset Times Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Daily refreshes keep tomorrow's sunrise table populated automatically.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same solar event records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Day-length datasets for chronobiology studies
- Solar-elevation inputs for archaeoastronomy
- Reproducible photoperiod experiments
- Climatology coursework on insolation patterns

</td>
<td width="50%">

#### 🎨 Personal and creative

- Personal sunrise alarm clock automations
- Generative-art pieces driven by golden-hour times
- Travel-vlog scheduling
- Wedding-planning spreadsheets

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Religious observance calendars (fasting, prayer)
- Community lighting plans for safer streets
- Park-and-trail closing-time signage
- Open contributions to outdoor-activity apps

</td>
<td width="50%">

#### 🧪 Experimentation

- Train circadian-pattern ML models
- Validate sunrise-triggered IoT prototypes
- Prototype agent pipelines that act at twilight
- Test geospatial visualization libraries

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20Sunrise%20Sunset%20Times%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20Sunrise%20Sunset%20Times%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20Sunrise%20Sunset%20Times%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20Sunrise%20Sunset%20Times%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Provide a list of coordinates and dates, click Start, and the Actor computes solar event times for every coordinate-date pair and writes one row per result.

#### 📏 How accurate are the times?

Times are computed using the standard astronomical algorithms used by all major solar calculators and are accurate to within about a minute for any sea-level coordinate.

#### 🔁 Does it work for past dates?

Yes. Pass any historic date in `YYYY-MM-DD` form and the Actor returns the same fields as for future dates.

#### 🌗 What does `polarCondition` mean?

It flags whether the location experienced normal sunrise/sunset, a polar day (sun never sets), or a polar night (sun never rises) on the requested date.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor every day and keep tomorrow's sunrise table fresh.

#### ⚖️ Is this data legal to use?

Yes. Solar event times are derived from public astronomical algorithms and are free to use for any purpose.

#### 💼 Can I use this data commercially?

Yes. The data is in the public domain. You remain responsible for downstream compliance in your own product.

#### 💳 Do I need a paid Apify plan?

No. The free plan is enough for testing and small runs (10 records per run). A paid plan unlocks scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails?

Apify retries transient errors automatically. Inspect the log in the Runs tab, adjust the input, and re-run. Partial datasets are preserved.

#### 🌅 Why is `sunrise` an ISO 8601 UTC timestamp?

UTC is unambiguous and easy to convert to any local timezone downstream. Switch `timeFormat` to `human` if you prefer 12-hour readable strings.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or the Tally form linked below.

***

### 🔌 Integrate with any app

Sunrise Sunset Times Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get golden-hour reminders in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe solar event data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh sunrise times into your smart-lighting controller, or alert your team in Slack at civil twilight.

***

### 🔗 Recommended Actors

- [**🌦️ NOAA Weather Scraper**](https://apify.com/parseforge/noaa-weather-scraper) - U.S. weather forecasts and observations
- [**🛰️ ISS Live Position Scraper**](https://apify.com/parseforge/iss-current-location-scraper) - Live position of the ISS
- [**🗺️ Nominatim OSM Scraper**](https://apify.com/parseforge/nominatim-osm-scraper) - Geocode addresses via OpenStreetMap
- [**✈️ OurAirports Scraper**](https://apify.com/parseforge/ourairports-scraper) - Global airport directory
- [**📮 Postal Code Lookup Scraper**](https://apify.com/parseforge/zippopotam-postal-lookup-scraper) - Postal code to lat/lon resolution

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the Sunrise Sunset Times project or any third-party astronomical service. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.

# Actor input Schema

## `coordinates` (type: `array`):

Array of locations to query. Each entry: { "name": "label", "lat": 40.7128, "lng": -74.0060 }. The name is optional. Defaults to a single New York City coordinate.

## `dates` (type: `array`):

Array of dates in YYYY-MM-DD format. Leave empty to use today (UTC).

## `timeFormat` (type: `string`):

ISO 8601 UTC timestamps (recommended) or human-readable strings.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## Actor input object example

```json
{
  "coordinates": [
    {
      "name": "New York City",
      "lat": 40.7128,
      "lng": -74.006
    }
  ],
  "dates": [],
  "timeFormat": "iso",
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "coordinates": [
        {
            "name": "New York City",
            "lat": 40.7128,
            "lng": -74.006
        }
    ],
    "dates": [],
    "timeFormat": "iso",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/sunrise-sunset-times-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "coordinates": [{
            "name": "New York City",
            "lat": 40.7128,
            "lng": -74.006,
        }],
    "dates": [],
    "timeFormat": "iso",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/sunrise-sunset-times-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "coordinates": [
    {
      "name": "New York City",
      "lat": 40.7128,
      "lng": -74.006
    }
  ],
  "dates": [],
  "timeFormat": "iso",
  "maxItems": 10
}' |
apify call parseforge/sunrise-sunset-times-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/sunrise-sunset-times-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sunrise, Sunset & Twilight Times Scraper",
        "description": "Pull sunrise, sunset, solar noon, day length, civil, nautical, astronomical twilight, and golden hour times for any coordinate worldwide. Works for any date past or future. Bulk-query multiple cities and dates in one run.",
        "version": "1.0",
        "x-build-id": "IllimiCyvxG6JgUgE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~sunrise-sunset-times-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-sunrise-sunset-times-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~sunrise-sunset-times-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-sunrise-sunset-times-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~sunrise-sunset-times-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-sunrise-sunset-times-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "coordinates": {
                        "title": "Coordinates",
                        "type": "array",
                        "description": "Array of locations to query. Each entry: { \"name\": \"label\", \"lat\": 40.7128, \"lng\": -74.0060 }. The name is optional. Defaults to a single New York City coordinate."
                    },
                    "dates": {
                        "title": "Dates",
                        "type": "array",
                        "description": "Array of dates in YYYY-MM-DD format. Leave empty to use today (UTC).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "timeFormat": {
                        "title": "Time Format",
                        "enum": [
                            "iso",
                            "human"
                        ],
                        "type": "string",
                        "description": "ISO 8601 UTC timestamps (recommended) or human-readable strings."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
