hijri-api
Verified, auditable Hijri dates as static JSON.
Open Hijri calendar and prayer time data for Pakistan: a verified, auditable archive of sighted month starts with confidence levels, served as static JSON.
Pakistan has no machine-readable source for sighted Hijri month starts. Most calendars return a computed table with no provenance, so you cannot tell why a date differs from the announcement or how much to trust it.
hijri-api keeps a verified, auditable archive of the sighted starts with a calculated fallback, computes prayer times locally, and watches the news for each announcement so a human approves the update through a pull request. The repository is the data store, the build system and the API.
# Base URL: https://shaheeranser.github.io/hijri-api
GET /hijri/index.json # coverage, generation time, available years
GET /hijri/overrides.json # the confirmed month-start record, with sources
GET /hijri/calendar/<hijriYear>.json # Gregorian date → Hijri date + confidence
GET /prayer/<city>/<profile>/<year>.json # daily prayer timesEvery date carries its confidence
Every published Hijri date carries a confidence level; prayer times are calculated, not observed.
- confirmed — a verified start date exists in overrides.json.
- estimated — a past month with no verified entry, from the baseline.
- predicted — a future month, from the baseline.
- unconfirmed — the last day of a month, where the sighting decides whether a 30th day exists.
Where it runs
The JSON is the contract: dates are precomputed, so no astronomy library is needed at runtime and other languages can read the files directly. The site is published as static files on GitHub Pages, so the full history is diffable in git.
Cities: karachi, lahore, peshawar. Profiles: sunni_hanafi, sunni_asr1 (earlier Asr), shia_jafari.
Where this stands
The data is live as static files; the limits are part of the design rather than a temporary state.
- Built: a static JSON API on GitHub Pages, verified month-start overrides with sources, four confidence levels, and prayer times for three cities and three profiles.
- Calculated, not observed: prayer times come from a location and convention, not from an on-the-ground sighting or announcement.
- Human in the loop: a new month start only lands after a person approves the announcement through a pull request.
- Coverage is deliberately narrow: three cities and three profiles today; anything outside them is fallback data, not a verified entry.
- Hosting is GitHub Pages only — there is no separate uptime guarantee, and consumers read precomputed files rather than calling an astronomy service at runtime.
Read the data
The live API stays at shaheeranser.github.io/hijri-api; this page only links to it.