{
  "openapi": "3.1.0",
  "info": {
    "title": "Scriptura API",
    "version": "1.0.0",
    "description": "Read-only JSON API for Scriptura (scriptura.si), a free library of 953 classic works, most in the original beside English: 371 Greek classics (Homer, Plato, Aristotle, Thucydides, Plutarch), 125 Latin (Virgil, Cicero, Livy, Tacitus), 131 works of philosophy, Russian, French and German literature (Dostoevsky, Tolstoy, Pushkin, Camus, Kafka, Goethe), the Pali Canon, rabbinic and early Christian texts, and every Bible side by side in Hebrew, Greek and translation. Free, no key, CORS open; every result carries a url to cite. AI agents can also use the MCP server at https://scriptura.si/mcp, and every work is available as Markdown at https://scriptura.si/works/{slug}.md.",
    "contact": {
      "url": "https://scriptura.si/"
    }
  },
  "servers": [
    {
      "url": "https://scriptura.si"
    }
  ],
  "externalDocs": {
    "description": "llms.txt: data files, citation anchors and the MCP server",
    "url": "https://scriptura.si/llms.txt"
  },
  "paths": {
    "/api/passage": {
      "get": {
        "operationId": "getPassage",
        "summary": "A Bible passage in one or more editions, verse-aligned to English numbering",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "description": "Book.chapter.verse range, e.g. JHN.1.1-5, or a chapter, e.g. PSA.110",
            "schema": {
              "type": "string"
            },
            "example": "JHN.1.1-5"
          },
          {
            "name": "editions",
            "in": "query",
            "required": false,
            "description": "Comma-separated edition ids (see llms.txt), e.g. hebrew,lxx,greek-nt,en. Default en.",
            "schema": {
              "type": "string"
            },
            "example": "hebrew,lxx,greek-nt,en"
          }
        ],
        "responses": {
          "200": {
            "description": "The passage, with a url for citation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/readers": {
      "get": {
        "operationId": "getReaders",
        "summary": "Who on the shelf quotes a given Bible verse, with the quotation and a link",
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "description": "A single verse, e.g. MAT.5.39",
            "schema": {
              "type": "string"
            },
            "example": "MAT.5.39"
          }
        ],
        "responses": {
          "200": {
            "description": "Readers of the verse",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/shelf": {
      "get": {
        "operationId": "searchShelf",
        "summary": "Search the library of 953 works by title, author, translator, blurb or group",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search words",
            "schema": {
              "type": "string"
            },
            "example": "enoch"
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Optional group, e.g. Hidden books, Rabbinic, Church Fathers, LCI editions",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching works with ids and urls",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/work": {
      "get": {
        "operationId": "getWork",
        "summary": "A work: its contents, or one section in the original beside English",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Work id from index.json or /api/shelf",
            "schema": {
              "type": "string"
            },
            "example": "enoch-2-morfill-1896"
          },
          {
            "name": "section",
            "in": "query",
            "required": false,
            "description": "Section number, from 1. Omit for the contents.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contents or section text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/room": {
      "get": {
        "operationId": "getRoom",
        "summary": "Every passage on the shelf naming Enoch or Melchizedek",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "description": "Room name",
            "schema": {
              "type": "string",
              "enum": [
                "enoch",
                "melchizedek"
              ]
            },
            "example": "melchizedek"
          }
        ],
        "responses": {
          "200": {
            "description": "Passages, each with a link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
