Skip to content
HALOWERK

Textwerk

length fit

Counts like the target platform: code points, grapheme clusters, Google Ads characters (double-width CJK characters count 2; responsive search ads: headline 30, description 90, path 15), X weighted length (twitter-text config v3: weight 1 for U+0000-10FF and some punctuation ranges, 2 otherwise, emoji 2, URLs 23; limit 280) or SMS segments (GSM 7-bit alphabet with 2-septet extension characters per 3GPP TS 23.038, 160/153 septets, otherwise UCS-2 70/67). Shortening stops as soon as the text.

POST https://text.halowerk.com/v1/length-fit

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYesText to fit.
presetSee schemaNoPlatform limit; alternatively give limit and unit.
limitintegerNoMaximum length in the chosen unit (segments for sms_segments).
unitSee schemaNo
languageSee schemaNoLanguage of the abbreviation and filler-word lists.
keeparrayNoPhrases that must stay unchanged (brand names, prices).
ellipsisbooleanNoAppend an ellipsis when cutting at a word boundary.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 5000,
      "description": "Text to fit."
    },
    "preset": {
      "enum": [
        "google_ads_headline",
        "google_ads_description",
        "google_ads_path",
        "x_post",
        "sms_single"
      ],
      "description": "Platform limit; alternatively give limit and unit."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "description": "Maximum length in the chosen unit (segments for sms_segments)."
    },
    "unit": {
      "enum": [
        "chars",
        "graphemes",
        "google_ads",
        "x_weighted",
        "sms_segments"
      ],
      "default": "chars"
    },
    "language": {
      "enum": [
        "de",
        "en"
      ],
      "default": "en",
      "description": "Language of the abbreviation and filler-word lists."
    },
    "keep": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "description": "Phrases that must stay unchanged (brand names, prices)."
    },
    "ellipsis": {
      "type": "boolean",
      "default": true,
      "description": "Append an ellipsis when cutting at a word boundary."
    }
  }
}

Open original schema

Published input example

{
  "text": "Our really simple invoicing tool (for freelancers) saves approximately 5 hours per month.",
  "preset": "google_ads_description",
  "language": "en"
}

Result & documentation

Machine-readable documentation of this hub

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

More endpoints in this hub

All endpoints in this hub →