search

Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Moon Phase Calendar

The Moon Phase Calendar API returns a day-by-day lunar phase breakdown for a given month and location, along with exact timestamps when the Moon changes from one major phase to another. This is useful for astrology dashboards, planners, and lunar-cycle-based guidance.


Step by Step Moon Phase Calendar API Postman Testing Integration

https://support.divineapi.com/western-astrology-apis/testing-western-api-moon-phase-calendar-api-using-postman


Supported Language Codes

Support Article URL:
https://support.divineapi.com/general-api-support/translating-a-natal-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
ptPortuguese
frFrench
deGerman
jaJapanese
trTurkish
ruRussian
itItalian
esSpanish
nlDutch
plPolish

Guide: These languages are supported by this API. You can use them by passing lan in the body with the value of the language.


API Endpoint

POST https://astroapi-4.divineapi.com/western-api/v1/moon-phase-calendar

Returns Moon Phase Calendar in response.


Headers

NameTypeDescription
Authorization*StringYour API Access Token, e.g. Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour API key
month*IntegerMonth for which to fetch the calendar, e.g. 04
year*IntegerYear for which to fetch the calendar, e.g. 2025
place*StringPlace name, e.g. New Delhi
lat*FloatLatitude, e.g. 28.7041
lon*FloatLongitude, e.g. 77.1025
tzone*FloatTimezone, e.g. 5.5 (see Timezone List)
lanStringLanguage code, default: en

200: OK Moon Phase Calendar Fetched Successfully

{
    "success": 1,
    "data": {
        "month_phases": [
            {
                "date": "2025-04-01",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 32.6735,
                "moon_age": 2,
                "illumination": 4.46
            },
            {
                "date": "2025-04-02",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 46.5447,
                "moon_age": 3,
                "illumination": 9.85
            },
            {
                "date": "2025-04-03",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 60.0906,
                "moon_age": 4,
                "illumination": 17.04
            },
            {
                "date": "2025-04-04",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 73.2433,
                "moon_age": 5,
                "illumination": 25.73
            },
            {
                "date": "2025-04-05",
                "phase_no": 3,
                "phase_name": "First Quarter Moon",
                "phase_degree": 85.9783,
                "moon_age": 6,
                "illumination": 35.5
            },
            {
                "date": "2025-04-06",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 98.308,
                "moon_age": 7,
                "illumination": 45.94
            },
            {
                "date": "2025-04-07",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 110.2699,
                "moon_age": 8,
                "illumination": 56.55
            },
            {
                "date": "2025-04-08",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 121.9165,
                "moon_age": 9,
                "illumination": 66.87
            },
            {
                "date": "2025-04-09",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 133.3055,
                "moon_age": 10,
                "illumination": 76.43
            },
            {
                "date": "2025-04-10",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 144.4938,
                "moon_age": 11,
                "illumination": 84.8
            },
            {
                "date": "2025-04-11",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 155.5335,
                "moon_age": 12,
                "illumination": 91.59
            },
            {
                "date": "2025-04-12",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 166.4707,
                "moon_age": 13,
                "illumination": 96.52
            },
            {
                "date": "2025-04-13",
                "phase_no": 5,
                "phase_name": "Full Moon",
                "phase_degree": 177.3452,
                "moon_age": 14,
                "illumination": 100
            },
            {
                "date": "2025-04-14",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 188.1924,
                "moon_age": 15,
                "illumination": 99.94
            },
            {
                "date": "2025-04-15",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 199.0452,
                "moon_age": 16,
                "illumination": 98.28
            },
            {
                "date": "2025-04-16",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 209.937,
                "moon_age": 17,
                "illumination": 94.45
            },
            {
                "date": "2025-04-17",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 220.9043,
                "moon_age": 18,
                "illumination": 88.62
            },
            {
                "date": "2025-04-18",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 231.9892,
                "moon_age": 19,
                "illumination": 81.04
            },
            {
                "date": "2025-04-19",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 243.24,
                "moon_age": 20,
                "illumination": 72.06
            },
            {
                "date": "2025-04-20",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 254.7118,
                "moon_age": 21,
                "illumination": 62.09
            },
            {
                "date": "2025-04-21",
                "phase_no": 7,
                "phase_name": "Last Quarter Moon",
                "phase_degree": 266.4642,
                "moon_age": 22,
                "illumination": 51.57
            },
            {
                "date": "2025-04-22",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 278.5569,
                "moon_age": 23,
                "illumination": 40.98
            },
            {
                "date": "2025-04-23",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 291.043,
                "moon_age": 24,
                "illumination": 30.8
            },
            {
                "date": "2025-04-24",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 303.9585,
                "moon_age": 25,
                "illumination": 21.48
            },
            {
                "date": "2025-04-25",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 317.3106,
                "moon_age": 26,
                "illumination": 13.45
            },
            {
                "date": "2025-04-26",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 331.0647,
                "moon_age": 27,
                "illumination": 7.07
            },
            {
                "date": "2025-04-27",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 345.1364,
                "moon_age": 28,
                "illumination": 2.63
            },
            {
                "date": "2025-04-28",
                "phase_no": 1,
                "phase_name": "New Moon",
                "phase_degree": 359.3929,
                "moon_age": 0,
                "illumination": 0
            },
            {
                "date": "2025-04-29",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 13.6668,
                "moon_age": 1,
                "illumination": 1.13
            },
            {
                "date": "2025-04-30",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 27.7824,
                "moon_age": 2,
                "illumination": 4.46
            }
        ],
        "phases_change_list": [
            {
                "datetime": "2025-04-01 21:19:00",
                "phase_no": 2,
                "phase_name": "Waxing Crescent Moon",
                "phase_degree": 45
            },
            {
                "datetime": "2025-04-05 07:45:00",
                "phase_no": 3,
                "phase_name": "First Quarter Moon",
                "phase_degree": 90
            },
            {
                "datetime": "2025-04-09 03:37:00",
                "phase_no": 4,
                "phase_name": "Waxing Gibbous Moon",
                "phase_degree": 135
            },
            {
                "datetime": "2025-04-13 05:53:00",
                "phase_no": 5,
                "phase_name": "Full Moon",
                "phase_degree": 180
            },
            {
                "datetime": "2025-04-17 08:55:00",
                "phase_no": 6,
                "phase_name": "Waning Gibbous Moon",
                "phase_degree": 225
            },
            {
                "datetime": "2025-04-21 07:06:00",
                "phase_no": 7,
                "phase_name": "Last Quarter Moon",
                "phase_degree": 270
            },
            {
                "datetime": "2025-04-24 19:55:00",
                "phase_no": 8,
                "phase_name": "Waning Crescent Moon",
                "phase_degree": 315
            },
            {
                "datetime": "2025-04-28 01:02:00",
                "phase_no": 1,
                "phase_name": "New Moon",
                "phase_degree": 0
            }
        ]
    }
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-4.divineapi.com/western-api/v1/moon-phase-calendar' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="{Your API Key}"' \
--form 'month="05"' \
--form 'year="2023"' \
--form 'place="New Delhi, India"' \
--form 'lat="28.7041"' \
--form 'lon="77.1025"' \
--form 'tzone="5.5"'
--form 'lan="en"' 

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-4.divineapi.com/western-api/v1/moon-phase-calendar',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': '{Your API Key}',
    'month': '05',
    'year': '2023',
    'gender': 'male',
    'place': 'New Delhi, India',
    'lat': '28.7041',
    'lon': '77.1025',
    'tzone': '5.5'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});


JavaScript (jQuery AJAX)

var form = new FormData();
form.append("api_key", "{Your API Key}");
form.append("month", "05");
form.append("year", "2023");
form.append("place", "New Delhi, India");
form.append("lat", "28.7041");
form.append("lon", "77.1025");
form.append("tzone", "5.5");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-4.divineapi.com/western-api/v1/moon-phase-calendar",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-4.divineapi.com/western-api/v1/moon-phase-calendar"

payload = {'api_key': '{Your API Key}',
'full_name': 'Rahul Kumar',
'month': '05',
'year': '2023',
'place': 'New Delhi, India',
'lat': '28.7041',
'lon': '77.1025',
'tzone': '5.5',
'lan': 'en'}

headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)