API Reference

Try our APIs and explore the tech stack behind Ayat.

Overview

Ayat uses two external APIs: QuranEnc for verse text and translations, and EveryAyah for audio recitations. Both are free and do not require authentication.

QuranEnc API

Get verse text and translation from the Holy Quran.
GEThttps://quranenc.com/api/v1/translation/aya/{translation}/{surah}/{ayah}

Parameters

NameTypeDescription
translationstringe.g. english_saheeh, arabic_muyassar
surahnumber1–114
ayahnumberVerse number within surah

Response (200)

Get verse and translation200
{
  "result": {
    "id": "1",
    "sura": "1",
    "aya": "1",
    "arabic_text": "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ",
    "translation": "In the name of Allāh, the Entirely Merciful, the Especially Merciful.",
    "footnotes": "..."
  }
}

Error Response

QuranEnc Error400
{
  "error": "Invalid request",
  "message": "Translation or ayah not found. Check translation slug (e.g. english_saheeh) and ayah range (1–286 for Al-Baqarah)."
}

EveryAyah API

Get audio recitation for a verse.
GEThttps://everyayah.com/data/{subfolder}/{surah}{ayah}.mp3

Parameters

NameTypeDescription
subfolderstringReciter folder (e.g. Yasser_Ad-Dussary_128kbps)
surahstring3-digit padded (e.g. 001)
ayahstring3-digit padded (e.g. 001)

Response (200)

Get audio200
{
  "status": 200,
  "contentType": "audio/mpeg",
  "url": "https://everyayah.com/data/Yasser_Ad-Dussary_128kbps/001001.mp3",
  "note": "Returns MP3 audio file (binary). Use URL directly in <audio> or fetch."
}

Error Response

EveryAyah Error404
{
  "status": 404,
  "message": "Audio file not found. Verify subfolder (reciter) exists and surah/ayah are padded to 3 digits (e.g. 001001)."
}

Try It

Send a request and see the response.

Tech & Packages

Links to technologies used in Ayat.