1. Services
  2. Calendars

Hijri calendar converter API

Convert a Gregorian date to the Hijri calendar and back, or list the months of a Hijri year with their start, end and length.

GET /v1/calendars/hijri1 creditAbout $0.001

Try it

GET/v1/calendars/hijri
curl 'https://api.apifor.dev/v1/calendars/hijri?date=2026-11-28&country=ID' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "country": "ID",
    "official_coverage": [
      "ID"
    ],
    "gregorian_date": "2026-11-28",
    "hijri": {
      "year": 1448,
      "month": 6,
      "day": 18,
      "month_name": "Jumada al-Akhirah",
      "formatted": "18 Jumada al-Akhirah 1448 AH",
      "local_month_name": "Jumadil Akhir"
    },
    "method": "official",
    "method_note": "Official government calendar for ID."
  },
  "meta": {
    "attribution": {
      "source": "Kalender Hijriah Indonesia, Kementerian Agama Republik Indonesia (Ministry of Religious Affairs)",
      "license": "Public domain (government calendar)",
      "license_url": "https://kemenag.go.id",
      "source_url": "https://bimasislam.kemenag.go.id",
      "attribution_page": "https://apifor.dev/sources",
      "notice": "Dates follow the published government calendar (MABIMS criteria). Final dates for Ramadan, Shawwal and Dhu al-Hijjah are set by the gover..."
    }
  }
}

A real response from our OpenAPI file, with long lists and strings shortened.

Endpoints and price

EndpointCreditsAbout
GET /v1/calendars/hijri1 credit$0.001
GET /v1/calendars/coverage (Free)Free$0

USD at Starter pack prices ($5 for 5,000 credits). Calls that fail before work starts are refunded.

Coverage today

Works for any country. Country-specific data: Bahrain, Indonesia, Kuwait, Oman, Qatar, Saudi Arabia and United Arab Emirates.

Leave country out to get every covered country, or pass one to narrow it.

Sources, row counts and country-only fields per country: GET /v1/calendars/coverage, free with your API key. How coverage works

Limits

  • Official government dates where we hold them. Everywhere else uses the tabular calendar.
  • The tabular calendar does not follow moon sighting and can be a day or two off.
  • Send only one of date, hijri or year.

Questions

How do I know which calendar answered?

method is official, tabular or mixed for a year that is partly covered.

Can official dates still change?

Yes. The start of Ramadan, Shawwal and Dhu al-Hijjah can move by a day after the sighting session.

Related services

All services