{
  "openapi": "3.1.0",
  "info": {
    "title": "Undiscovered Translations — library search API",
    "version": "1.0.0",
    "summary": "Page-indexed hybrid search over the library (adr-007).",
    "description": "The library's search API at https://search.undiscoveredtranslations.com. Every tool is a POST to /v1/<tool> with a JSON body and answers JSON; domain errors are coded results (not_found, invalid_scope, rate_limited, unavailable). The same seven tools are an MCP server at https://search.undiscoveredtranslations.com/v1/mcp (Streamable HTTP, stateless, no key). The contract is https://search.undiscoveredtranslations.com/v1/openapi.json; inside v1 it only grows.\n\nUndiscovered Translations is a research library of the Zionist and Jewish-national press and of the books around it: The Maccabaean (English monthly, New York, 1901–1920), Die Welt (German weekly, 1897–1914), Altneuland (German monthly, 1904–1906), and fifteen books from 1845 to 1944, among them Hess, Nordau and Jabotinsky, and Kalischer's Seeking Zion and its sequel in four Hebrew printings (1862–1919). Palästina (1902–1938) is being acquired and holds no pages yet. German, Russian and Hebrew texts carry an AI English translation beside the original. It is a research instrument over a defined corpus, not a general archive: call describe_library for the current works, spans and counts before assuming something is or is not held.\n\nEvery page side states its provenance. text_origin is original (a transcription of the scan), translation_verified (an AI translation checked by an adversarial per-page verify pass against the source) or translation_unverified. ocr_quality is structured or flat. Transcriptions are OCR and keep its errors; quote them as found.\n\nWhen search_library returns low_confidence, rewrite the query in the vocabulary of the period (contemporary names of movements and institutions, period transliterations such as Kishineff or Chovevei Zion) or resolve the person or place with find_entities and search again with entities[]. The absence of low_confidence is not a claim that the results are right.\n\nWorks flagged as antisemitic primary sources are held for study. Their pages carry a tag and an editorial framing field; whenever you quote or summarise such a page, relay its framing with it.\n\nCite as work, container, printed page and scan index, and say whether the quoted text is a translation. Original texts and transcriptions are public domain. English translations, editorial notes and library apparatus are licensed CC BY 4.0 — credit Undiscovered Translations (undiscoveredtranslations.com). Training use is permitted.\n\nSearch is compute-bearing and rate-limited per client (30/min, 600/hour, 3,000/day); reading pages is cheaper (120/min). For whole-corpus work use the bulk lane at https://books.undiscoveredtranslations.com/, which is unlimited.",
    "license": {
      "name": "CC BY 4.0 (translations and apparatus); public domain (originals)",
      "identifier": "CC-BY-4.0"
    }
  },
  "tags": [
    {
      "name": "search",
      "description": "Compute-bearing: 30/min, 600/hour, 3,000/day per client IP (MACC-099 D10)."
    },
    {
      "name": "read",
      "description": "Reads and browse: 120/min per client IP (MACC-099 D10)."
    }
  ],
  "paths": {
    "/v1/describe_library": {
      "post": {
        "operationId": "describe_library",
        "summary": "What the library holds",
        "description": "What the library holds: every work with its span, languages, page count and status, plus the provenance vocabulary, the citation format, the rights and the bulk-access path. Call it first. Original texts and transcriptions are public domain. English translations, editorial notes and library apparatus are licensed CC BY 4.0 — credit Undiscovered Translations (undiscoveredtranslations.com). Training use is permitted.",
        "tags": [
          "read"
        ],
        "x-rate-tier": "read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DescribeLibraryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DescribeLibraryResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DescribeLibraryResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/list_containers": {
      "post": {
        "operationId": "list_containers",
        "summary": "The issues of one periodical, or the single edition of a book, for a work_id, paged by cursor and filterable by year.",
        "description": "The issues of one periodical, or the single edition of a book, for a work_id, paged by cursor and filterable by year. Each container carries its date, the language sides it has and the provenance its pages mostly share.",
        "tags": [
          "read"
        ],
        "x-rate-tier": "read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListContainersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ListContainersResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListContainersResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/list_units": {
      "post": {
        "operationId": "list_units",
        "summary": "The articles, chapters and other units of one container, with titles, bylines and scan ranges, plus the scan pages no unit claims.",
        "description": "The articles, chapters and other units of one container, with titles, bylines and scan ranges, plus the scan pages no unit claims.",
        "tags": [
          "read"
        ],
        "x-rate-tier": "read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListUnitsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ListUnitsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListUnitsResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search_library": {
      "post": {
        "operationId": "search_library",
        "summary": "Hybrid semantic and keyword search over every page side of the library; each hit carries its citation, provenance, a snippet and the matched spans.",
        "description": "Hybrid semantic and keyword search over every page side of the library; each hit carries its citation, provenance, a snippet and the matched spans. Scope it with works, containers, years, languages or entities. When low_confidence is true, follow the hint: rewrite the query in period vocabulary or resolve names with find_entities, and pass alpha 0.8 when the rewrite is a keyword list. The absence of low_confidence is not a claim that the results are right.",
        "tags": [
          "search"
        ],
        "x-rate-tier": "search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchLibraryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SearchLibraryResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchLibraryResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/get_page": {
      "post": {
        "operationId": "get_page",
        "summary": "One page by page_id with each requested language side and its own provenance, plus the citation, the unit that claims it and its neighbours.",
        "description": "One page by page_id with each requested language side and its own provenance, plus the citation, the unit that claims it and its neighbours. When the page carries a framing field, relay that framing with any quotation from it.",
        "tags": [
          "read"
        ],
        "x-rate-tier": "read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetPageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "GetPageResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/get_unit": {
      "post": {
        "operationId": "get_unit",
        "summary": "One article or chapter page by page, 12 pages per call; continue with continue_from.",
        "description": "One article or chapter page by page, 12 pages per call; continue with continue_from. When a page's provenance carries framing, relay that framing with any quotation from it.",
        "tags": [
          "read"
        ],
        "x-rate-tier": "read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetUnitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "GetUnitResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUnitResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    },
    "/v1/find_entities": {
      "post": {
        "operationId": "find_entities",
        "summary": "Look up a person or place by name",
        "description": "Look up a person or place by name: the registry's spellings, author and subject roles and mention counts per work, for scoping search_library with entities[].",
        "tags": [
          "search"
        ],
        "x-rate-tier": "search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindEntitiesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "FindEntitiesResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindEntitiesResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_scope — a scope value the library does not have, or an invalid argument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the page, unit, work or container does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — per-client limit hit; retry_after seconds and the bulk-access pointer ride in the body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the client may retry.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "unavailable — the store or the embedder is not reachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Anchor": {
        "type": "object",
        "properties": {
          "side": {
            "$ref": "#/components/schemas/Language"
          },
          "block": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "layout.json block_index where the side has a skeleton; markdown block ordinal otherwise."
          },
          "start": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Character offset into the published block text, inclusive."
          },
          "end": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Character offset, exclusive."
          },
          "exact": {
            "type": "string",
            "description": "The verbatim match, so a renderer can re-find it if offsets drift."
          }
        },
        "required": [
          "side",
          "block",
          "start",
          "end",
          "exact"
        ]
      },
      "BulkAccess": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "description"
        ]
      },
      "Byline": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/BylineRole"
          },
          "entity_id": {
            "default": null,
            "description": "Registry entity id (MACC-148) once linked; null until then.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "role",
          "entity_id"
        ]
      },
      "BylineRole": {
        "type": "string",
        "enum": [
          "author",
          "speaker",
          "translator",
          "editor"
        ]
      },
      "Citation": {
        "type": "object",
        "properties": {
          "work_title": {
            "type": "string"
          },
          "container_label": {
            "type": "string",
            "description": "e.g. 'Vol. IV, No. 6 · June 1903' or 'Jg. I · Nr. 1 · 4. Juni 1897'."
          },
          "printed_page": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Printed folio (MACC-125), display only."
          },
          "printed_label": {
            "default": null,
            "description": "The folio as printed (roman, spelled-out), when it differs from the integer.",
            "type": [
              "string",
              "null"
            ]
          },
          "printed_page_confidence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PrintedPageConfidence"
              },
              {
                "type": "null"
              }
            ],
            "description": "read | interpolated; null when unanchored."
          },
          "scan_index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reader_url": {
            "type": "string",
            "description": "Absolute URL of the page in the reader."
          }
        },
        "required": [
          "work_title",
          "container_label",
          "printed_page",
          "printed_label",
          "printed_page_confidence",
          "scan_index",
          "reader_url"
        ]
      },
      "ContainerDate": {
        "type": "object",
        "properties": {
          "year": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "month": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "day": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "year",
          "month",
          "day"
        ]
      },
      "ContainerSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "work": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "date": {
            "$ref": "#/components/schemas/ContainerDate"
          },
          "volume": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "page_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "sides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            }
          },
          "default_provenance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SideProvenance"
            },
            "description": "The container's default provenance per side; pages may override."
          },
          "unit_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reader_url": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "work",
          "label",
          "date",
          "volume",
          "number",
          "page_count",
          "sides",
          "default_provenance",
          "unit_count",
          "reader_url"
        ]
      },
      "DateSpan": {
        "type": "object",
        "properties": {
          "from_year": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "to_year": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "from_year",
          "to_year"
        ]
      },
      "DescribeLibraryRequest": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "DescribeLibraryResponse": {
        "type": "object",
        "properties": {
          "library": {
            "$ref": "#/components/schemas/LibraryInfo"
          },
          "works": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkSummary"
            }
          }
        },
        "required": [
          "library",
          "works"
        ]
      },
      "Entity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "display_name": {
            "type": "string"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Variant"
            }
          },
          "roles": {
            "$ref": "#/components/schemas/EntityRoles"
          },
          "mentions_by_work": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkMentionCount"
            },
            "description": "So an agent can pick a scope for search_library.entities[]."
          },
          "ambiguous": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "display_name",
          "variants",
          "roles",
          "mentions_by_work",
          "ambiguous",
          "note"
        ]
      },
      "EntityRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/EntityType"
          },
          "display_name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "display_name"
        ]
      },
      "EntityRole": {
        "type": "string",
        "enum": [
          "author",
          "subject"
        ]
      },
      "EntityRoles": {
        "type": "object",
        "properties": {
          "author_bylines": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "subject_mentions": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "author_bylines",
          "subject_mentions"
        ]
      },
      "EntityType": {
        "type": "string",
        "enum": [
          "person",
          "place"
        ]
      },
      "ErrorBody": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string"
          },
          "retry_after": {
            "default": null,
            "description": "Seconds, present on rate_limited.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "bulk_access": {
            "default": null,
            "description": "Pointer to the bulk lane, present on rate_limited.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "message",
          "retry_after",
          "bulk_access"
        ]
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "not_found",
          "invalid_scope",
          "rate_limited",
          "unavailable"
        ]
      },
      "ErrorResult": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "required": [
          "error"
        ]
      },
      "ExpandRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "The query as the reader typed it."
          }
        },
        "required": [
          "query"
        ]
      },
      "ExpandResponse": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "normalised_query": {
            "type": "string",
            "description": "The cache key text: NFKC, lower-cased, whitespace collapsed."
          },
          "terms": {
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Most useful first; may be empty when the expander had nothing sure to add."
          },
          "prompt_version": {
            "type": "string"
          },
          "model": {
            "description": "The model that produced the terms, when known.",
            "type": [
              "string",
              "null"
            ]
          },
          "cached": {
            "type": "boolean"
          },
          "alpha": {
            "default": 0.8,
            "description": "The dense weight to search the expanded query at (MACC-147 D4).",
            "type": "number"
          }
        },
        "required": [
          "query",
          "normalised_query",
          "terms",
          "prompt_version",
          "model",
          "cached",
          "alpha"
        ]
      },
      "FindEntitiesRequest": {
        "type": "object",
        "properties": {
          "query": {
            "default": null,
            "description": "Case-insensitive against canonical name and every variant, prefix + trigram fuzzy; no query returns the most-mentioned of the type.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/EntityType"
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/EntityRole"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "default": 10,
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "additionalProperties": false
      },
      "FindEntitiesResponse": {
        "type": "object",
        "properties": {
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Entity"
            }
          },
          "note": {
            "default": null,
            "description": "Why the list is empty when the registry cannot answer at all (e.g. not built yet, MACC-167) — so an empty list is never mistaken for \"no such person\". Null otherwise.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "entities",
          "note"
        ]
      },
      "GetPageRequest": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "string",
            "description": "work/container_slug/scan_index."
          },
          "sides": {
            "default": null,
            "description": "Default: every side the page has.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Language"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "page_id"
        ],
        "additionalProperties": false
      },
      "GetPageResponse": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "string",
            "description": "work/container_slug/scan_index — what an agent hands to get_page."
          },
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "scan_index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "citation": {
            "$ref": "#/components/schemas/Citation"
          },
          "image_url": {
            "description": "Facsimile on R2, when published with images.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_scan_url": {
            "description": "The holding library's scan, when it has a URL.",
            "type": [
              "string",
              "null"
            ]
          },
          "sides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageSide"
            }
          },
          "unit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnitSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "neighbors": {
            "$ref": "#/components/schemas/Neighbors"
          },
          "entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntityRef"
            },
            "description": "MACC-148 attachments on this page."
          },
          "framing": {
            "description": "Work-level editorial note, verbatim, when the work carries one.",
            "type": [
              "string",
              "null"
            ]
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "page_id",
          "work",
          "container_slug",
          "scan_index",
          "citation",
          "image_url",
          "source_scan_url",
          "sides",
          "unit",
          "neighbors",
          "entities",
          "framing",
          "tag"
        ]
      },
      "GetUnitRequest": {
        "type": "object",
        "properties": {
          "unit_id": {
            "type": "string"
          },
          "sides": {
            "default": null,
            "description": "Default: English where it exists, else the original.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Language"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "from_scan_index": {
            "default": null,
            "description": "Continue a truncated unit from this scan index.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "unit_id"
        ],
        "additionalProperties": false
      },
      "GetUnitResponse": {
        "type": "object",
        "properties": {
          "unit": {
            "$ref": "#/components/schemas/Unit"
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitPage"
            }
          },
          "truncated": {
            "type": "boolean"
          },
          "continue_from": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Scan index to pass as from_scan_index when truncated."
          }
        },
        "required": [
          "unit",
          "pages",
          "truncated",
          "continue_from"
        ]
      },
      "Hit": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "string",
            "description": "work/container_slug/scan_index — what an agent hands to get_page."
          },
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "scan_index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "citation": {
            "$ref": "#/components/schemas/Citation"
          },
          "unit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnitSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The attached unit, or null for the bare page (MACC-090)."
          },
          "language": {
            "description": "Language of the side that matched.",
            "$ref": "#/components/schemas/Language"
          },
          "sides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            },
            "description": "Every side the page has."
          },
          "snippet": {
            "type": "string",
            "description": "~300 chars from the matched side."
          },
          "score": {
            "description": "Fused score (MACC-098); null when the call had no query (entities-only order by date).",
            "type": [
              "number",
              "null"
            ]
          },
          "ranks": {
            "$ref": "#/components/schemas/Ranks"
          },
          "provenance": {
            "$ref": "#/components/schemas/Provenance"
          },
          "reprints": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Reprints"
              },
              {
                "type": "null"
              }
            ]
          },
          "anchors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Anchor"
            },
            "description": "MACC-152: matched spans on this page; [] when only the dense arm matched."
          }
        },
        "required": [
          "page_id",
          "work",
          "container_slug",
          "scan_index",
          "citation",
          "unit",
          "language",
          "sides",
          "snippet",
          "score",
          "ranks",
          "provenance",
          "reprints",
          "anchors"
        ]
      },
      "Language": {
        "type": "string",
        "enum": [
          "de",
          "en",
          "ru",
          "he"
        ]
      },
      "LibraryInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "site_url": {
            "type": "string"
          },
          "rights": {
            "type": "string",
            "description": "The MACC-093 one-liner, verbatim."
          },
          "citation_format": {
            "type": "string"
          },
          "provenance_vocabulary": {
            "$ref": "#/components/schemas/ProvenanceVocabulary"
          },
          "bulk_access": {
            "$ref": "#/components/schemas/BulkAccess"
          },
          "contract_version": {
            "type": "string",
            "description": "'v1'."
          }
        },
        "required": [
          "name",
          "site_url",
          "rights",
          "citation_format",
          "provenance_vocabulary",
          "bulk_access",
          "contract_version"
        ]
      },
      "ListContainersRequest": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string"
          },
          "year_from": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "year_to": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "cursor": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id"
        ],
        "additionalProperties": false
      },
      "ListContainersResponse": {
        "type": "object",
        "properties": {
          "work": {
            "type": "string"
          },
          "containers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContainerSummary"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work",
          "containers",
          "next_cursor"
        ]
      },
      "ListUnitsRequest": {
        "type": "object",
        "properties": {
          "container_slug": {
            "type": "string"
          }
        },
        "required": [
          "container_slug"
        ],
        "additionalProperties": false
      },
      "ListUnitsResponse": {
        "type": "object",
        "properties": {
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Unit"
            }
          },
          "unattached_pages": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "description": "Scan indices no unit claimed."
          }
        },
        "required": [
          "work",
          "container_slug",
          "units",
          "unattached_pages"
        ]
      },
      "Neighbors": {
        "type": "object",
        "properties": {
          "prev": {
            "description": "Previous page id in the container, or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "prev",
          "next"
        ]
      },
      "OcrQuality": {
        "type": "string",
        "enum": [
          "structured",
          "flat"
        ]
      },
      "PageRef": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "string",
            "description": "work/container_slug/scan_index — what an agent hands to get_page."
          },
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "scan_index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "page_id",
          "work",
          "container_slug",
          "scan_index"
        ]
      },
      "PageSide": {
        "type": "object",
        "properties": {
          "language": {
            "$ref": "#/components/schemas/Language"
          },
          "text": {
            "type": "string",
            "description": "The published text — assembled output, never a source file."
          },
          "provenance": {
            "$ref": "#/components/schemas/Provenance"
          }
        },
        "required": [
          "language",
          "text",
          "provenance"
        ]
      },
      "PrintedPageConfidence": {
        "type": "string",
        "enum": [
          "read",
          "interpolated"
        ]
      },
      "PrintedRange": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "end": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "Provenance": {
        "type": "object",
        "properties": {
          "text_origin": {
            "$ref": "#/components/schemas/TextOrigin"
          },
          "ocr_quality": {
            "$ref": "#/components/schemas/OcrQuality"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "framing": {
            "default": null,
            "description": "The work's editorial note, verbatim, when the work carries one (MACC-095 D3).",
            "type": [
              "string",
              "null"
            ]
          },
          "tag": {
            "default": null,
            "description": "Inline tag when the work is flagged, e.g. 'antisemitic primary source — under study'.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "text_origin",
          "ocr_quality",
          "provider",
          "framing",
          "tag"
        ]
      },
      "ProvenanceVocabulary": {
        "type": "object",
        "properties": {
          "text_origin": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VocabularyEntry"
            }
          },
          "ocr_quality": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VocabularyEntry"
            }
          },
          "verify_method": {
            "type": "string",
            "description": "One line on the adversarial per-page verify pass."
          }
        },
        "required": [
          "text_origin",
          "ocr_quality",
          "verify_method"
        ]
      },
      "Provider": {
        "type": "object",
        "properties": {
          "family": {
            "type": "string",
            "description": "gemini | claude | azure | … — never a reader-facing badge."
          },
          "model": {
            "default": "unknown",
            "description": "Model name, or 'unknown'.",
            "type": "string"
          }
        },
        "required": [
          "family",
          "model"
        ]
      },
      "Ranks": {
        "type": "object",
        "properties": {
          "dense": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "lexical": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "dense",
          "lexical"
        ]
      },
      "Reprints": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Copies collapsed into this hit, excluding itself."
          },
          "page_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "count",
          "page_ids"
        ]
      },
      "ScanRange": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "First scan index of the unit, inclusive."
          },
          "end": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Last scan index of the unit, inclusive."
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "SearchFilters": {
        "type": "object",
        "properties": {
          "text_origin": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextOrigin"
            }
          },
          "include_flagged": {
            "type": "boolean"
          },
          "entities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "text_origin",
          "include_flagged",
          "entities"
        ]
      },
      "SearchLibraryRequest": {
        "type": "object",
        "properties": {
          "query": {
            "default": null,
            "description": "Embedded as typed, any of the four languages; optional when entities[] is set.",
            "type": [
              "string",
              "null"
            ]
          },
          "query_language": {
            "default": null,
            "description": "Override the detected language the lexical arm runs on.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Language"
              },
              {
                "type": "null"
              }
            ]
          },
          "works": {
            "default": [],
            "description": "Scope: work ids, AND-ed with the other scopes.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "containers": {
            "default": [],
            "description": "Scope: container slugs.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "default": [],
            "description": "Scope: page sides to search.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            }
          },
          "year_from": {
            "default": null,
            "description": "Scope on the container's structured year, inclusive.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "year_to": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "text_origin": {
            "default": [],
            "description": "Explicit filter (MACC-095 D6): e.g. [original, translation_verified] = checked-only.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TextOrigin"
            }
          },
          "include_flagged": {
            "default": true,
            "description": "Explicit filter: false excludes flagged works.",
            "type": "boolean"
          },
          "entities": {
            "default": [],
            "description": "Registry entity ids (MACC-148); pages must mention every one.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "alpha": {
            "default": 0.6,
            "description": "Dense weight of the fused score; pass 0.8 on keyword-list rewrites (MACC-147 D4).",
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "collapse_reprints": {
            "default": true,
            "type": "boolean"
          },
          "limit": {
            "default": 10,
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "cursor": {
            "default": null,
            "description": "Opaque cursor from a previous response; stable against the ranking.",
            "type": [
              "string",
              "null"
            ]
          },
          "expansion_terms": {
            "default": [],
            "description": "Accepted expansion terms (MACC-147), kept separate so the searched echo states what was added and the anchor scan includes them.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "SearchLibraryResponse": {
        "type": "object",
        "properties": {
          "searched": {
            "$ref": "#/components/schemas/Searched"
          },
          "low_confidence": {
            "type": "boolean",
            "description": "MACC-099 D9: the server could not find a confident match. Its absence is not a claim the results are right."
          },
          "hint": {
            "description": "The rewrite instruction, present when low_confidence is true.",
            "type": [
              "string",
              "null"
            ]
          },
          "candidates": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Size of the fused candidate set; hybrid ranking has no honest total."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Hit"
            }
          }
        },
        "required": [
          "searched",
          "low_confidence",
          "hint",
          "candidates",
          "next_cursor",
          "hits"
        ]
      },
      "SearchScope": {
        "type": "object",
        "properties": {
          "works": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "containers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            }
          },
          "year_from": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "year_to": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "works",
          "containers",
          "languages",
          "year_from",
          "year_to"
        ]
      },
      "Searched": {
        "type": "object",
        "properties": {
          "query": {
            "type": [
              "string",
              "null"
            ]
          },
          "detected_language": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Language"
              },
              {
                "type": "null"
              }
            ],
            "description": "Language the server detected for the query; null with no query."
          },
          "query_language": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Language"
              },
              {
                "type": "null"
              }
            ],
            "description": "Language the lexical arm ran on (detected, or the override)."
          },
          "scope": {
            "$ref": "#/components/schemas/SearchScope"
          },
          "filters": {
            "$ref": "#/components/schemas/SearchFilters"
          },
          "alpha": {
            "type": "number"
          },
          "collapse_reprints": {
            "type": "boolean"
          },
          "expansion_terms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "query",
          "detected_language",
          "query_language",
          "scope",
          "filters",
          "alpha",
          "collapse_reprints",
          "expansion_terms"
        ]
      },
      "Serial": {
        "type": "object",
        "properties": {
          "series_id": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          },
          "part": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "parts": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "continued_from": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/SerialLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "continues_on": {
            "default": null,
            "anyOf": [
              {
                "$ref": "#/components/schemas/SerialLink"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "series_id",
          "part",
          "parts",
          "continued_from",
          "continues_on"
        ]
      },
      "SerialLink": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "string",
            "description": "The printed continuation note, verbatim."
          },
          "scope": {
            "default": null,
            "description": "same_issue | adjacent_issue | … as recorded by the sweep.",
            "type": [
              "string",
              "null"
            ]
          },
          "page_id": {
            "default": null,
            "description": "Resolved page id when the note names a page that maps to a scan.",
            "type": [
              "string",
              "null"
            ]
          },
          "unit_id": {
            "default": null,
            "description": "Resolved unit id when the assembler linked the parts.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "raw",
          "scope",
          "page_id",
          "unit_id"
        ]
      },
      "SideProvenance": {
        "type": "object",
        "properties": {
          "language": {
            "$ref": "#/components/schemas/Language"
          },
          "provenance": {
            "$ref": "#/components/schemas/Provenance"
          }
        },
        "required": [
          "language",
          "provenance"
        ]
      },
      "TextOrigin": {
        "type": "string",
        "enum": [
          "original",
          "translation_verified",
          "translation_unverified"
        ]
      },
      "Unit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "title_translated": {
            "default": null,
            "description": "English title where the sweep translated a German one.",
            "type": [
              "string",
              "null"
            ]
          },
          "bylines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Byline"
            }
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnitKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "scan_range": {
            "$ref": "#/components/schemas/ScanRange"
          },
          "printed_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PrintedRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "serial": {
            "default": null,
            "description": "Serialisation links where the sweep recorded them (MACC-099 D6).",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Serial"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "title_translated",
          "bylines",
          "kind",
          "scan_range",
          "printed_range",
          "work",
          "container_slug",
          "serial",
          "description"
        ]
      },
      "UnitKind": {
        "type": "string",
        "enum": [
          "ad",
          "address",
          "chapter",
          "editorial",
          "essay",
          "feuilleton",
          "leitartikel",
          "letter",
          "news",
          "notice",
          "obituary",
          "poem",
          "proceedings",
          "review",
          "story"
        ]
      },
      "UnitPage": {
        "type": "object",
        "properties": {
          "page_id": {
            "type": "string",
            "description": "work/container_slug/scan_index — what an agent hands to get_page."
          },
          "work": {
            "type": "string"
          },
          "container_slug": {
            "type": "string"
          },
          "scan_index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "citation": {
            "$ref": "#/components/schemas/Citation"
          },
          "sides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageSide"
            }
          }
        },
        "required": [
          "page_id",
          "work",
          "container_slug",
          "scan_index",
          "citation",
          "sides"
        ]
      },
      "UnitSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "title_translated": {
            "default": null,
            "description": "English title where the sweep translated a German one.",
            "type": [
              "string",
              "null"
            ]
          },
          "bylines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Byline"
            }
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnitKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "scan_range": {
            "$ref": "#/components/schemas/ScanRange"
          },
          "printed_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PrintedRange"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "title",
          "title_translated",
          "bylines",
          "kind",
          "scan_range",
          "printed_range"
        ]
      },
      "Variant": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Page-sides carrying this spelling."
          }
        },
        "required": [
          "text",
          "count"
        ]
      },
      "VocabularyEntry": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          },
          "meaning": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "meaning"
        ]
      },
      "WorkKind": {
        "type": "string",
        "enum": [
          "periodical",
          "book"
        ]
      },
      "WorkMentionCount": {
        "type": "object",
        "properties": {
          "work": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "work",
          "count"
        ]
      },
      "WorkStatus": {
        "type": "string",
        "enum": [
          "published",
          "in_progress",
          "in_acquisition"
        ]
      },
      "WorkSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/WorkKind"
          },
          "original_languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            }
          },
          "translation_languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Language"
            }
          },
          "date_span": {
            "$ref": "#/components/schemas/DateSpan"
          },
          "container_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "page_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "$ref": "#/components/schemas/WorkStatus"
          },
          "framing": {
            "type": [
              "string",
              "null"
            ]
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "original_languages",
          "translation_languages",
          "date_span",
          "container_count",
          "page_count",
          "status",
          "framing",
          "tag"
        ]
      }
    }
  },
  "x-contract-version": "v1",
  "x-rate-limits": {
    "search": {
      "per_minute": 30,
      "per_hour": 600,
      "per_day": 3000
    },
    "read": {
      "per_minute": 120,
      "per_hour": null,
      "per_day": null
    }
  }
}
