# Easter & Computus API
> Computus and calendar maths as an API, computed locally and deterministically. The easter endpoint computes the date of Easter Sunday for any year — both the Western date, by the Anonymous Gregorian (Meeus/Jones/Butcher) algorithm, and the Orthodox date, by the Julian computus converted to the Gregorian calendar — with the month name and weekday; Easter is the first Sunday after the paschal full moon, so 2024 falls on 31 March in the West and 5 May for the Orthodox church, while in 2025 both coincide on 20 April. The movable-feasts endpoint returns the whole Easter-anchored cycle for a year as calendar dates — Ash Wednesday (−46 days), Palm Sunday (−7), Maundy Thursday (−3), Good Friday (−2), Ascension (+39), Pentecost (+49) and Corpus Christi (+60). The julian-day endpoint converts a Gregorian date to its Julian Day Number — the continuous day count astronomers use, where 2451545 is 1 January 2000 — and back, returning the weekday too. Years are in the Gregorian calendar. Everything is computed locally and deterministically, so it is instant and private. Ideal for calendar, scheduling, liturgical, church, holiday-planning and date-arithmetic app developers, movable-feast and Julian-day tools, and almanac software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the computus and Julian-day conversion; for general date arithmetic and time zones use a date-time API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/easter-api/..."
```

## Pricing
- **Free** (Free) — 7,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 70,000 calls/Mo, 6 req/s
- **Pro** ($11/Mo) — 310,000 calls/Mo, 15 req/s
- **Mega** ($34/Mo) — 1,650,000 calls/Mo, 40 req/s

## Endpoints

### Computus

#### `GET /v1/easter` — Western & Orthodox Easter

**Parameters:**
- `year` (query, required, string) — Year (Gregorian) Example: `2025`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/easter-api/v1/easter?year=2025"
```

**Response:**
```json
{
    "data": {
        "note": "Western Easter by the Anonymous Gregorian (Meeus/Jones/Butcher) computus; Orthodox Easter by the Julian computus converted to the Gregorian calendar. Easter is the first Sunday after the paschal full moon. 2024 → 31 March (West), 5 May (Orthodox).",
        "inputs": {
            "year": 2025
        },
        "western": {
            "day": 20,
            "date": "2025-04-20",
            "month": "April",
            "weekday": "Sunday"
        },
        "orthodox": {
            "day": 20,
            "date": "2025-04-20",
            "month": "April",
            "weekday": "Sunday"
        }
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:21.689Z",
        "request_id": "1c44bb6a-97c2-4468-b9ba-cdc189df0539"
    },
    "status": "ok",
    "message": "Easter dates",
    "success": true
}
```

#### `GET /v1/julian-day` — Julian Day Number ↔ date

**Parameters:**
- `year` (query, optional, string) — Year Example: `2000`
- `month` (query, optional, string) — Month (1-12) Example: `1`
- `day` (query, optional, string) — Day (1-31) Example: `1`
- `jdn` (query, optional, string) — Or a JDN to convert back

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/easter-api/v1/julian-day?year=2000&month=1&day=1"
```

**Response:**
```json
{
    "data": {
        "jdn": 2451545,
        "note": "Gregorian date → Julian Day Number, the continuous count of days since 1 January 4713 BC (Julian). Useful for date arithmetic across calendars.",
        "inputs": {
            "day": 1,
            "year": 2000,
            "month": 1
        },
        "weekday": "Saturday"
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:21.805Z",
        "request_id": "715ba4cb-9002-4008-af76-90b473fe1553"
    },
    "status": "ok",
    "message": "Julian Day Number",
    "success": true
}
```

#### `GET /v1/movable-feasts` — Easter-relative feasts

**Parameters:**
- `year` (query, required, string) — Year (Gregorian) Example: `2025`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/easter-api/v1/movable-feasts?year=2025"
```

**Response:**
```json
{
    "data": {
        "note": "Western movable feasts as offsets from Easter Sunday: Ash Wednesday −46, Palm Sunday −7, Good Friday −2, Ascension +39, Pentecost +49, Corpus Christi +60.",
        "inputs": {
            "year": 2025
        },
        "ascension": "2025-05-29",
        "pentecost": "2025-06-08",
        "good_friday": "2025-04-18",
        "palm_sunday": "2025-04-13",
        "ash_wednesday": "2025-03-05",
        "easter_sunday": "2025-04-20",
        "corpus_christi": "2025-06-19",
        "maundy_thursday": "2025-04-17"
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:21.902Z",
        "request_id": "81e881f5-c6d5-4e60-a843-d210ac65277e"
    },
    "status": "ok",
    "message": "Movable feasts",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/easter-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "Years in the Gregorian calendar. The computus determines Easter from the paschal full moon; the JDN is calendar-independent. For general date arithmetic use a date-time API.",
        "service": "easter-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/easter": "Western and Orthodox Easter dates for a year.",
            "GET /v1/julian-day": "Convert a Gregorian date to a Julian Day Number, or back.",
            "GET /v1/movable-feasts": "Dates of the Easter-relative movable feasts for a year."
        },
        "description": "Computus & calendar: Easter Sunday (Western & Orthodox), Easter-relative movable feasts, and Julian Day Number ↔ Gregorian date."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:22.036Z",
        "request_id": "5fcc6b96-4423-422d-bf37-8b0f595ec31f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/easter-api
OpenAPI spec: https://www.oanor.com/api/easter-api/openapi.json
