Scripture Resolver

Compute Verse Distance Between Scripture References

Use /api/distance to measure the canonical gap between any two Bible verses — version-agnostic coordinate math on the global verse index.

The problem

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.


1

Request the distance

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"

What the distance represents

The number of verse positions between the two canonical coordinates in the global index:

a
John 3:16
verse_index: 26137
2,008 verses
b
Romans 8:28
verse_index: 28145

Distance is always a positive integer regardless of which reference comes first.


2

Example response

{
  "status": "success",
  "a": "John.3.16",
  "b": "Rom.8.28",
  "distance": 2008
}

Response fields

FieldDescription
aCanonical OSIS identifier for the first reference
bCanonical OSIS identifier for the second reference
distanceNumber of verse positions between the two coordinates in the global index

Why this matters

Reading plan progress: show users how far they've read and how far remains
Quiz & challenge apps: score how close a guess was to the correct verse
Biblical analytics: measure thematic spacing between cross-reference pairs
Navigation UX: determine jump size before prefetching verses along a path

Common use cases

Reading plan completion percentage
Scripture memory & trivia games
Cross-reference proximity analysis
Sermon series span visualization

Ready to measure verse distance?

A free API key gives you 500 calls per day — no credit card required.

Get a free API key Next: Cross-references →