Score the readability of a text. The readability score is based on the average length of the sentences and the average length of the words in the text. The text is score with multiple readability scores such as Flesch, Smog, ARI, LIX, Kincaid, Fog, and Coleman Liau.
Additionally, information such as the estimated reading time in seconds is returned.
A readability subscore of -0.99 means the formula could not be computed for the text. FORCAST and LIX are currently not computed and always return -0.99.
| Name | Example | Description |
|---|---|---|
text | A rather complex text, hard to read, and highly convoluted using acronym TERMS. | The text to score for readability. Max 2,000 characters for Latin-script text. Because the text travels in the URL, texts in other scripts are limited to about 800 characters. |
api-key | abcd1234 | Your API key. |
{
"readability": {
"mainscores": {
"total": 10,
"total_possible": 10
},
"subscores": {
"forcast": -0.99,
"flesch": 50.471,
"smog": 11.208,
"ari": 8.258,
"lix": -0.99,
"kincaid": 9.449,
"fog": 11.354,
"coleman_liau": 10.889,
"reading_time_seconds": 3
}
}
} Copy Code
curl -X GET 'https://api.apileague.com/score-readability?text=A+rather+complex+text,+hard+to+read,+and+highly+convoluted+using+acronym+TERMS.' \ -H 'x-api-key: myapikey'
Response Headers:
Content-Type: application/jsonX-API-Quota-Request: The number of tokens used by the requestX-API-Quota-Used: The number of tokens used in total todayX-API-Quota-Left: The number of tokens left today (depends on your plan)The API calculates multiple standard scores including Flesch Reading Ease, Flesch-Kincaid Grade Level, SMOG Index, Coleman-Liau Index, Automated Readability Index (ARI), and more.
Each score has its own scale, but generally, they indicate the difficulty level of the text. For example, a Flesch score of 60-70 is considered standard reading level.
Yes, the API provides an estimated reading time in seconds based on average reading speeds.
The Score Readability API focuses specifically on readability metrics like Flesch-Kincaid, while the Score Text API provides a broader analysis including skimmability, interestingness, and style.