Skip to content

Text Truncate API

POST https://api.findutils.com/api/tools/text-truncate/execute

Truncate text to a maximum number of characters, or of words, optionally cutting at the last word boundary, with a suffix.

Needs an API key. Running a tool needs an API key. Keys are not for sale yet: ask for early access. About API keys

Request body

application/json
  • text

    string required

    Text to truncate.

  • length

    integer optional

    Max characters in output. Defaults to 100. Default 100.

  • suffix

    string optional

    Appended when truncation occurs. Defaults to "...". Default "...".

  • word_boundary

    boolean optional

    Cut at last space before limit. Defaults to true. Ignored when unit is "words". Default true.

  • unit

    string optional

    Whether `length` counts characters or words. Defaults to characters. One of characters · words. Default "characters".

Example arguments

Verified
{
  "text": "hello world",
  "length": 5
}