Description
There is an incorrect page_number mapping in the Madinah Mushaf metadata.
The ayah text and order are correct, but the page metadata shifts to the next page while the verses are still on the same page in the Mushaf.
How I fetched the data
Juz endpoint
export default async function GetJuz(id: string) {
try {
const response = await fetch(
`https://api.quran.com/api/v4/verses/by_juz/${id}?words=true&word_fields=text_uthmani,line_number,page_number&per_page=1000`
);
const data = await response.json();
return data.verses;
} catch (error) {
console.error("Error fetching Juz:", error);
throw error;
}
}
Surah endpoint
export default async function GetSurah(id: string) {
try {
const response = await fetch(
`https://api.quran.com/api/v4/verses/by_chapter/${id}?words=true&word_fields=text_uthmani,line_number,page_number&per_page=1000`
);
const data = await response.json();
return data.verses;
} catch (error) {
console.error("Error fetching Surah:", error);
throw error;
}
}
Case 1 — Surah 80 (Abasa) verses 40–42
Expected
All three ayahs are on page 585 (line 15) in the Madinah Mushaf.
Actual API response
Ayah 40 correct, but 41 and 42 incorrectly move to page 586.
{
"verse_key": "80:40",
"page_number": 585
},
{
"verse_key": "80:41",
"page_number": 586
},
{
"verse_key": "80:42",
"page_number": 586
}
They should all be on the same page.
Case 2 — Surah 79 verse 16
Expected
Page 584
Actual
Page 583
{
"verse_key": "79:16",
"page_number": 583
}
Notes
- Word segmentation is correct
- Line numbers are correct relative to each other
- Only the
page_number metadata is shifted
This appears to be a dataset mapping issue rather than an ayah parsing issue.
Request
Please verify the Madinah Mushaf page mapping for these verses in the source dataset.
Description
There is an incorrect
page_numbermapping in the Madinah Mushaf metadata.The ayah text and order are correct, but the page metadata shifts to the next page while the verses are still on the same page in the Mushaf.
How I fetched the data
Juz endpoint
Surah endpoint
Case 1 — Surah 80 (Abasa) verses 40–42
Expected
All three ayahs are on page 585 (line 15) in the Madinah Mushaf.
Actual API response
Ayah 40 correct, but 41 and 42 incorrectly move to page 586.
{ "verse_key": "80:40", "page_number": 585 }, { "verse_key": "80:41", "page_number": 586 }, { "verse_key": "80:42", "page_number": 586 }They should all be on the same page.
Case 2 — Surah 79 verse 16
Expected
Page 584
Actual
Page 583
{ "verse_key": "79:16", "page_number": 583 }Notes
page_numbermetadata is shiftedThis appears to be a dataset mapping issue rather than an ayah parsing issue.
Request
Please verify the Madinah Mushaf page mapping for these verses in the source dataset.