Score Text API

Score the readability, skimmability, interestingness, and style 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 scored 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.

Every subscore of skimmability, interestingness, and style is a pair of [points reached, points possible]; each main score is 0 to 10. The text may contain HTML, which is used to detect images, headlines, lists, links, and quotes.

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.

GET
https://api.apileague.com/score-text

Parameters

NameExampleDescription
title
s r q
A short storyThe title of the text to score. Title and text travel in the URL together; keep both within the text limit.
text
s r q
A nice short story to be analyzedThe text to score for multiple metrics. It may contain HTML: images, videos, headlines, lists, links, quotes, and highlighted words are detected from the markup. Max 2,000 characters for Latin-script text (title and text together). Because the text travels in the URL, texts in other scripts are limited to about 800 characters.
api-key
s r q
abcd1234Your API key.
Example Request and Response
GET
https://api.apileague.com/score-text?title=A+short+story&text=A+nice+short+story+to+be+analyzed
{
    "number_of_words": 7,
    "number_of_sentences": 1,
    "readability": {
        "mainscores": {
            "total": 10,
            "total_possible": 10
        },
        "subscores": {
            "forcast": -0.99,
            "flesch": 78.873,
            "smog": 8.842,
            "ari": 0.237,
            "lix": -0.99,
            "kincaid": 3.997,
            "fog": 8.514,
            "coleman_liau": 2.633,
            "reading_time_seconds": 1
        }
    },
    "skimmability": {
        "mainscores": {
            "total": 3.076923076923077,
            "total_possible": 10
        },
        "subscores": {
            "highlighted_word_ratio_score": [
                0,
                2
            ],
            "bullet_point_ratio_score": [
                0,
                2
            ],
            "paragraph_headline_ratio_score": [
                0,
                2
            ],
            "image_score": [
                0,
                3
            ],
            "video_score": [
                0,
                1
            ],
            "paragraph_score": [
                4,
                3
            ]
        }
    },
    "interestingness": {
        "mainscores": {
            "total": 3.5714285714285716,
            "total_possible": 10
        },
        "subscores": {
            "google_hits_score": [
                4,
                4
            ],
            "link_score": [
                0,
                2
            ],
            "quote_score": [
                0,
                1
            ],
            "title_rating_score": [
                1,
                4
            ],
            "length_score": [
                0,
                2
            ]
        }
    },
    "style": {
        "mainscores": {
            "total": 10,
            "total_possible": 10
        },
        "subscores": {
            "abbreviation_score": [
                3,
                3
            ],
            "style_score": [
                5,
                5
            ],
            "spelling_score": [
                5,
                5
            ]
        }
    },
    "total_score": 6.662087912087912
}
 Copy Codecurl -X GET 'https://api.apileague.com/score-text?title=A+short+story&text=A+nice+short+story+to+be+analyzed' \ -H 'x-api-key: myapikey'

Headers

Response Headers:

  • Content-Type: application/json
  • X-API-Quota-Request: The number of tokens used by the request
  • X-API-Quota-Used: The number of tokens used in total today
  • X-API-Quota-Left: The number of tokens left today (depends on your plan)

Frequently Asked Questions

What aspects of the text are scored?

The API evaluates readability, skimmability (how easy it is to scan), interestingness, and writing style.

How is "interestingness" measured?

Interestingness is estimated based on factors like vocabulary richness, use of quotes, links, and other engaging elements.

Can it help improve SEO?

Yes, by improving readability and engagement metrics, you can create content that is more likely to keep visitors on your page, which is a positive signal for SEO.

How is the Score Text API different from the Detect Sentiment API?

The Score Text API evaluates the quality, structure, and engagement potential of the text, whereas the Detect Sentiment API analyzes the emotional tone (positive/negative) of the content.

Questions? Need Help? Ask Away

Quotas

Calling this endpoint costs
3 tokens