# Hunting and Fishing Sun and Moon Times (Solunar) (`standardwork/hunting-fishing-sun-moon-times`) Actor

Sunrise, sunset, moonrise, moonset, moon phase and solunar periods for any spot, one row per day. Times shown in local time.

- **URL**: https://apify.com/standardwork/hunting-fishing-sun-moon-times.md
- **Developed by:** [Standard Work Co.](https://apify.com/standardwork) (community)
- **Categories:** Travel, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hunting and Fishing Sun and Moon Times

Informational only. Not for navigation, safety, emergency, financial, medical, or legal decisions. Check the official source before you rely on it.

Get sunrise, sunset, civil twilight, moonrise, moonset, moon overhead and underfoot, moon phase, and solunar major and minor periods for any spot, one row per day. Enter a latitude and longitude and how many days you want. The time zone is found for you.

### What you get (one row per day)

- Sunrise, sunset, civil dawn, civil dusk, solar noon, day length.
- Light start and light end: sunrise minus and sunset plus the minutes you choose (default 30). These are not legal shooting hours.
- Moonrise, moonset, moon overhead, moon underfoot, moon phase, percent lit, moon age.
- Solunar major periods (moon overhead and underfoot, plus or minus 1 hour) and minor periods (moonrise and moonset, plus or minus 30 minutes).
- Every time as ISO 8601 with the UTC offset, plus a plain local time like 7:03 AM.
- Self-check fields (qcStatus, qcNotes) and an error field. Days with no moonrise or moonset, and polar day or night, are noted, not dropped.

### How to use (no code)

1. Type your place name, latitude and longitude (right-click a spot in any map app to copy them).
2. Pick a start date (empty means today) and the number of days.
3. Click Start. Download the table as CSV, Excel or JSON, or schedule it.

### Accuracy

Times are computed from the JPL DE421 ephemeris with the open source Skyfield library. Rise and set times use the top edge of the sun or moon with standard refraction at sea level. In testing, sun times matched the U.S. Naval Observatory within 2 minutes and moon times within 3 minutes across Kentucky, Alaska (including polar night), Arizona, Maine (daylight saving change day) and Hawaii. Hills, trees and elevation change what you actually see.

### Disclaimer

Informational only. Not for navigation, safety, emergency, financial, medical, or legal decisions. Check the official source before you rely on it.
This is an independent tool by Standard Work Co. It is not affiliated with, endorsed by, or sponsored by any government agency named here. Agency names are used only to say where the data or method comes from.
Provided "as is" with no warranty of any kind, including accuracy, completeness, or timeliness. Liability is limited as stated in the Apify Standard Actor Contract for this tool.
Hunting: light start and light end are not legal shooting hours. Shooting hours, seasons and limits are set by your state wildlife agency; always follow its current regulations. Solunar periods are a traditional method and do not guarantee game or fish activity.

### Data sources and credits

- JPL planetary ephemeris DE421 (NASA Jet Propulsion Laboratory), read with the Skyfield library by Brandon Rhodes (MIT license).
- Time zone lookup: timezonefinder (MIT license), based on timezone-boundary-builder data.
- Checked against the U.S. Naval Observatory Astronomical Applications API during testing.

# Actor input Schema

## `locationName` (type: `string`):

A label for your spot, shown in every row. Optional.

## `latitude` (type: `number`):

Decimal degrees, north positive. Example: 39.96

## `longitude` (type: `number`):

Decimal degrees, east positive (US longitudes are negative). Example: -83.0

## `startDate` (type: `string`):

First date as YYYY-MM-DD. Leave empty for today in the place's time zone.

## `days` (type: `integer`):

How many days to return, 1 to 366. One row per day.

## `minutesBeforeSunrise` (type: `integer`):

Light start = sunrise minus this many minutes (0 to 120). This is not a legal shooting time; check your state's rules.

## `minutesAfterSunset` (type: `integer`):

Light end = sunset plus this many minutes (0 to 120). This is not a legal shooting time; check your state's rules.

## `timezone` (type: `string`):

IANA time zone such as America/Chicago. Leave empty to detect it from the coordinates.

## Actor input object example

```json
{
  "locationName": "Columbus, OH",
  "latitude": 39.96,
  "longitude": -83,
  "days": 7,
  "minutesBeforeSunrise": 30,
  "minutesAfterSunset": 30
}
```

# Actor output Schema

## `results` (type: `string`):

All rows in the default dataset.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("standardwork/hunting-fishing-sun-moon-times").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("standardwork/hunting-fishing-sun-moon-times").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call standardwork/hunting-fishing-sun-moon-times --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,standardwork/hunting-fishing-sun-moon-times"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Gk6H1wU5K5EikCrkX/builds/T5xsKxvZ10Yommw00/openapi.json
