# Moonrise Moonset API

> Moonrise Moonset calculates exact moonrise and moonset times for any geographic coordinate. It outputs ISO 8601 timestamps for lunar rise and set events, with paid plans adding moon phase details and date selection.

**Endpoint:** `GET https://api.apiverve.com/v1/moonrisemoonset`  
**Category:** Weather  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/moonrisemoonset

## Overview

Moonrise Moonset works by analyzing the location provided and getting the moonrise and moonset times. It uses advanced algorithms to calculate the moonrise and moonset times based on the location and returns the moonrise and moonset times.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/moonrisemoonset?lat=37.7749&lon=-122.4194&date=01-16-2026&local=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | number | Yes | The latitude of the location. range -90-90 |
| `lon` | number | Yes | The longitude of the location. range -180-180 |
| `date` | string | No | The date to get the moonrise and moonset times for (MM-dd-yyyy). date. Premium field |
| `local` | boolean | No | Also return the IANA timezone of the coordinates and moonrise/moonset as local ISO 8601 times. default false. timezone |

## Response fields

- `coordinates` — object
  - `coordinates.latitude` — number · Latitude coordinate of the specified location
  - `coordinates.longitude` — number · Longitude coordinate of the specified location
- `phase` — string · Current moon phase at specified time and location · (premium)
- `moonrise` — string · ISO 8601 timestamp when moon rises at location
- `moonset` — string · ISO 8601 timestamp when moon sets at location
- `moonAlwaysUp` — boolean · Indicates if moon is always above horizon · (premium)
- `moonAlwaysDown` — boolean · Indicates if moon is always below horizon · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "coordinates": {
      "latitude": 37.7749,
      "longitude": -122.4194
    },
    "phase": "Waning Crescent",
    "moonrise": "2025-12-16T12:24:41.532Z",
    "moonset": "2025-12-16T22:22:04.027Z",
    "moonAlwaysUp": false,
    "moonAlwaysDown": false
  }
}
```

## Use cases

- **Sea Turtle Nesting Patrols** — Conservation teams check local moonrise hours along beaches to deploy volunteer patrols during dark hours when sea turtles nest.
- **Milky Way Photo Shoots** — Landscape photographers check moonset timestamps to schedule camera exposures when lunar glare will not wash out faint constellations.
- **Night Drone Flight Authorization** — To assess ambient night visibility, drone operators look up moonrise timestamps before dispatching inspection flights across rural terrain.
- **Off-Grid Camp Setup** — When scheduling backcountry trail segments, hiking apps display moonset hours to warn backpackers before natural light disappears completely.

## SDKs

- **npm** — `npm install @apiverve/moonrisemoonset` (https://www.npmjs.com/package/@apiverve/moonrisemoonset)
- **PyPI** — `pip install apiverve-moonrisemoonset` (https://pypi.org/project/apiverve-moonrisemoonset/)
- **NuGet** — `dotnet add package APIVerve.API.MoonriseMoonset` (https://www.nuget.org/packages/APIVerve.API.MoonriseMoonset)
- **Source** — https://github.com/apiverve/moonrisemoonset-api

## More

- Full reference: https://docs.apiverve.com/ref/moonrisemoonset
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
