{
  "name": "Midvash API",
  "version": "v1",
  "description": "Free, no-key public Bible API: verses, chapters, books and versions.",
  "documentation": "https://api.midvash.com/docs",
  "openapi": "https://api.midvash.com/openapi.json",
  "endpoints": {
    "GET /v1": {
      "description": "Endpoint discovery for the v1 API ({ data, meta } envelope)",
      "example": "https://api.midvash.com/v1"
    },
    "GET /v1/versions": {
      "description": "List Bible versions",
      "example": "https://api.midvash.com/v1/versions"
    },
    "GET /v1/versions/{slug}": {
      "description": "Get a single version by slug",
      "example": "https://api.midvash.com/v1/versions/kjv"
    },
    "GET /v1/books": {
      "description": "List Bible books",
      "example": "https://api.midvash.com/v1/books"
    },
    "GET /v1/books/{slug}": {
      "description": "Get a single book by slug",
      "example": "https://api.midvash.com/v1/books/john"
    },
    "GET /v1/{version}/{book}/{chapter}": {
      "description": "Get a full chapter (?preview=N truncates text)",
      "example": "https://api.midvash.com/v1/kjv/john/3"
    },
    "GET /v1/{version}/{book}/{chapter}/{verse}": {
      "description": "Get a verse or a range (16 or 16-20)",
      "example": "https://api.midvash.com/v1/kjv/john/3/16-18"
    },
    "GET /v1/passages": {
      "description": "Resolve up to 50 references in one call",
      "example": "https://api.midvash.com/v1/passages?refs=john%203:16,psalms%2023&version=kjv"
    },
    "GET /v1/parse": {
      "description": "Parse a free-text reference into its parts",
      "example": "https://api.midvash.com/v1/parse?q=John%203:16-18"
    },
    "GET /v1/votd": {
      "description": "Verse of the day (query: language, version)",
      "example": "https://api.midvash.com/v1/votd?language=en"
    },
    "GET /openapi.json": {
      "description": "OpenAPI 3.1 spec",
      "example": "https://api.midvash.com/openapi.json"
    },
    "GET /docs": {
      "description": "Interactive API reference",
      "example": "https://api.midvash.com/docs"
    },
    "GET /": {
      "description": "This document (legacy root)",
      "example": "https://api.midvash.com/"
    },
    "GET /versions": {
      "description": "Legacy: list versions",
      "example": "https://api.midvash.com/versions"
    },
    "GET /books": {
      "description": "Legacy: list books",
      "example": "https://api.midvash.com/books"
    },
    "GET /votd": {
      "description": "Legacy: verse of the day",
      "example": "https://api.midvash.com/votd?language=en"
    },
    "GET /{version}/{book}/{chapter}": {
      "description": "Legacy: full chapter",
      "example": "https://api.midvash.com/kjv/john/3"
    },
    "GET /{version}/{book}/{chapter}/{verse}": {
      "description": "Legacy: verse or range",
      "example": "https://api.midvash.com/kjv/john/3/16"
    }
  },
  "features": [
    "119 free Bible versions (public domain or open license)",
    "69 languages",
    "CORS enabled for public access",
    "Served and cached on the Cloudflare edge"
  ],
  "notes": [
    "New integrations should use /v1; the legacy routes stay for existing clients.",
    "Book slugs are accepted in English (john, genesis, psalms) and in other languages.",
    "A version that left the API (reserved rights) is served by the free version of the same language; the response carries the slug that answered.",
    "No rate limit: the API is public and edge-cached. We do not emit 429 or X-RateLimit-* headers. Please honor ETags (304) and batch references with /v1/passages."
  ]
}