How To Get JSON data from Quran Cloud API

Dear All

Using this API Quran API

http://api.alquran.cloud/v1/ayah/262/ar.alafasy

{
  "code": 200,
  "status": "OK",
  "data": {
    "number": 262,
    "audio": "https://cdn.alquran.cloud/media/audio/ayah/ar.alafasy/262",
    "audioSecondary": [
      "https://cdn.islamic.network/quran/audio/128/ar.alafasy/262.mp3",
      "https://cdn.islamic.network/quran/audio/64/ar.alafasy/262.mp3"
    ],
    "text": "ٱللَّهُ لَآ إِلَٰهَ إِلَّا هُوَ ٱلْحَىُّ ٱلْقَيُّومُ ۚ لَا تَأْخُذُهُۥ سِنَةٌۭ وَلَا نَوْمٌۭ ۚ لَّهُۥ مَا فِى ٱلسَّمَٰوَٰتِ وَمَا فِى ٱلْأَرْضِ ۗ مَن ذَا ٱلَّذِى يَشْفَعُ عِندَهُۥٓ إِلَّا بِإِذْنِهِۦ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۖ وَلَا يُحِيطُونَ بِشَىْءٍۢ مِّنْ عِلْمِهِۦٓ إِلَّا بِمَا شَآءَ ۚ وَسِعَ كُرْسِيُّهُ ٱلسَّمَٰوَٰتِ وَٱلْأَرْضَ ۖ وَلَا يَـُٔودُهُۥ حِفْظُهُمَا ۚ وَهُوَ ٱلْعَلِىُّ ٱلْعَظِيمُ",
    "edition": {
      "identifier": "ar.alafasy",
      "language": "ar",
      "name": "مشاري العفاسي",
      "englishName": "Alafasy",
      "format": "audio",
      "type": "versebyverse",
      "direction": null
    },
    "surah": {
      "number": 2,
      "name": "سورة البقرة",
      "englishName": "Al-Baqara",
      "englishNameTranslation": "The Cow",
      "numberOfAyahs": 286,
      "revelationType": "Medinan"
    },
    "numberInSurah": 255,
    "juz": 3,
    "manzil": 1,
    "page": 42,
    "ruku": 35,
    "hizbQuarter": 17,
    "sajda": false
  }
}

Please Help Me,
I Want to get : “text” and “audio”

Welcome to the community .Read this post

1 Like

These blocks are working.

Here is the result:

Here is the logic of how you get your data. This will help you to know how to get other results in case you need it

1 Like

Thank you all, Solved with your blocks… Alhamdulillah

1 Like

MashAllah very great.

Dear

How to get englishName under surah

{
  "code": 200,
  "status": "OK",
  "data": {
    "number": 262,
    "audio": "https://cdn.alquran.cloud/media/audio/ayah/ar.alafasy/262",
    "audioSecondary": [
      "https://cdn.islamic.network/quran/audio/128/ar.alafasy/262.mp3",
      "https://cdn.islamic.network/quran/audio/64/ar.alafasy/262.mp3"
    ],
    "text": "ٱللَّهُ لَآ إِلَٰهَ إِلَّا هُوَ ٱلْحَىُّ ٱلْقَيُّومُ ۚ لَا تَأْخُذُهُۥ سِنَةٌۭ وَلَا نَوْمٌۭ ۚ لَّهُۥ مَا فِى ٱلسَّمَٰوَٰتِ وَمَا فِى ٱلْأَرْضِ ۗ مَن ذَا ٱلَّذِى يَشْفَعُ عِندَهُۥٓ إِلَّا بِإِذْنِهِۦ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۖ وَلَا يُحِيطُونَ بِشَىْءٍۢ مِّنْ عِلْمِهِۦٓ إِلَّا بِمَا شَآءَ ۚ وَسِعَ كُرْسِيُّهُ ٱلسَّمَٰوَٰتِ وَٱلْأَرْضَ ۖ وَلَا يَـُٔودُهُۥ حِفْظُهُمَا ۚ وَهُوَ ٱلْعَلِىُّ ٱلْعَظِيمُ",
    "edition": {
      "identifier": "ar.alafasy",
      "language": "ar",
      "name": "مشاري العفاسي",
      "englishName": "Alafasy",
      "format": "audio",
      "type": "versebyverse",
      "direction": null
    },
    "surah": {
      "number": 2,
      "name": "سورة البقرة",
      "englishName": "Al-Baqara",
      "englishNameTranslation": "The Cow",
      "numberOfAyahs": 286,
      "revelationType": "Medinan"
    },
    "numberInSurah": 255,
    "juz": 3,
    "manzil": 1,
    "page": 42,
    "ruku": 35,
    "hizbQuarter": 17,
    "sajda": false
  }
}

Please read and understand the blocks he gave you. Sit in front of the computer and do tests.

Effort is part of learning.
Estudies is part of learning.
Dedication is part of learning.

2 Likes

Thank you, sorry for ask a lot

1 Like

If the answer has helped you, mark it as a solution.

To get “Surah” it’s as easy as copying the same blocks to get “text”, only instead of putting “text” you change it to "surah

blocks (2)

I recommend that you pay attention to how it works.

If you understand it you will not need to ask for every time you need to get a value…

1 Like

If you want to learn more about dictionaries,see here :slightly_smiling_face::

2 Likes

Thanks for everyone

From all your leads, I did this, and it looks like it’s running well

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.