# Mayan Calendar API

> Mayan Calendar converts Gregorian dates to the ancient Mayan calendar system. Returns the Long Count, Tzolkin (260-day sacred calendar), and Haab (365-day civil calendar) dates.

**Endpoint:** `GET https://api.apiverve.com/v1/mayancalendar`  
**Category:** Reference Data  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/mayancalendar

## Overview

A Mayan calendar API that converts any Gregorian date into the Long Count, the 260-day Tzolkin and the 365-day Haab. Send a date such as 2024-12-21 and get back 13.0.12.3.3, 6 Akbal and 6 Kankin, each as a ready-to-display string. The conversion uses the GMT (Goodman-Martinez-Thompson) correlation constant, the standard alignment between the two calendars.

It suits educational content, historical research, and cultural applications: museum and classroom tools, a "your Mayan birthday" feature, date widgets for heritage sites, or puzzle and game content built around the baktun cycles.

The Free plan returns the Gregorian date and the formatted Long Count, Tzolkin and Haab strings. Paid plans break each of those into its numeric parts (baktun, katun, tun, winal and kin; the Tzolkin number and day name; the Haab day and month name) and add the combined Calendar Round and the day count since the Mayan creation date, which you need to do arithmetic on the dates yourself.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/mayancalendar?date=2024-12-21" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string | Yes | The Gregorian date in YYYY-MM-DD format. date |

## Response fields

- `gregorian` — string · The input Gregorian date in YYYY-MM-DD format
- `longCount` — object
  - `longCount.formatted` — string · Mayan Long Count formatted as baktun.katun.tun.winal.kin
  - `longCount.baktun` — number · Long Count baktun component (cycle of 400 tuns) · (premium)
  - `longCount.katun` — number · Long Count katun component (cycle of 20 tuns) · (premium)
  - `longCount.tun` — number · Long Count tun component (cycle of 18 winals) · (premium)
  - `longCount.winal` — number · Long Count winal component (cycle of 20 kins) · (premium)
  - `longCount.kin` — number · Long Count kin component (day unit in Mayan calendar) · (premium)
- `tzolkin` — object
  - `tzolkin.number` — number · Tzolkin sacred calendar day number (1-13) · (premium)
  - `tzolkin.dayName` — string · Tzolkin day name from 20-day Mayan sacred cycle · (premium)
  - `tzolkin.formatted` — string · Tzolkin date formatted as number and day name
- `haab` — object
  - `haab.day` — number · Haab civil calendar day number (0-19 or 0-4) · (premium)
  - `haab.monthName` — string · Haab month name from 18-month Mayan civil calendar · (premium)
  - `haab.formatted` — string · Haab date formatted as day and month name
- `calendarRound` — string · Calendar Round combining Tzolkin and Haab dates · (premium)
- `daysSinceEpoch` — number · Days since Mayan creation date (0.0.0.0.0) · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "gregorian": "2024-12-21",
    "longCount": {
      "formatted": "13.0.12.3.3",
      "baktun": 13,
      "katun": 0,
      "tun": 12,
      "winal": 3,
      "kin": 3
    },
    "tzolkin": {
      "number": 6,
      "dayName": "Akbal",
      "formatted": "6 Akbal"
    },
    "haab": {
      "day": 6,
      "monthName": "Kankin",
      "formatted": "6 Kankin"
    },
    "calendarRound": "6 Akbal 6 Kankin",
    "daysSinceEpoch": 1876383
  }
}
```

## Use cases

- **Educational Tools** — Teach about ancient Mesoamerican calendar systems
- **Cultural Applications** — Display Mayan dates for heritage and cultural apps
- **Historical Research** — Convert dates for archaeological and historical study
- **Novelty Apps** — Generate personalized Mayan birth dates

## SDKs

- **npm** — `npm install @apiverve/mayancalendar` (https://www.npmjs.com/package/@apiverve/mayancalendar)
- **NuGet** — `dotnet add package APIVerve.API.MayanCalendar` (https://www.nuget.org/packages/APIVerve.API.MayanCalendar)
- **Source** — https://github.com/apiverve/mayancalendar-api

## More

- Full reference: https://docs.apiverve.com/ref/mayancalendar
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
