Use /api/context to retrieve surrounding Scripture
using deterministic canonical verse coordinates — crossing chapter and book boundaries automatically.
Many applications need more than a single verse. Study tools, AI systems, and reading apps often require
nearby verses for interpretation, display, or navigation. The /context endpoint returns a
deterministic window of Scripture centered on any canonical coordinate.
Provide a verse_id and a window size. The API returns that many verses before and after the center, plus the center itself.
curl --get https://holybible.dev/api/context \
-H "Authorization: Bearer YOUR_API_KEY" \
--data verse_id=45008028 \
--data window=2
Romans 8:28 at center. 2 verses before and after returned automatically:
Each row maps to one data[] item in the response. The offset field tells you its position relative to center.
{
"status": "success",
"center": {
"verse_id": 45008028,
"verse_index": 28145,
"reference": "Romans 8:28",
"osis_id": "Rom.8.28"
},
"window": 2,
"results_count": 5,
"data": [
{ "verse_id": 45008026, "verse_index": 28143,
"reference": "Romans 8:26", "offset": -2 },
{ "verse_id": 45008027, "verse_index": 28144,
"reference": "Romans 8:27", "offset": -1 },
{ "verse_id": 45008028, "verse_index": 28145,
"reference": "Romans 8:28", "offset": 0 },
{ "verse_id": 45008029, "verse_index": 28146,
"reference": "Romans 8:29", "offset": 1 },
{ "verse_id": 45008030, "verse_index": 28147,
"reference": "Romans 8:30", "offset": 2 }
]
}
BibleBridge assigns every verse in the Protestant canon a globally consistent verse index (1–31,102). Context windows use this index to calculate nearby verses without requiring the client to determine chapter boundaries. This allows context retrieval to function across chapter transitions and even across book boundaries automatically.
The three endpoints form a pipeline: normalize → expand → retrieve context.
verse_id or verse_indexA free API key gives you 500 calls per day — no credit card required.
Get a free API key View API docs