---
title: "Count lines, words, sentences, paragraphs, characters and more"
method: POST
path: "/count-lines.php"
tags: ["text"]
---

# Count lines, words, sentences, paragraphs, characters and more

`POST /count-lines.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/count-lines.php`
- Auth: none declared

Returns sixteen metrics about a piece of text - total/empty/non-empty/duplicate lines, character count with and without spaces, word count, unique words, longest word, paragraph and sentence counts, line-length statistics, reading and speaking time estimates, and line-ending detection (LF, CRLF, CR).

## Request body

- object
  - `text` string, required: UTF-8 text to analyse. Max 1 MB.

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `413`: Request body or text exceeds 1 MB
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
