Use /api/distance to measure the canonical gap between any two Bible verses —
version-agnostic coordinate math on the global verse index.
Knowing how far apart two verses are — across chapters and books — requires enumerating the entire canon. The /distance endpoint computes this in one call using the same global verse index that powers context windows and traversal.
Pass two references as a and b. Both are resolved through the Scripture Resolver — you can use any human-written format.
curl --get https://holybible.dev/api/distance \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode a="John 3:16" \
--data-urlencode b="Romans 8:28"
The number of verse positions between the two canonical coordinates in the global index:
Distance is always a positive integer regardless of which reference comes first.
{
"status": "success",
"a": "John.3.16",
"b": "Rom.8.28",
"distance": 2008
}
| Field | Description |
|---|---|
| a | Canonical OSIS identifier for the first reference |
| b | Canonical OSIS identifier for the second reference |
| distance | Number of verse positions between the two coordinates in the global index |
A free API key gives you 500 calls per day — no credit card required.
Get a free API key Next: Cross-references →