Skip to content
HALOWERK

Text Tools

html sample excerpt budget

Web page sample budgeting selects the longest initial sequence of complete blocks that fits a UTF-8 byte allowance. Use it when an agent needs a predictable first excerpt under a transport cap.

POST https://text.halowerk.com/v1/html-sample-excerpt-budget

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
urlstringYes
reuse_licenseSee schemaNo
bytesintegerNo
Show full input schema
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 640,
      "minLength": 1
    },
    "reuse_license": {
      "enum": [
        "CC0",
        "CC-BY-4.0",
        "public-domain",
        "own-content"
      ]
    },
    "bytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500000
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "url": "https://docs.python.org/3.14/tutorial/datastructures.html"
}

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": {
        "blocks": {
          "type": "integer"
        },
        "used_bytes": {
          "type": "integer"
        },
        "next_block_bytes": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "blocks",
        "used_bytes",
        "next_block_bytes"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-20 UTC.

More endpoints in this hub

All endpoints in this hub →