Fetchs the quran ayah data. This will pull the single ayah only

Url: [http://api.globalquran.com/ayah/getAyah/quranID http://api.globalquran.com/ayah/getAyah/quranID]

attribute Value Description
getAyah surah:ayah number or verse number Identify here what page number you want to pull
quranID quran id list of quran id seperated by | (pipe)

Url Examples By:

  • Surah & Ayah:  [http://api.globalquran.com/ayah/114:6/quran-simple http://api.globalquran.com/ayah/114:6/quran-simple]
  • Verse Number:  [http://api.globalquran.com/ayah/6023/quran-simple http://api.globalquran.com/ayah/6023/quran-simple]

JSON Response:  [http://api.globalquran.com/ayah/10/quran-simple http://api.globalquran.com/ayah/10/quran-simple]

    "quran": {
        "quran-simple": {
            "10": {
                "surah": 2,
                "ayah": 3,
                "verse": "الَّذِينَ يُؤْمِنُونَ بِالْغَيْبِ وَيُقِيمُونَ الصَّلَاةَ وَمِمَّا رَزَقْنَاهُمْ يُنْفِقُونَ"


Example: Loads the verse number 10, which also can be wrote as 2:3

<!DOCTYPE html>
  <style>#demo-1{ color:lightBlue; }</style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <div id="demo-1">

$.ajaxSetup({ cache: true, jsonpCallback: 'quranData' }); // define ajax setup
$.getJSON("http://api.globalquran.com/ayah/10/quran-simple?jsoncallback=?", {
    format : "jsonp"
}, function(data)
    $.each(data.quran, function(i, by)
	$.each(by, function (verseNo, line) {
            $("<p>").html(line.surah+':'+line.ayah+' '+line.verse).appendTo("#demo-1");



blog comments powered by Disqus