Public API

Gurpurab API

Public API for Nanakshahi Calendar dates including Gurpurabs, historical days, and other significant events in Sikh history. This API currently powers Gurpurab.com and is maintained and supported by the same team.

Live No API key required Current Year Supported: Nanakshahi 558

Authentication

Requests are unauthenticated. Use the hosted base URL below and send standard HTTP GET requests.

https://api.gurpurab.com Base URL

Endpoints

GET /v1/today

Returns today's Gregorian date, Nanakshahi date, holidays, and next Gurpurab.

GET /v1/date/:date

Looks up a Gregorian date. Accepts today, tomorrow, yesterday, or YYYY-MM-DD.

GET /v1/ns/:year/:month/:day

Looks up a Nanakshahi date and resolves it to the matching Gregorian date.

GET /v1/holidays

Lists holidays for a Nanakshahi year, with optional filtering by holiday type, historical status, Gurpurab status, or the Guru.

GET /v1/holidays/upcoming

Returns upcoming holidays from a given date, filtered by the Guru.

GET /v1/meta

Returns API calendar coverage metadata, including the final loaded Gregorian date.

Parameters

Name Where Accepted values
date Path today, tomorrow, yesterday, or YYYY-MM-DD
year Path or query Nanakshahi year. Currently 558.
month, day Path Nanakshahi month and day numbers.
type Query historical, sangrand, puranmashi, massia, or Gurpurab types.
gurpurab, historical Query true to filter holiday lists.
guru Query 1 through 11. Use 1 for Sri Guru Nanak Dev Ji through 10 for Sri Guru Gobind Singh Ji; 11 is Sri Guru Granth Sahib Ji.

Response example

Gregorian date search for /v1/date/2026-11-24.

200 OK application/json
{
  "gregorian": "2026-11-24",
  "nanakshahi": {
    "day": 9,
    "month": 9,
    "monthName": {
      "en": "Maghar",
      "pa": "ਮੱਘਰ",
      "transliteration": "Maghar"
    },
    "year": 558,
    "yearLabel": "NS 558"
  },
  "holidays": [
    {
      "id": "guru-nanak-prakash",
      "type": "gurpurab_lunar",
      "isGurpurab": true,
      "importance": 1,
      "name": {
        "guru": {
          "number": 1,
          "en": "Sri Guru Nanak Dev Ji",
          "pa": "ਸ੍ਰੀ ਗੁਰੂ ਨਾਨਕ ਦੇਵ ਜੀ",
          "transliteration": "Sri Guru Nanak Dev Ji"
        },
        "gurpurab": {
          "en": "Prakash Gurpurab",
          "pa": "ਪ੍ਰਕਾਸ਼ ਗੁਰਪੁਰਬ",
          "transliteration": "Prakash Gurpurab"
        }
      },
      "significance": {
        "en": "Guru Nanak Dev Ji Prakash Gurpurab celebrates the birth of the founder of Sikhism, whose message of Ik Oankar, equality, seva, and truthful living shaped the Sikh Panth.",
        "pa": "ਗੁਰੂ ਨਾਨਕ ਦੇਵ ਜੀ ਪ੍ਰਕਾਸ਼ ਗੁਰਪੁਰਬ ਸਿੱਖ ਧਰਮ ਦੇ ਸੰਸਥਾਪਕ ਗੁਰੂ ਸਾਹਿਬ ਦੇ ਜਨਮ ਦੀ ਖੁਸ਼ੀ ਮਨਾਉਂਦਾ ਹੈ।"
      },
      "nanakshahi": {
        "day": 9,
        "month": 9,
        "monthName": {
          "en": "Maghar",
          "pa": "ਮੱਘਰ",
          "transliteration": "Maghar"
        },
        "year": 558
      }
    },
    {
      "id": "puranmashi-maghar",
      "type": "puranmashi",
      "isGurpurab": false,
      "importance": 3,
      "name": {
        "en": "Maghar Pooranmashi",
        "pa": "ਮੱਘਰ ਪੂਰਨਮਾਸ਼ੀ",
        "transliteration": "Maghar Pooranmashi"
      },
      "significance": {
        "en": "Maghar Pooranmashi marks the full moon observance for this Nanakshahi month.",
        "pa": "ਮੱਘਰ ਪੂਰਨਮਾਸ਼ੀ ਇਸ ਨਾਨਕਸ਼ਾਹੀ ਮਹੀਨੇ ਦੀ ਪੂਰਨਮਾਸ਼ੀ ਦਾ ਦਿਹਾੜਾ ਹੈ।"
      },
      "nanakshahi": {
        "day": 9,
        "month": 9,
        "monthName": {
          "en": "Maghar",
          "pa": "ਮੱਘਰ",
          "transliteration": "Maghar"
        },
        "year": 558
      }
    }
  ],
  "isGurpurabToday": true,
  "nextGurpurab": null
}

Guru-related holidays use name.guru and name.gurpurab. Historical holidays with a named person use name.person and name.event. Sangrand, Pooranmashi, Massia, and historical holidays without a person keep the flat localized name.

Metadata

Coverage metadata for /v1/meta.

200 OK application/json
{
  "calendar": {
    "loadedThrough": "2027-03-13"
  }
}

Data sources

Calendar data is sourced from the SGPC Jantri published each year. Only the current Nanakshahi year, NS 558, is available for now.

Changelog

API response field refinement

Structured holiday names and filtering by the Guru

  • Added Nanakshahi month names to holiday-level dates.
  • Structured Guru holiday names into guru and gurpurab objects.
  • Structured historical person events into person and event objects.
  • Added guru=1 through guru=11 filtering by the Guru for holiday lists and upcoming holidays.
Initial public API release

Nanakshahi 558 support

  • Added hosted endpoints for Gregorian date lookup, Nanakshahi date lookup, holiday lists, and upcoming holidays.
  • Added SGPC Jantri-sourced data for Nanakshahi 558.
  • Added English and Punjabi names plus one-line significance for returned holidays.
  • Published API reference docs at api.gurpurab.com.