Skip to content
HALOWERK

Text Tools

epub toc outline depth

EPUB outline depth counts entries per level and measures how many groups have no linked title. Use it when an agent needs estimating navigation complexity for a reading interface.

POST https://text.halowerk.com/v1/epub-toc-outline-depth

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
tocstringYes
Show full input schema
{
  "type": "object",
  "properties": {
    "toc": {
      "type": "string",
      "maxLength": 20000,
      "minLength": 1
    }
  },
  "required": [
    "toc"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "toc": "<ol><li><a href=\"text/halftitlepage.xhtml\">Moby Dick</a><ol><li><a href=\"text/chapter-1.xhtml\">I: Loomings</a></li><li><a href=\"text/chapter-2.xhtml\">II: The Carpetbag</a></li></ol></li></ol>"
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "levels": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "unlinked_groups": {
          "type": "integer"
        },
        "deepest": {
          "type": "integer"
        }
      },
      "required": [
        "levels",
        "unlinked_groups",
        "deepest"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub →