Website Word Counter API
Information
The Website Word Counter API allows you to count the words on a website. This tool also works with websites, that rely on Javascript to load their content.
Endpoint
Request body
Note: The request can take quite some time, depending on how fast the website you enter loads.
To use the API you must provide the following data as JSON inside the body:
{
url: "https://witzdam.com"
}
Responses
Here’s a list of all the responses you can get and an explanation for each of them.
Success
You can expect this response, when a valid URL is entered.
{
status: "ok",
data: {
"visible_words": 120,
"total_words": 122,
"top_words": [{
"word": "Tim",
"count": 4
},
{
"word": "for",
"count": 3
}
]
}
}
Error
When a request fails for different reasons, you’ll generally receive a status: "error"
with a message attatched.
Possible errors are:
Some unexpected error
This means, that something internally went wrong. This probably isn’t your fault. Please contact me when this happens ([email protected]).
{
status: "error",
message: "Something went wrong"
}
Invalid data provided
This happens, when you send invalid data inside the body. You can get one of these 3 responses:
{
status: "error",
message: "Invalid URL provided" // Syntax check failed
}
{
status: "error",
message: "No URL provided in request" // URL missing inside request body
}
{
status: "error",
message: "No data provided in request" // Request body is empty
}
Request limit
This endpoint is limited to 100 requests per hour
.