About tafsir data
Tafsir is available as JSON and SQLite. The text may contain HTML
tags such as <b> and <i>, so render it as HTML rather than as
plain text.
One passage of tafsir often covers several ayahs at once. QUL stores the text once and records every
ayah it applies to, so you never have to duplicate it.
JSON format
{
"2:3": {
"text": "tafsir text",
"ayah_keys": ["2:3", "2:4"]
},
"2:4": "2:3"
}
Every key is an ayah key in surah:ayah form — "2:3" is the third ayah of
Surah Al-Baqarah. The value is one of two things:
-
An object — the tafsir itself.
text holds the content and
ayah_keys lists every ayah it covers.
-
A string — a pointer. This ayah shares the tafsir stored under the ayah key named by
the string. In the example above,
"2:4" points at "2:3".
SQLite columns
ayah_key — the ayah this row is for.
group_ayah_key — the ayah key holding the shared tafsir text.
from_ayah / to_ayah — first and last ayah of the passage, for convenience.
ayah_keys — comma-separated list of every ayah the passage covers.
text — the tafsir. When it is blank, read the text from group_ayah_key instead.