Hamro Patro APIhamropatro.com ↗
Access Bikram Sambat calendar data via the Hamro Patro API: daily panchanga, tithi, festivals, holidays, and Gregorian conversions for any BS date.
What is the Hamro Patro API?
The Hamro Patro API exposes Nepali Bikram Sambat calendar data across 2 endpoints, returning fields covering tithi, nakshatra, yoga, karana, rashi, sunrise, sunset, moonrise, moonset, and event listings in both Nepali and English. The get_calendar_month endpoint retrieves every day in a BS month with panchanga and festival data, while get_date returns the full astronomical and event detail for a single day.
curl -X GET 'https://api.parse.bot/scraper/bf2f2b4c-3015-46dc-8956-964cbba6c0d4/get_calendar_month?year=2083&month=4' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace hamropatro-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: hamropatro SDK — bounded, re-runnable; every call capped."""
from parse_apis.hamropatro_com_api import HamroPatro, DateNotFound
client = HamroPatro()
# Fetch a full calendar month and inspect its days.
month = client.calendar_months.get(year="2083", month="4")
print(month.month_name_en, month.days_in_month)
for day in month.days[:3]:
print(day.day_bs, day.tithi, day.is_holiday)
# Drill-down: get a specific date with panchanga details.
try:
date = client.date_infos.get(year="2083", month="4", day="1")
print(date.year_ad, date.month_ad, date.day_ad)
print(date.panchanga.sunrise, date.panchanga.sunset)
for event in date.events:
print(event.title_en, event.is_holiday)
except DateNotFound as e:
print("date not found:", e.day)
print("exercised: calendar_months.get, date_infos.get")
Retrieve all days in a Nepali (Bikram Sambat) calendar month with their corresponding Gregorian dates, tithi, panchanga data, and events/festivals. Each day includes holiday status and any scheduled events with titles in Nepali and English. Results are auto-iterated over the days of the month.
| Param | Type | Description |
|---|---|---|
| yearrequired | string | 4-digit Bikram Sambat year (e.g. 2083). |
| monthrequired | string | Nepali month number, 1-12 (1=Baishakh, 2=Jestha, 3=Aashadha, 4=Shrawan, 5=Bhadra, 6=Ashwin, 7=Kartik, 8=Mangsir, 9=Poush, 10=Magh, 11=Falgun, 12=Chaitra). |
{
"type": "object",
"fields": {
"days": "array of day objects with date, panchanga, and event data",
"year_bs": "Bikram Sambat year",
"month_bs": "Nepali month number (1-12)",
"days_in_month": "Total number of days in the month",
"month_name_en": "Month name in English",
"month_name_np": "Month name in Nepali script"
},
"sample": {
"data": {
"days": [
{
"tithi": "तृतिया",
"day_ad": 17,
"day_bs": 1,
"events": [
{
"title_en": "Dakshinaayan Arambha",
"title_np": "दक्षिणायन आरम्भ",
"is_holiday": false
}
],
"year_ad": 2026,
"year_bs": 2083,
"is_today": false,
"month_ad": 7,
"month_bs": 4,
"panchanga": {
"yoga": 16,
"month": 2,
"rashi": 4,
"tithi": 2,
"karana": 4,
"paksha": 0,
"sunset": 68456,
"moonset": 76698,
"sunrise": 19134,
"moonrise": 29679,
"nakshtra": 9,
"monthType": 0,
"yogaEndTime": 83009,
"tithiEndTime": 24580,
"karanaEndTime": 24580,
"moonRashiEndTime": 41728,
"nakshatraEndTime": 68059
},
"is_holiday": false,
"day_of_week": 5,
"is_weekend_holiday": false
}
],
"year_bs": 2083,
"month_bs": 4,
"days_in_month": 31,
"month_name_en": "Shrawan",
"month_name_np": "साउन"
},
"status": "success"
}
}About the Hamro Patro API
Calendar Month Data
The get_calendar_month endpoint accepts a 4-digit Bikram Sambat year and a month number (1–12, where 1 = Baishakh and 12 = Chaitra). It returns an array of day objects covering the entire month, each carrying the Gregorian equivalent date, panchanga values, holiday status, and any events or festivals. The response also includes top-level fields: year_bs, month_bs, days_in_month, month_name_en, and month_name_np. Results are iterated over the days array automatically, making batch processing of a full month straightforward.
Single-Date Detail
The get_date endpoint accepts year, month, and day (1–32 range) in the Bikram Sambat system and returns a detailed record for that single date. The panchanga object includes nine astronomical fields: tithi, nakshatra, yoga, karana, rashi, paksha, sunrise, sunset, moonrise, and moonset. The events array lists each festival or observance on that day with title_np (Nepali script), title_en (English), and is_holiday boolean. Additional fields day_ad, month_ad, and year_ad give the corresponding Gregorian date, and is_today flags whether the requested date matches the current day.
Coverage and BS Calendar Specifics
The Bikram Sambat calendar runs roughly 56–57 years ahead of the Gregorian calendar and has months of variable length (typically 29–32 days), which is why the days_in_month field is explicitly included in get_calendar_month responses. Month numbering is fixed: Baishakh = 1 through Chaitra = 12. Event titles are provided in both scripts, which is useful for apps serving Nepali-speaking audiences domestically and in the diaspora.
The Hamro Patro API is a managed, monitored endpoint for hamropatro.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hamropatro.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official hamropatro.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display a full Nepali BS calendar UI showing holidays and festivals for any month using
get_calendar_month - Build a date-conversion tool that maps any Bikram Sambat date to its Gregorian equivalent via
day_ad,month_ad,year_ad - Show daily panchanga details — nakshatra, yoga, sunrise, moonrise — for astrology or ritual scheduling apps
- Alert users to upcoming Nepali public holidays by scanning
is_holidayflags across a month's day objects - Populate event calendars in Nepali-language apps using bilingual
title_npandtitle_enfestival fields - Determine the lunar phase (
paksha) and tithi for any given BS date for religious or agricultural planning
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Hamro Patro have an official developer API?+
What panchanga fields does `get_date` return, and are times localized?+
panchanga object includes tithi, nakshatra, yoga, karana, rashi, paksha, sunrise, sunset, moonrise, and moonset. Sunrise and sunset times reflect Nepal Standard Time (UTC+5:45), consistent with Hamro Patro's source data, which is computed for Nepal's geographic location.Does the API cover multiple years of historical or future BS dates?+
Can I retrieve a list of all public holidays in Nepal for a given year in a single call?+
get_calendar_month) or single-day level (get_date); there is no year-level endpoint that aggregates all holidays in one response. You can fork this API on Parse and revise it to add a year-iteration endpoint that collects is_holiday events across all 12 months.Does the API return event data in languages other than Nepali and English?+
title_np) and English (title_en). No other language translations are included in the response. You can fork the API on Parse and revise it to add a translation layer for additional languages.