API Documentation
All endpoints are available at https://api.anycalendar.io/api/v1. Click "Try it" to run a request live and see the response.
/calendarsReturns every calendar system the API supports, with its ID and display name.
List all calendars
curl "https://api.anycalendar.io/api/v1/calendars"/nowReturns today's date and time in every supported calendar. Optionally pass a timezone; defaults to UTC.
Now in UTC
curl "https://api.anycalendar.io/api/v1/now"Now in a specific timezone
curl "https://api.anycalendar.io/api/v1/now?timezone=Asia/Tehran"/now/{calendar_id}Returns today's date and time in one specific calendar system.
Now in Persian calendar
curl "https://api.anycalendar.io/api/v1/now/persian?timezone=Asia/Tehran"/convertConverts a date from one calendar system to another, or to all calendars if no target is specified.
Gregorian to Persian
curl -X POST "https://api.anycalendar.io/api/v1/convert" \
-H "Content-Type: application/json" \
-d '{
"dates": [
{
"calendar": "gregorian",
"components": {
"year": 2025,
"month": 3,
"day": 21
}
}
],
"targets": [
"persian"
]
}'Gregorian to all calendars
curl -X POST "https://api.anycalendar.io/api/v1/convert" \
-H "Content-Type: application/json" \
-d '{
"dates": [
{
"calendar": "gregorian",
"components": {
"year": 2025,
"month": 3,
"day": 21
}
}
],
"targets": [
"all"
]
}'/convert/rangeConverts a range of consecutive dates from one calendar to another or to all calendars.
A week of dates
curl -X POST "https://api.anycalendar.io/api/v1/convert/range" \
-H "Content-Type: application/json" \
-d '{
"start": {
"calendar": "gregorian",
"components": {
"year": 2025,
"month": 3,
"day": 21
}
},
"end": {
"calendar": "gregorian",
"components": {
"year": 2025,
"month": 3,
"day": 27
}
},
"step_days": 1,
"targets": [
"persian"
]
}'/monthReturns all days in a calendar month with conversions to target calendars. Useful for rendering calendar grids. Year and month default to the current month if omitted.
Persian Esfand 1404 to Gregorian
curl -X POST "https://api.anycalendar.io/api/v1/month" \
-H "Content-Type: application/json" \
-d '{
"calendar": "persian",
"year": 1404,
"month": 12,
"targets": [
"gregorian"
]
}'Current month in Gregorian to all calendars
curl -X POST "https://api.anycalendar.io/api/v1/month" \
-H "Content-Type: application/json" \
-d '{
"calendar": "gregorian",
"targets": [
"all"
]
}'