Anjal Islamic Library API

Anjal Islamic Library API

Versioned Islamic data infrastructure for building reliable year-round products: Quran, Hadith, Hijri, and Prayer Times.

Maintainer: Abdallah Nangere · founder@ramadanbot.app · +2348164135836

Production endpoint: https://islamiclibrary.anjalventures.com (HTTPS-only; HTTP returns 308 redirect).

API Version: v1 FastAPI SQLite + FTS5 Arabic + English Public Reuse Friendly

About

This API is a reusable backend for Islamic applications and research tools. It standardizes references, search, and date/prayer lookup.

  • Quran (Uthmani + English)
  • Hadith (10 collections)
  • Umm al-Qura Hijri conversion
  • Nigeria-complete prayer times

Coverage Summary

DatasetCoverageRowsPrimary Source
Quran114 Surahs, 6,236 Ayahs6,236AlQuran Cloud editions
HadithArabic+English merged collections36,512Hadith API open corpus
Hijri1343-01-01 AH to 1500-12-30 AH55,991Umm al-Qura table
Prayer TimesAll Nigeria entries + selected global cities836AlAdhan API snapshots

Quick Start

pip install -r requirements.txt
python scripts/build_db.py
uvicorn app.main:app --host 127.0.0.1 --port 8000

Base URL

/v1

Endpoint Matrix

DomainEndpointPurpose
MetaGET /v1/healthService health ping
MetaGET /v1/metaCounts and metadata
QuranGET /v1/quran/ayah/{surah}/{ayah}Direct ayah lookup
QuranGET /v1/quran/search?q=Full-text search
HadithGET /v1/hadith/{collection}/{hadith_number}Canonical hadith lookup
HadithGET /v1/hadith/search?q=Full-text search
HijriGET /v1/hijri/to-gregorianHijri to Gregorian
HijriGET /v1/hijri/from-gregorianGregorian to Hijri
PrayerGET /v1/prayer/countriesCountry list
PrayerGET /v1/prayer/cities?country=Cities by country
PrayerGET /v1/prayer/times?country=&city=Prayer times by location/date
PrayerGET /v1/prayer/search-city?q=City search helper

Request & Response Samples

GET /v1/quran/ayah/1/1
{"found":true,"data":{"surah_number":1,"ayah_number_in_surah":1}}
GET /v1/hijri/from-gregorian?date=2026-04-29
{"found":true,"hijri_iso":"1447-11-12"}
GET /v1/prayer/search-city?q=Lagos
{"query":"Lagos","count":2,"results":[{"city":"Lagos Island"}]}

Governance, Licensing, and Usage

  • License: see LICENSE in repository.
  • Attribution is recommended when redistributing transformed data.
  • For production clients, enforce API keys and rate limiting at gateway level.
  • Versioning policy: breaking changes move to next major path (e.g., /v2).
  • Support contact: founder@ramadanbot.app

Developer Resources