Đếm số từ, ký tự & thời gian đọc online miễn phí
Đếm số từ, ký tự, câu, đoạn và dòng; ước tính thời gian đọc và thời gian nói; liệt kê các từ xuất hiện nhiều nhất trong văn bản.
Kết quả
Bấm “Chạy” để xem kết quả.
Gửi text (trường JSON hoặc form, hoặc body văn bản thô) để nhận thống kê: characters (số ký tự Unicode), characters_no_spaces, bytes_utf8, words, unique_words, sentences, paragraphs, lines và average_word_length. Từ được nhận diện theo chữ cái và chữ số Unicode, nên văn bản tiếng Việt có dấu được đếm chính xác.
reading_time_seconds được tính theo tốc độ wpm từ mỗi phút (mặc định 230, từ 50 đến 1000), còn speaking_time_seconds theo 150 từ mỗi phút. top_words liệt kê các từ dài hơn 2 ký tự xuất hiện nhiều nhất (không phân biệt hoa thường); đặt top từ 0 đến 100 (mặc định 10).
Văn bản tối đa 2.000.000 ký tự (body request tối đa 5 MB).
Dùng trong code của bạn
curl -X POST "https://apibox.io.vn/v1/text-stats" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"APIBox offers small developer APIs. They run on Cloudflare Workers!\n\nEach API is fast and simple. APIs are easy to use.","top":5}'const res = await fetch('https://apibox.io.vn/v1/text-stats', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"text": "APIBox offers small developer APIs. They run on Cloudflare Workers!\n\nEach API is fast and simple. APIs are easy to use.",
"top": 5
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/text-stats",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"text": "APIBox offers small developer APIs. They run on Cloudflare Workers!\n\nEach API is fast and simple. APIs are easy to use.", "top": 5},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/text-stats');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"text":"APIBox offers small developer APIs. They run on Cloudflare Workers!\\n\\nEach API is fast and simple. APIs are easy to use.","top":5}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Tài liệu API → Nhận API key miễn phí
Hỏi đáp
Thời gian đọc được tính thế nào?
Lấy số từ chia cho tốc độ đọc, mặc định 230 từ mỗi phút, làm tròn lên theo giây. Thay đổi bằng tham số wpm.
Có đếm đúng từ tiếng Việt không?
Có. Từ là chuỗi chữ cái và chữ số Unicode, nên các ký tự có dấu vẫn thuộc cùng một từ.
Các từ phổ biến như "và", "là" có bị loại khỏi top words không?
Chỉ các từ 1 hoặc 2 ký tự bị loại; không có danh sách stop word nên những từ thông dụng dài hơn vẫn có thể xuất hiện.