# Word and character counter

Count characters, words, lines, sentences, paragraphs and UTF-8 bytes in a text.

- Endpoint: `POST https://setget.net/v1/tools/text-count` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `text-count`
- Page: https://setget.net/tools/text-count

## Inputs

- `text` (required, string): The text to count.

## Example 1

```json
{"input":{"text":"Hello world. How are you?\n\nFine, thanks!"}}
```

Result:

```json
{"characters":40,"characters_no_spaces":33,"words":7,"lines":3,"sentences":3,"paragraphs":2,"bytes":40}
```

## Example 2: Accented letters take two bytes

```json
{"input":{"text":"naïve café"}}
```

Result:

```json
{"characters":10,"characters_no_spaces":9,"words":2,"lines":1,"sentences":1,"paragraphs":1,"bytes":12}
```

**Why are characters and bytes different?** Letters outside basic English take two to four bytes in UTF-8. An emoji is usually one or two characters but four or more bytes.

**What is a word here?** Any run of characters between spaces or line breaks. "well-known" is one word.

**How are sentences counted?** By full stops, question marks and exclamation marks followed by a space. Abbreviations such as "Dr. Smith" can add an extra sentence.
