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.

Complete Quran dataset with TypeScript SDK — works offline with no server. Includes sharded JSON source, versioned REST + GraphQL API, 134 translations, word-by-word data, scholarly knowledge base, and SQL exports.

Offline SDK (npm)

getSurah(), getAyah(), searchAyahs() work immediately after npm install — no server, no network call. 4 editions bundled.

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

Full server-based SDK with typed methods for REST, GraphQL, 134 editions, 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.