> For the complete documentation index, see [llms.txt](https://quantaapi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://quantaapi.gitbook.io/docs/geo-api/moon-phase.md).

# Moon Phase

Get the current moon phase or the moon phase for any specific date — including detailed info like illumination, phase name (e.g., Full Moon, Waxing Crescent), and moon age

### 🧾 Overview – Know the Moon’s Shape Today or Any Day

This API tells you the visible shape of the moon (phase) on a given date, anywhere in the world.

## 🚀 How to Get Moon Phase

To get Moon Phase, make a POST request to the following endpoint:

<kbd><mark style="color:green;">POST<mark style="color:green;"></kbd><kbd><https://geo.quantaapi.com/api/v1/moon-phase></kbd>

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name  | Type  | Example    | Description                       |
| ----- | ----- | ---------- | --------------------------------- |
| date  | Date  | 2025-04-12 | search by date                    |
| lat   | Float | 28.6138954 | Place Latitude                    |
| lon   | Float | 77.2090057 | Place Longitude                   |
| tzone | Float | 5.5        | Place timezone for the given date |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "message": "Moon phases fetched successfully.",
    "code": 200,
    "type": "SUCCESS",
    "data": {
        "date": "2025-04-12",
        "phase_no": 5,
        "phase_name": "Full Moon",
        "phase_degree": 168.9672,
        "moon_age": 13,
        "illumination": 100
    },
    "input": {
        "lat": "25.0422777",
        "lon": "83.6078512",
        "tzone": "5.5"
    },
    "info": {
        "timestamp_utc": "2025-06-07 13:16:42",
        "version": "v1.0",
        "credits_used": 1,
        "response_time": 1371.88
    }
}
```

{% endtab %}

{% tab title="401" %}

```json
{
    "status": "error",
    "message": "The provided authorization token is invalid or expired",
    "code": 401,
    "type": "AUTHORIZATION_INVALID"
}
```

{% endtab %}

{% tab title="422" %}

```json
{
    "status": "error",
    "message": "Validation Error",
    "code": 422,
    "type": "VALIDATION_ERROR",
    "errors": {
        "date": [
            "The date field is required."
        ],
        "lat": [
            "Latitude is required."
        ],
        "lon": [
            "Longitude is required."
        ],
        "tzone": [
            "Timezone is required."
        ]
    }
}
```

{% endtab %}
{% endtabs %}
