Developer GuideNovember 20267 min read
Griha Pravesh Date Finder with the Vastu Muhurta API
Families planning a housewarming often ask for a short list of suitable dates. POST /api/v1/vastu/muhurta checks one date at one location for griha pravesh, using Swiss Ephemeris positions and rules cited from Muhurta Chintamani. This guide shows how to read the result and how to scan a range of dates.
The request
| Field | Required | Notes |
|---|---|---|
event_type | yes | griha_pravesh is live. bhoomi_puja, griha_arambha, vastu_puja and griha_pravesh_renovation return HTTP 501 for now. |
date | yes | DD/MM/YYYY or DD-MM-YYYY. |
lat, lon | yes | The location of the new home. |
tz | yes | UTC offset in hours, e.g. 5.5 for IST. |
ayanamsa | no | Default lahiri. All 12 ayanamsa values are accepted. |
lang | no | Default en. |
curl
curl -X POST https://vedintelastroapi.com/api/v1/vastu/muhurta \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"event_type":"griha_pravesh","date":"15/01/2027","lat":12.9716,"lon":77.5946,"tz":5.5}'Reading the response
Live response (trimmed)
"muhurta": {
"date": "15/01/2027",
"suitable": false,
"score": "4/4",
"tithi": "Saptami", "nakshatra": "Revati", "yoga": "Shiva", "vara": "Friday", "paksha": "Shukla Paksha",
"sunrise": { "utc": "01:15:37", "unix": 1799975737 },
"muhurta_windows": [],
"blockers": ["Lunar month Pausha not prescribed - MC 13.1-13.2"],
"day_blockers": ["Lunar month Pausha not prescribed - MC 13.1-13.2", "Movable lagna - MC 13.4", "Nakshatra not prescribed"],
"evaluation": "best_moment_no_window",
"rules_source": "Muhurta Chintamani 13.1-13.2 (months; soft and fixed nakshatras), 13.4 (...), 1.46-1.47 (...)",
"recommendation": "15/01/2027 is not recommended for Griha Pravesh. No muhurta window in the Hindu day ..."
}suitableis the answer to show first.scorecovers four factors only: tithi, nakshatra, yoga and weekday. A day can score 4/4 and still be unsuitable, as here, becauseblockerssuch as the lunar month or a movable lagna rule it out.muhurta_windowslists stretches of at least 5 minutes in the Hindu day (sunrise to next sunrise) where every rule holds. It is empty when there is none.evaluated_atandscore_basissay which moment the score refers to. Here it is 06:46 local time, the best moment of the day.day_blockerslists everything that fails at some point in the day.factorsgives the line-by-line reasoning.sunriseandsunsetare in UTC (utc) and as Unix time (unix). 01:15:37 UTC is 06:45:37 IST.rules_sourcenames the Muhurta Chintamani verses the checks come from. Show it in your UI.
Scanning a date range
The endpoint checks one date per call, so a 30-day scan costs 30 calls. Call sequentially or with low concurrency so you stay within your plan's rate limit, and cache results per date and location. They only change if the engine changes.
JavaScript
// Scan a range of dates one call at a time (each date is one API call).
const API = 'https://vedintelastroapi.com/api/v1/vastu/muhurta'
function ddmmyyyy(d) {
const p = (n) => String(n).padStart(2, '0')
return `${p(d.getUTCDate())}/${p(d.getUTCMonth() + 1)}/${d.getUTCFullYear()}`
}
export async function scanGrihaPravesh({ start, days, lat, lon, tz, apiKey }) {
const results = []
for (let i = 0; i < days; i++) {
const d = new Date(Date.UTC(start.y, start.m - 1, start.d + i))
const res = await fetch(API, {
method: 'POST',
headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json' },
body: JSON.stringify({ event_type: 'griha_pravesh', date: ddmmyyyy(d), lat, lon, tz }),
})
const json = await res.json()
if (json.status !== 200) throw new Error(`${json.error}: ${json.message}`)
const m = json.response.muhurta
results.push({
date: m.date,
suitable: m.suitable,
windows: m.muhurta_windows, // empty when no qualifying stretch exists
blockers: m.blockers,
recommendation: m.recommendation,
})
}
return results.filter(r => r.suitable)
}Presenting the results
- List suitable dates with their windows in the family's local time, not UTC.
- For dates that are close but unsuitable, show the first blocker in plain words ("Pausha month is not prescribed").
- Show the location used. Sunrise and the lagna, and so the result, depend on latitude and longitude.
- Remind users that important ceremonies are usually confirmed with a family priest or a qualified Jyotishi, who may also consider the householder's own chart.
The endpoint applies classical muhurta rules to astronomical positions. It does not promise any outcome from choosing a date.
Related
Check plot, Brahmasthan and entranceThe other checks clients ask for first.Vastu plot assessment guideWhere muhurta fits in a new-build project.Vastu API referenceAll 12 Vastu endpoints.
The muhurta endpoint is open on every plan, including the Free trial.