apyhub
Back
▣ 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*
The text to analyze
Reading speed for the time estimate (default 200)

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

ParameterTypeDescription
textStringThe text to analyze.
wpmIntegerReading 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.

ParameterTypeDescription
countsObjectText statistics.
Includes words, sentences, syllables, characters, unique_words, and characters_no_spaces as integer fields.
counts.wordsIntegerNumber of words.
counts.sentencesIntegerNumber of sentences.
counts.syllablesIntegerNumber of syllables.
counts.charactersIntegerNumber of characters.
counts.unique_wordsIntegerNumber of unique words.
counts.characters_no_spacesIntegerNumber of characters excluding spaces.
averagesObjectAverages derived from the submitted text.
Includes syllables_per_word, words_per_sentence, and characters_per_word as number fields.
averages.syllables_per_wordNumberSyllables per word.
averages.words_per_sentenceNumberWords per sentence.
averages.characters_per_wordNumberCharacters per word.
readabilityObjectReadability metrics.
Includes interpretation, flesch_reading_ease, and flesch_kincaid_grade.
readability.interpretationStringReadability interpretation.
readability.flesch_reading_easeNumberFlesch Reading Ease score.
readability.flesch_kincaid_gradeNumberFlesch-Kincaid grade level.
top_keywordsObject ArrayArray of keyword objects.
Each item includes word and count.
top_keywords[].wordStringKeyword text.
top_keywords[].countIntegerNumber of occurrences for the keyword.
time_estimatesObjectEstimated times based on the analyzed text.
Includes reading_seconds and speaking_seconds as number fields.
time_estimates.reading_secondsNumberEstimated reading time in seconds.
time_estimates.speaking_secondsNumberEstimated speaking time in seconds.
▣ 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.