API v1

Astronomy & prayer data— one HTTP API

Ship Hijri, moon phases, Qibla, and precise prayer times with a single, well-documented surface—so your team spends time on product, not edge cases.

Designed for 99.9% uptime
Low-latency, cache-friendly
GET /v1/prayer
Request
curl -X GET "https://api.falakapi.com/v1/prayer?city=Mecca&country=SA" \\ -H "X-API-Key: YOUR_API_KEY"
Response
{
  "data": {
    "timings": {
      "Fajr": "04:52",
      "Dhuhr": "12:18",
      "Asr": "15:38",
      "Maghrib": "18:12",
      "Isha": "19:42"
    }
  }
}
50M+
Requests served / day
99.99%
Target uptime
<50ms
Typical API latency
12k+
Developers

One surface for the whole product

Consistent parameters, JSON shapes, and error codes across endpoints—so your client code stays boring in the best way.

Prayer times

Accurate times with 15+ methods (MWL, ISNA, Umm Al-Qura, and more), madhhab-aware Asr, and optional offsets.

Moon & lunation

Phase, illumination, age, and key dates—computed for the observer with sane timezone handling.

Hijri calendar

Gregorian↔Hijri conversion with Umm Al-Qura alignment and clear edge-case behavior.

Qibla

Bearing to the Kaaba from any coordinate—what you need for maps and compass UX.

Geo & time

Geocoding hints, reverse lookup, and timezone resolution so your clocks stay honest.

Webhooks

Push prayer and lunar events to your stack—less polling, fewer missed windows.

Try a request

The API uses coordinates (and a key in production). Pick an endpoint, send a request, and inspect the raw JSON.

  • Familiar JSON

    Predictable fields and error shapes across versions.

  • Keys via header

    Pass X-API-Key (or api_key as a query param).

Full reference

Requests run in your browser. Some deployments block cross-origin calls without a key—use curl or the docs “try it” if this fails.

{
  "data": { "timings": { "Fajr": "02:48" } },
  "status": "OK"
}

Build with a calendar you can trust

Get keys, read the reference, and ship—whether you are prototyping or running at scale.

Free tier includes 5,000 requests/month. No card required to start.