NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Mayan Calendar API

GET

Display the Mayan Long Count, Tzolkin, and Haab date for any day.

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.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/mayancalendar?date=2024-12-21
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "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
  }
}

About the Mayan Calendar API

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.

How it works

The date parameter is a Gregorian date in YYYY-MM-DD form. It is converted to a Julian Day Number using the proleptic Gregorian calendar, and the GMT correlation constant 584283 is subtracted to give daysSinceEpoch, the number of days since the Long Count date 0.0.0.0.0. Every other field is derived from that one integer.

longCount divides the day count by 144,000 for baktun, then 7,200 for katun, 360 for tun and 20 for winal, with the remainder as kin. formatted joins them with dots.

tzolkin counts forward from the epoch day 4 Ahau. number cycles 1 to 13 and dayName cycles through the 20 day names from Imix to Ahau, so the pair repeats every 260 days. haab counts forward from 8 Kumku: the year is 18 months of 20 days plus the 5-day Wayeb, so day runs 0 to 19 (0 to 4 in Wayeb) and monthName is one of the 19 month names. Names use the spellings shown in the response, such as Akbal and Kankin, not alternate orthographies.

calendarRound is the Tzolkin and Haab strings joined with a space; the same combination recurs every 52 Haab years. gregorian echoes the input, zero-padded.

On the Free plan the formatted strings and gregorian are returned, and the individual numeric and name fields, calendarRound and daysSinceEpoch are removed.

What people use it for

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

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Mayan Calendar

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Mayan Calendar API.

Read the docs →
Which Mayan calendar systems are supported?
The API converts Gregorian dates into three Mayan systems: the Long Count, the 260-day Tzolkin sacred calendar, and the 365-day Haab civil calendar. On paid plans, it also returns the combined Calendar Round and total days elapsed since the Mayan epoch.
What would 10,000 date conversions cost me?
A volume of 10,000 conversions takes 10,000 credits, which uses a twentieth of the Starter plan's 200,000 monthly credits. Usage on Starter works out to about $0.15 per 1,000 calls. The Free plan includes 200 calls per month for testing.
Are individual calendar cycle numbers included on the Free plan?
No. The Free plan provides formatted strings for the Long Count, Tzolkin, and Haab dates. Granular numeric components—such as baktun, katun, tun, winal, kin, sacred day numbers, month names, and the Calendar Round—are premium fields unlocked on Starter and above.
Which correlation method is used to align the calendars?
The API relies on the GMT (Goodman-Martinez-Thompson) correlation constant, the standard historical benchmark used by researchers to synchronize the Mayan Long Count with the Gregorian calendar.
What input format does the API expect?
Dates must be passed as Gregorian calendar strings in standard YYYY-MM-DD format. Providing other formats or invalid date values will fail to convert.
Can I use these date conversions in a commercial educational product?
Yes, commercial use is permitted on any paid plan. You can freely display the converted Mayan calendar data within your educational tools, games, or publications, provided you do not resell the raw API data directly.

Ready to build with Mayan Calendar? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs