Guess Surah
This feature is designed to make questions about guessing surahs from existing verses. As if you were asking, what surah does this verse belong to?
Available modes in this feature:
Guess Surah - By Surah
This mode generates questions by selecting a list of surahs and then randomly selecting a verse from each surah. The question is then generated from the verse.
Properties
- Name
amount
- Type
- number
- Description
Amount of questions to generate.
- Name
select
- Type
- array of number
- Description
List of surahs to generate questions from. From 1 to 114. Minimum 4 surahs.
Example
Request
import { guessSurah } from 'quran-quiz'
const data = await guessSurah.bySurah({
amount: 3,
select: [111, 112, 113, 114],
})
Response
{
"data": [
{
"question": " قُلْ هُوَ ٱللَّهُ أَحَدٌ",
"options": [
{
"text": "Al-Masad",
"value": 0
},
{
"text": "Al-Falaq",
"value": 0
},
{
"text": "An-Nas",
"value": 0
},
{
"text": "Al-Ikhlas",
"value": 1
}
]
},
// ...
],
"meta": {
"type": "guessSurahBySurah",
"select": [
111,
112,
113,
114
],
"amount": 3
}
}