{
  "openapi": "3.1.0",
  "info": {
    "title": "TrustBible open data",
    "version": "1.0.0",
    "summary": "Static, read-only Bible text and verse-count files.",
    "description": "Every endpoint is a static file served over HTTPS GET. No key, account or rate plan is needed. Verse text is the public-domain King James Version (KJV) and the Chinese Union Version, simplified (CUV). TrustBible's answer and prayer features are not part of this API; they run only in the web app.",
    "license": {
      "name": "Bible text: public domain",
      "url": "https://trustbible.org/en/terms/"
    }
  },
  "servers": [{ "url": "https://trustbible.org" }],
  "security": [],
  "externalDocs": {
    "description": "Agent skill: how to read chapters and use these files",
    "url": "https://trustbible.org/.well-known/agent-skills/trustbible/SKILL.md"
  },
  "paths": {
    "/data/kjv.jsonl.gz": {
      "get": {
        "operationId": "getKjv",
        "summary": "Every KJV verse (31,102), gzip-compressed JSON Lines",
        "responses": {
          "200": {
            "description": "One Verse object per line.",
            "content": { "application/gzip": { "schema": { "type": "string", "contentMediaType": "application/jsonl", "x-line-schema": { "$ref": "#/components/schemas/Verse" } } } }
          }
        }
      }
    },
    "/data/cuv-simplified.jsonl.gz": {
      "get": {
        "operationId": "getCuvSimplified",
        "summary": "Every Chinese Union Version (simplified) verse, gzip-compressed JSON Lines",
        "responses": {
          "200": {
            "description": "One Verse object per line; book names are in English.",
            "content": { "application/gzip": { "schema": { "type": "string", "contentMediaType": "application/jsonl", "x-line-schema": { "$ref": "#/components/schemas/Verse" } } } }
          }
        }
      }
    },
    "/data/{dataset}.json": {
      "get": {
        "operationId": "getDatasetJson",
        "summary": "A verse-count or reading-time dataset with its method notes",
        "parameters": [{ "$ref": "#/components/parameters/JsonDataset" }],
        "responses": {
          "200": { "description": "The dataset; each file documents its own fields and counting rule.", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    },
    "/data/{dataset}.csv": {
      "get": {
        "operationId": "getDatasetCsv",
        "summary": "A verse-count, reading-time or audit table as CSV with a header row",
        "parameters": [{ "$ref": "#/components/parameters/CsvDataset" }],
        "responses": {
          "200": { "description": "CSV with a header row.", "content": { "text/csv": { "schema": { "type": "string" } } } }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "JsonDataset": {
        "name": "dataset",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "enum": ["chapter-reading-times", "love-counts", "fear-not-counts", "be-still-counts", "money-verse-counts", "god-count-method", "jesus-count-method"]
        }
      },
      "CsvDataset": {
        "name": "dataset",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "enum": ["chapter-reading-times", "love-counts", "love-verses", "fear-not-counts", "be-still-counts", "money-verse-counts", "god-count-audit", "jesus-name-audit"]
        }
      }
    },
    "schemas": {
      "Verse": {
        "type": "object",
        "required": ["book", "chapter", "verse", "text"],
        "properties": {
          "book": { "type": "string", "examples": ["Genesis"] },
          "chapter": { "type": "integer", "minimum": 1 },
          "verse": { "type": "integer", "minimum": 1 },
          "text": { "type": "string" }
        }
      }
    }
  }
}
