Hosted API access is disabled on `al-quran-database.vercel.app` for now. Use the repository locally or self-host this project to run the API endpoints documented here.
Developer Platform

One Dataset.
Infinite Possibilities.

Sharded JSON source, versioned API contracts, verified npm SDK, and reproducible database exports for production apps, docs, and research tooling. The public hosted site is documentation-first right now; run the API locally or on your own hosting.

REST API v1

Stable `/api/v1/*` contracts for surahs, ayahs, search, divisions, and metadata in local or self-hosted deployments.

GraphQL API

Flexible query layer for multi-entity reads with GET debug support and POST app usage.

SDK Guide

ESM npm package with typed methods for REST, GraphQL, metadata, and research refs.

Database Exports

SQLite and PostgreSQL artifacts generated from committed JSON source of truth.

Quick Start

bash
npm install @faha1999/al-quran-database

import { QuranDevSDK } from '@faha1999/al-quran-database';

const quran = new QuranDevSDK({ baseUrl: 'http://localhost:3000' });
const data = await quran.getSurah(1, 'en.sahih');

GraphQL Power

graphql
query GetMetaAndAyah($id: Int!) {
  meta {
    dataset {
      counts {
        ayahs
      }
    }
  }
  ayah(id: $id, includeWords: true) {
    text
    knowledge {
      themes
    }
  }
}

Production Ready.

Built around `v1` contracts, cache headers, strict TypeScript, and deterministic JSON to SQL export pipeline.