The range in standard form, in English (MAT 5:3-12) and Arabic (متى 5/3-12)
book
id (1–27), code, code_ar, name as printed in the edition
from / to
First and last verse returned
verses
chapter, verse, text
verses[].readings
Only on verses where a liturgical reading begins, e.g. ["يو 2/1-15"]
errors
Problems with parts of the reference that could not be resolved
A range running past the end of a chapter stops at its last verse. Verses the edition omits (e.g. Mt 23:14) have the text ....
2. Get a passage by parameters
Parameter
Description
book (required)
English code, Arabic code, abbreviation, or id (1–27)
chapter
Start chapter. Omit for the whole book
verse
Start verse. Omit for the whole chapter
to_chapter
End chapter. Defaults to chapter
to_verse
End verse. Defaults to verse if only verse is given, otherwise the end of the chapter
/api/v1/ar/?book=MAT&chapter=5 Matthew 5
/api/v1/ar/?book=MAT&chapter=5&verse=3&to_verse=12 Matthew 5:3-12
/api/v1/ar/?book=JHN&chapter=3&verse=16&to_chapter=4&to_verse=2 John 3:16-4:2
/api/v1/ar/?book=متى&chapter=٥ Matthew 5
/api/v1/ar/?book=27 Revelation
Each part of a reference is resolved separately: valid parts come back in passages, the others are explained in errors.
Example
Error
Xyz 1:1
Unknown book "Xyz"
6:9
No book given for "6:9"
Mat 29
MAT has no chapter 29 (it has 28)
Mat 5:99
MAT 5 has no verse 99 (it has 48)
Mat 5:12-3
Range ends before it starts in MAT 5:12-5:3
Mat 5:3x
Cannot read "5:3x" in MAT
HTTP status
When
200
At least one passage found (other parts may still have errors)
400
Nothing could be resolved, a parameter is invalid, or no parameters were given
500
The database is unavailable
Code examples
JavaScript
const res = await fetch('https://example.com/api/v1/ar/?ref=' + encodeURIComponent('يو ١٥/٩-١٧'));
const { passages, errors } = await res.json();
for (const p of passages) {
console.log(p.reference_ar);
for (const v of p.verses) console.log(v.verse, v.text);
}