apyhub
SEO

Basic Text Analysis API

What it does

Text Analysis helps you measure and summarize plain text in one request. Send text, optionally set a reading speed with wpm, and get back word, sentence, syllable, character, and unique-word counts plus readability and timing data.

Use it when you need to score article draft difficulty, estimate how long a passage will take to read or speak, or extract the most common keywords from user-submitted content. The response includes counts, averages, readability, top_keywords, and time_estimates, so you can feed the results straight into content dashboards, editorial workflows, or review systems.

The readability output includes a plain-language interpretation along with Flesch Reading Ease and Flesch-Kincaid Grade values. The timing estimates give you reading and speaking seconds based on the text and your chosen wpm value.

Text Analysis is a good fit anywhere you need quick linguistic statistics without building your own parser or readability calculator.

POST
Analyze text for readability, statistics, reading time, and keywords.
https://api.eu.apyhub.com/creightonnick0/analyze-text

QUICKSTART

GUIDE

Quickstart

Analyze a piece of text by sending it in the request body.

curl -X POST "https://api.eu.apyhub.com/creightonnick0/analyze-text" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick brown fox jumps over the lazy dog."}'

What you'll get back

Returns a JSON object with these top-level fields, as available: counts object, averages object, readability object, top_keywords array, and time_estimates object.

{
  "counts": {
    "words": 9,
    "sentences": 1,
    "syllables": 11,
    "characters": 44,
    "unique_words": 8,
    "characters_no_spaces": 35
  },
  "averages": {
    "syllables_per_word": 1.22,
    "words_per_sentence": 9,
    "characters_per_word": 3.89
  },
  "readability": {
    "interpretation": "Easy to read",
    "flesch_reading_ease": 94.3,
    "flesch_kincaid_grade": 3.1
  },
  "top_keywords": [
    {
      "word": "quick",
      "count": 1
    }
  ],
  "time_estimates": {
    "reading_seconds": 3.0,
    "speaking_seconds": 4.5
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Reading speed for the time estimate (default 200)
The text to analyze

About this endpoint

What it does

Analyzes the submitted text and returns readability metrics, text statistics, keyword counts, and estimated reading/speaking time. You can also provide a words-per-minute value to adjust the reading time estimate.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to analyze.
wpmIntegerNoReading speed for the time estimate. Default: 200.

Response

Returns a JSON object with counts, averages, readability, top_keywords, and time_estimates fields. counts, averages, readability, and time_estimates are objects; top_keywords is an array of objects. Success status code: 200.

ParameterTypeMandatoryDescription
countsObjectNoText statistics.<br>Includes words, sentences, syllables, characters, unique_words, and characters_no_spaces as integer fields.
counts.wordsIntegerNoNumber of words.
counts.sentencesIntegerNoNumber of sentences.
counts.syllablesIntegerNoNumber of syllables.
counts.charactersIntegerNoNumber of characters.
counts.unique_wordsIntegerNoNumber of unique words.
counts.characters_no_spacesIntegerNoNumber of characters excluding spaces.
averagesObjectNoAverages derived from the submitted text.<br>Includes syllables_per_word, words_per_sentence, and characters_per_word as number fields.
averages.syllables_per_wordNumberNoSyllables per word.
averages.words_per_sentenceNumberNoWords per sentence.
averages.characters_per_wordNumberNoCharacters per word.
readabilityObjectNoReadability metrics.<br>Includes interpretation, flesch_reading_ease, and flesch_kincaid_grade.
readability.interpretationStringNoReadability interpretation.
readability.flesch_reading_easeNumberNoFlesch Reading Ease score.
readability.flesch_kincaid_gradeNumberNoFlesch-Kincaid grade level.
top_keywordsObject ArrayNoArray of keyword objects.<br>Each item includes word and count.
top_keywords[].wordStringNoKeyword text.
top_keywords[].countIntegerNoNumber of occurrences for the keyword.
time_estimatesObjectNoEstimated times based on the analyzed text.<br>Includes reading_seconds and speaking_seconds as number fields.
time_estimates.reading_secondsNumberNoEstimated reading time in seconds.
time_estimates.speaking_secondsNumberNoEstimated speaking time in seconds.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.