Skip to content

Repository files navigation

Moon Phase API

Moon Phase API

Current moon phase with illumination, lunar age, zodiac sign, and degree, plus upcoming phases and a full lunar calendar. One key covers 12+ spiritual domains. MCP-first, no local setup required.

Get API KeyTry LiveMethodologyMCP ServerSDK

What is Moon Phase API

The RoxyAPI moon phase endpoint returns the current lunar phase with illumination percentage, lunar age in days since the new moon, the tropical zodiac sign the Moon occupies, its degree, and distance from Earth. Phase names cover the full lunar cycle from New Moon through Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, and Waning Crescent. Each call can also return a moon phase meaning with energy direction and keywords, ideal for moon tracking apps, lunar calendars, and astrology widgets. One RoxyAPI subscription covers 12+ spiritual domains, all positions powered by Roxy Ephemeris, verified against NASA JPL Horizons.

Why this API

PropertyValue
Coverage12+ spiritual domains in one subscription
CalculationRoxy Ephemeris, verified against NASA JPL Horizons
MCP serverhttps://roxyapi.com/mcp/astrology (Streamable HTTP, no local setup)
SDKsTypeScript on npm @roxyapi/sdk, Python on PyPI roxy-sdk, PHP on Packagist roxyapi/sdk, C# on NuGet RoxyApi.Sdk, Go github.com/RoxyAPI/sdk-go, WordPress plugin roxyapi
PricingOne key, flat per call, from $39/mo
LicensingPersonal and commercial use, including closed source apps. No AGPL or GPL entanglement. Full terms
Last verified2026-Q3

Quick start

  1. Get a key at roxyapi.com/pricing
  2. Pick a language below
  3. Copy the snippet, run, ship

cURL

# Current moon phase. Defaults to today at noon UTC.
curl -s "https://roxyapi.com/api/v2/astrology/moon-phase/current" \
-H "X-API-Key: $ROXY_API_KEY"# Specific date with a timezone offset for a localized lunar calendar day
curl -s "https://roxyapi.com/api/v2/astrology/moon-phase/current?date=2026-05-31&timezone=5.5" \
-H "X-API-Key: $ROXY_API_KEY"

Python

importosfromroxy_sdkimportcreate_roxyroxy=create_roxy(os.environ["ROXY_API_KEY"])
# Current moon phase. All query params optional, defaults to today at noon UTC.moon=roxy.astrology.get_current_moon_phase()
print(moon["phase"]) # Full Moonprint(moon["illumination"]) # 99.8print(moon["age"]) # 14.89print(moon["sign"]) # Sagittariusprint(moon["degree"]) # 11.54print(moon["meaning"]["keywords"]) # ['harvest', 'illumination', 'clarity', ...]

JavaScript (Node)

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY);// Current moon phase with illumination, lunar age, zodiac sign, and degreeconst{ data, error }=awaitroxy.astrology.getCurrentMoonPhase();if(error)thrownewError(error.error);console.log('Phase:',data.phase);// Full Moonconsole.log('Illumination:',data.illumination);// 99.8console.log('Lunar age:',data.age);// 14.89console.log('Sign:',data.sign);// Sagittariusconsole.log('Degree:',data.degree);// 11.54

TypeScript

import{createRoxy}from'@roxyapi/sdk';constroxy=createRoxy(process.env.ROXY_API_KEY!);// Moon phase: returns phase, illumination, age, sign, degree, distance, and phase meaningconst{ data, error }=awaitroxy.astrology.getCurrentMoonPhase({query: {date: '2026-05-31',timezone: 5.5},});if(error)thrownewError(error.error);console.log('Phase:',data.phase);console.log('Illumination:',data.illumination,'%');console.log('Lunar age:',data.age,'days');console.log('Sign:',data.sign);console.log('Keywords:',data.meaning?.keywords);

Request schema

All parameters are query string and optional.

FieldTypeRequiredDescription
datestring (query)noDate in YYYY-MM-DD format. Defaults to today if omitted.
timestring (query)noTime in 24-hour HH:MM:SS format. Defaults to 12:00:00 (noon). Moon moves ~13 degrees per day so time affects phase precision.
timezonenumber or string (query)noDecimal hours (e.g. 5.5 for IST, -5 for EST) OR IANA name (e.g. "Asia/Kolkata"). IANA resolved to the DST-correct offset for the given date. Defaults to 0 (UTC).
langstring (query)noInterpretation language. Supported: en, tr, de, es, hi, pt, fr, ru. Defaults to en.

Response shape

{
"date": "2026-05-31",
"phase": "Full Moon",
"illumination": 99.8,
"age": 14.89,
"sign": "Sagittarius",
"degree": 11.54,
"distance": 406195,
"meaning": {
"name": "Full Moon",
"symbol": "🌕",
"description": "The full moon is also known as the harvest moon, and as the name suggests, it is a time to receive the gifts of your past intentions and your current cycle. From this period, the moon will go from waxing to waning, signaling a journey to look inward instead of out. Emotions and awareness are heightened, and clarity about what serves you becomes undeniable.",
"keywords": ["harvest", "illumination", "clarity", "culmination", "celebration"],
"energy": "full",
"illumination": "100% (Fully Illuminated)"
}
}
FieldTypeDescription
datestringDate of this moon phase calculation (YYYY-MM-DD).
phasestringCurrent lunar phase name. One of: New Moon, Waxing Crescent Moon, First Quarter Moon, Waxing Gibbous Moon, Full Moon, Waning Gibbous Moon, Last Quarter Moon, Waning Crescent Moon.
illuminationnumberMoon illumination percentage (0-100). 0 = New Moon, 100 = Full Moon.
agenumberLunar age in days since the last New Moon. Full lunation cycle is ~29.53 days.
signstringTropical zodiac sign the Moon currently occupies.
degreenumberDegree of the Moon within its current zodiac sign (0-29.999).
distancenumberDistance from Earth to the Moon in kilometers.
meaningobjectMoon phase meaning and astrological interpretation. Includes energy direction, keywords, and guidance for this lunar phase. Optional.
meaning.namestringMoon phase display name.
meaning.symbolstringMoon phase emoji symbol.
meaning.descriptionstringAstrological interpretation of this lunar phase and its influence on activities, emotions, and intentions.
meaning.keywordsarrayKey themes and activities aligned with this moon phase.
meaning.energystringLunar energy direction: waxing (building), waning (releasing), new (beginning), or full (culmination).
meaning.illuminationstringIllumination range description for this phase.

Common use cases

Use caseEndpoint flow
Moon tracking app home screenGET /astrology/moon-phase/current, surface phase, illumination, and meaning.symbol
Lunar calendar for a content siteGET /astrology/moon-phase/calendar/{year}/{month} to render every day of the month
Full moon and new moon push remindersGET /astrology/moon-phase/upcoming overnight, schedule local-time delivery on transition dates
Gardening by moon phase toolGET /astrology/moon-phase/current, branch logic on energy (waxing vs waning)
Astrology widget with moon signGET /astrology/moon-phase/current, surface sign and degree for the Moon position

Related endpoints in this domain

  • GET /astrology/moon-phase/upcoming (getUpcomingMoonPhases) - next New Moon, First Quarter, Full Moon, and Last Quarter transition dates for lunar event calendars
  • GET /astrology/moon-phase/calendar/{year}/{month} (getMoonCalendar) - complete lunar calendar with phase and illumination for every day of a month
  • GET /astrology/horoscope/{sign}/daily (getDailyHoroscope) - daily transit forecast by zodiac sign with Moon sign, Moon phase, and energy rating

Use this in your AI agent

Connect Claude, GPT, Gemini, or Cursor to RoxyAPI through the remote MCP server. No Docker. No self hosting. The full MCP tool catalog for this domain is at https://roxyapi.com/mcp/astrology.

{
"mcpServers": {
"astrology": {
"url": "https://roxyapi.com/mcp/astrology",
"headers": { "X-API-Key": "$ROXY_API_KEY" }
}
}
}

See docs/mcp for Claude Desktop, Cursor, Windsurf, VS Code, and Claude Code setup.

For AI coding agents

This repo ships an AGENTS.md execution playbook. Cursor, Claude Code, Aider, Codex, Windsurf, RooCode, and Gemini CLI will pick it up automatically. Top level overview lives at roxyapi.com/AGENTS.md.

Resources

Other RoxyAPI samples

KP Astrology APIKundli APIDaily Horoscope APIPanchang APIBiorhythm API

License

MIT for this sample repo. See LICENSE.

Catalog licensing: Personal and commercial use, including closed source proprietary apps. No AGPL or GPL entanglement. RoxyAPI APIs and SDKs are safe to embed in commercial products. Full terms at roxyapi.com/policy/license.

Contact

About

Moon phase API. Current phase, illumination, age, sign, degree plus upcoming phases and calendar by year and month. RoxyAPI.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages