Check out the new design
QuranEnc.com API specs

Endpoints:


Available translations

GET / https://quranenc.com/api/v1/translations/list/[[{language}]]/?localization={language_iso_code}
description: get the available translations

Parameters:
language: Optional, if ommited the endpoint will return all available translations, used to filter the translations by a specific language (by its iso code), here is a list of the available languages
localization: (query param) Optional defaults to "en" (English localization), used to localize the translations' titles and descriptions in the specified language (by its iso code), here is a list of the available locales

Returns:
json object containing array of objects, each object contains the translation's "key", "language_iso_code", "version", "last_update" (timestamp), "title" and "description" (in the specified localization).

examples:
https://quranenc.com/api/v1/translations/list
https://quranenc.com/api/v1/translations/list/es (lists the available Spanish translations, with titles and discriptions in default localization "English")
https://quranenc.com/api/v1/translations/list/es?localization=es (lists available Spanish translations, with titles and descriptions localized in Spanish)


Sura translation

GET / https://quranenc.com/api/v1/translation/sura/{translation_key}/{sura_number}
description: get the specified translation (by its translation_key) for the speicified sura (by its number)

Parameters:
translation_key: (the key of the currently selected translation)
sura_number: [1-114] (Sura number in the mosshaf which should be between 1 and 114)

Returns:
json object containing array of objects, each object contains the "sura", "aya", "translation" and "footnotes".

example:
https://quranenc.com/api/v1/translation/sura/english_saheeh/1


Aya translation

GET / https://quranenc.com/api/v1/translation/aya/{translation_key}/{sura_number}/{aya_number}
description: get the specified translation (by its translation_key) for the speicified aya (by its number sura_number and aya_number)

Parameters:
translation_key: (the key of the currently selected translation)
sura_number: [1-114] (Sura number in the mosshaf which should be between 1 and 114)
aya_number: [1-...] (Aya number in the sura)

Returns:
json object containing the "sura", "aya", "translation" and "footnotes".

example:
https://quranenc.com/api/v1/translation/aya/english_saheeh/1/1


Add a note

POST / https://quranenc.com/api/v1/translations/note
description: submit a note for a specific Aya translation

Request body:
Accepts either JSON or form data.
translation_key*: Translation key (string)
sura*: Sura number [1-114]
aya*: Aya number [1-…]
note*: Note content (string)
suggested_translation: Optional, alternative suggested translation for the Aya
name: Optional author name
email: Optional author email
* Required parameters

Returns:
201: { "status":1 }
400: { "status":0, "error":"Missing required parameters" }
500: { "status":0, "error":"Failed to save note" }

example (JSON):

{
    "translation_key":"english_saheeh",
    "sura":1,
    "aya":7,
    "note":"This is my note",
    "name":"Mostafa",
    "email":"[email protected]"
}

example (form data):

translation_key=english_saheeh
sura=1
aya=7
note=This is my note
name=Mostafa
[email protected]