High-Performance API|
Production

Scripture API

Sub-millisecond Bible lookups at global scale.

~50ns

Lookup Time

33

Translations

99.99%

Uptime

Overview

Scripture API is a three-phase REST API built in Go. Phase 1 delivers in-memory cached verse lookups at ~50ns. Phase 2 adds full-text and semantic search via PostgreSQL tsvector and pgvector. Phase 3 introduces cross-reference graphs and Strong's concordance word-level analysis. Deployed on GCP Cloud Run behind Cloudflare CDN with 300+ edge locations.

Stack

Go 1.26chi v5PostgreSQL 15pgvectorNeonCloudflare CDNGCP Cloud Run

Features

What it does.

Phase 1: In-Memory Cache

  • List all translations and books
  • Single verse and passage range lookups
  • Random verse and deterministic verse of the day
  • In-memory Bible cache with ~50ns lookup times

Phase 2: Search

  • Full-text search via PostgreSQL tsvector with GIN index
  • Semantic search via pgvector with HNSW index
  • Sub-50ms full-text, sub-300ms semantic response times

Phase 3: Cross-References & Strong's

  • Cross-reference graph traversal with configurable depth
  • Word-level Strong's concordance analysis
  • Topic browsing with relevance-scored verses
  • 340K cross-references from CC-BY dataset

Infrastructure

  • Cloudflare CDN with 300+ edge locations (~5ms cached)
  • GCP Cloud Run: 256Mi, 1 CPU, autoscaling
  • Multi-stage Docker builds for minimal images
  • Automated Cloud Build deployment pipeline

Architecture

How it's built.

1

Cloudflare CDN

300+ edge locations, ~5ms cached response

2

GCP Cloud Run

Go chi router with in-memory Bible cache (~50ns lookup)

3

Neon PostgreSQL

tsvector GIN index + pgvector HNSW index for search

4

Multi-stage Docker

Minimal production images

Interested in this project?

Get in touch →
← Back to all projects