# Quran API
> The Holy Quran as an API. Fetch any ayah (verse) by its surah:ayah reference — for example 2:255, the Ayat al-Kursi — returning both the original Arabic (Uthmani script) and a translation, along with the surah name, juz and page; read a full surah (chapter, 1 to 114) with every ayah in Arabic and translation; search the Quran for a word or phrase within a translation; and list the available translations (over 100, in English, French, Urdu, Indonesian, Turkish and many more languages). Live from the AlQuran Cloud API. Ideal for Quran reading and study apps, Islamic education and dawah tools, verse-of-the-day features and mosque or community websites. Open scripture data.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/quran-api/..."
```

## Pricing
- **Free** (Free) — 4,280 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 59,000 calls/Mo, 10 req/s
- **Pro** ($11/Mo) — 304,000 calls/Mo, 25 req/s
- **Mega** ($29/Mo) — 1,496,000 calls/Mo, 60 req/s

## Endpoints

### Quran

#### `GET /v1/ayah` — A verse (Arabic + translation)

**Parameters:**
- `ref` (query, required, string) — Reference surah:ayah, e.g. 2:255 Example: `2:255`
- `edition` (query, optional, string) — Translation edition (default en.asad)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quran-api/v1/ayah?ref=2%3A255"
```

**Response:**
```json
{
    "data": {
        "ayah": {
            "juz": 3,
            "page": 42,
            "sajda": false,
            "surah": {
                "name": "سُورَةُ البَقَرَةِ",
                "number": 2,
                "english_name": "Al-Baqara",
                "revelation_type": "Medinan",
                "english_translation": "The Cow"
            },
            "arabic": "ٱللَّهُ لَآ إِلَٰهَ إِلَّا هُوَ ٱلْحَىُّ ٱلْقَيُّومُ ۚ لَا تَأْخُذُهُۥ سِنَةٌۭ وَلَا نَوْمٌۭ ۚ لَّهُۥ مَا فِى ٱلسَّمَٰوَٰتِ وَمَا فِى ٱلْأَرْضِ ۗ مَن ذَا ٱلَّذِى يَشْفَعُ عِندَهُۥٓ إِلَّا بِإِذْنِهِۦ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۖ وَلَا يُحِيطُونَ بِشَىْءٍۢ مِّنْ عِلْمِهِۦٓ إِلَّا بِمَا شَآءَ ۚ وَسِعَ كُرْسِيُّهُ ٱلسَّمَٰوَٰتِ وَٱلْأَرْضَ ۖ وَلَا يَـُٔودُهُۥ حِفْظُهُمَا ۚ وَهُوَ ٱلْعَلِىُّ ٱلْعَظِيمُ",
            "edition": "Muhammad Asad",
            "reference": "2:255",
            "ayah_number": 255,
            "translation": "GOD - there is no deity save Him, the Ever-Living, the Self-Subsistent Fount of All Being. Neither slumber overtakes Him, nor sleep. His is all that is in the heaven
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/search` — Search the Quran

**Parameters:**
- `q` (query, required, string) — Search term Example: `mercy`
- `edition` (query, optional, string) — Translation to search (default en.asad)
- `limit` (query, optional, string) — Results (1-100, default 20)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quran-api/v1/search?q=mercy"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "query": "mercy",
        "total": 48,
        "results": [
            {
                "text": "IT IS lawful for you to go in unto your wives during the night preceding the [day's] fast: they are as a garment for you, and you are as a garment for them. God is aware that you would have deprived yourselves of this right, and so He has turned unto you in His mercy and removed this hardship from you. Now, then, you may lie with them skin to skin, and avail yourselves of that which God has ordained for you, and eat and drink until you can discern the white streak of dawn against the blackness of night, and then resume fasting until nightfall; but do not lie with them skin to skin when you are about to abide in meditation in houses of worship. These are the bounds set by God: do not, then, offend against them - [for] it is thus that God makes clear His messages unto mankind, so that they might remain conscious of Him.",
                "surah": "Al-Baqara",
                "reference": "2:187",
                "ayah_number": 187
            },
            {
                "text": "God does not burden any human being with more than he is well able to bear: in his favour shall be whatever good he does, and against him whatever evil he does. O our Sustainer! Take us not to task if we forget or unwittingly do wrong! \"O our Sustainer! Lay not upon us a burden such as Thou didst lay upon those who lived before us! O our Sustainer! Make us
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/surah` — A full chapter

**Parameters:**
- `number` (query, required, string) — Surah number (1-114) Example: `1`
- `edition` (query, optional, string) — Translation edition (default en.asad)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quran-api/v1/surah?number=1"
```

**Response:**
```json
{
    "data": {
        "surah": {
            "name": "سُورَةُ ٱلْفَاتِحَةِ",
            "ayahs": [
                {
                    "ayah": 1,
                    "arabic": "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ",
                    "translation": "In the name of God, The Most Gracious, The Dispenser of Grace:"
                },
                {
                    "ayah": 2,
                    "arabic": "ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِينَ",
                    "translation": "All praise is due to God alone, the Sustainer of all the worlds,"
                },
                {
                    "ayah": 3,
                    "arabic": "ٱلرَّحْمَٰنِ ٱلرَّحِيمِ",
                    "translation": "The Most Gracious, the Dispenser of Grace,"
                },
                {
                    "ayah": 4,
                    "arabic": "مَٰلِكِ يَوْمِ ٱلدِّينِ",
                    "translation": "Lord of the Day of Judgment!"
                },
                {
                    "ayah": 5,
                    "arabic": "إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ",
                    "translation": "Thee alone do we worship; and unto Thee alone do we turn for aid."
                },
                {
                    "ayah": 6,
                    "arabic": "ٱهْدِنَا ٱلصِّ
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Translations & structure

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quran-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "juz": 30,
        "note": "The Holy Quran. /v1/ayah = a verse by surah:ayah (e.g. 2:255) with Arabic + translation; /v1/surah = a full chapter (1-114); /v1/search = search a translation; pass edition= for a different translation (see translations list). Arabic is Uthmani script.",
        "ayahs": 6236,
        "source": "AlQuran Cloud API (api.alquran.cloud)",
        "surahs": 114,
        "endpoints": [
            "/v1/ayah",
            "/v1/surah",
            "/v1/search",
            "/v1/meta"
        ],
        "translations": [
            {
                "id": "az.mammadaliyev",
                "name": "Vasim Mammadaliyev and Ziya Bunyadov",
                "language": "az"
            },
            {
                "id": "az.musayev",
                "name": "Alikhan Musayev",
                "language": "az"
            },
            {
                "id": "bn.bengali",
                "name": "Muhiuddin Khan",
                "language": "bn"
            },
            {
                "id": "cs.hrbek",
                "name": "Preklad I. Hrbek",
                "language": "cs"
            },
            {
                "id": "cs.nykl",
                "name": "A. R. Nykl",
                "language": "cs"
            },
            {
                "id": "de.aburida",
                "name": "Abu Rida Muhammad ibn Ahmad ibn Rassoul",
                "language": "de"
            },
            {
                "id": "de.bube
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/quran-api
OpenAPI spec: https://www.oanor.com/api/quran-api/openapi.json
