> 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/solar-eclipse.md).

# Solar Eclipse

Get accurate solar eclipse details — including date, time, type (total, partial, annular), and visibility status.

### 🧾 Overview – Track Solar Eclipses by Location

This API lets you find out when and how a solar eclipse will be visible from any given latitude and longitude. It’s ideal for educational apps, astronomy platforms, or event planning tools for skywatchers.

It’s useful for:

* Whether an eclipse is visible at that location
* The type of eclipse (Total, Annular, Partial)
* The start, peak, and end times of the eclipse

## 🚀 How to Get Solar Eclipse

To get Solar Eclipse, 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/eclipse/solar></kbd>

**Headers**

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

**Body**

| Name  | Type  | Example    | Description                       |
| ----- | ----- | ---------- | --------------------------------- |
| date  | Date  | 2025-04-12 | Returns eclipses after this 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": "Solar eclipse fetched successfully.",
    "code": 200,
    "type": "SUCCESS",
    "data": {
        "type": "Annular Solar",
        "date": "2026-02-17",
        "julian_day": "2461089.008264",
        "magnitude": "0.9638/0.9797/0.9288",
        "saros": "saros 121/61",
        "shadow_diameter": "131.078155 km",
        "path_width": "131.078155 km",
        "greatest_eclipse": {
            "utc": "2026-02-17 12:11:54",
            "local": "2026-02-17 17:41:54"
        },
        "phases": [
            {
                "phase": "Annular/Total Start",
                "time_utc": "2026-02-17 09:56:47",
                "time_local": "2026-02-17 15:26:47"
            },
            {
                "phase": "Greatest Eclipse",
                "time_utc": "2026-02-17 11:43:04",
                "time_local": "2026-02-17 17:13:04"
            },
            {
                "phase": "Annular/Total End",
                "time_utc": "2026-02-17 12:41:05",
                "time_local": "2026-02-17 18:11:05"
            },
            {
                "phase": "Partial End",
                "time_utc": "2026-02-17 14:27:40",
                "time_local": "2026-02-17 19:57:40"
            }
        ]
    },
    "input": {
        "lat": "25.0422777",
        "lon": "83.6078512",
        "tzone": "5.5"
    },
    "info": {
        "timestamp_utc": "2025-06-07 13:08:07",
        "version": "v1.0",
        "credits_used": 1,
        "response_time": 69.91
    }
}
```

{% 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 %}
