apyhub
Back

Text Analysis & Comparison API

What it does

Text Analysis API helps you measure readability, compare strings, and check basic document formatting from plain text inputs. Send text and get structured results back for writing analysis, review workflows, or content QA.

Use /text/readability to submit a text string and receive readability scores including fleschReadingEase, fleschKincaidGrade, avgWordsPerSentence, avgSyllablesPerWord, wordCount, sentenceCount, and an interpretation. That makes it useful when you need to flag hard-to-read content, tune copy for a target audience, or track whether edits made writing simpler.

Use /text/similarity to compare two strings, a and b, and get distance, ratio, and percent similarity. The output is suited to duplicate detection, change checks, or quick editorial comparison when you need a numeric measure of how close two passages are.

Use /security/diff to compare textA and textB line by line. It returns added, removed, equal, and a lines array with each line marked as equal, add, or remove, plus line numbers where available. Use /text/paper-format to check a text string for words, paragraphCount, hasTitleLikeHeading, hasDoubleSpacingHint, and notes when you need a lightweight formatting review.

▣ ENDPOINT 01 / 04
POST
Readability Score (Flesch)
https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/readability

QUICKSTART

GUIDE

Quickstart

Send a text sample to get a readability analysis.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/readability" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick brown fox jumps over the lazy dog. This short paragraph is easy to read."}'

What you'll get back

The live response to the request above:

{
  "tool": "Reading level checker client and server side from freedailypro",
  "result": {
    "fleschReadingEase": 87.7,
    "fleschKincaidGrade": 3,
    "avgWordsPerSentence": 8,
    "avgSyllablesPerWord": 1.31,
    "wordCount": 16,
    "sentenceCount": 2,
    "interpretation": "Easy (6th grade)"
  }
}
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*

About this endpoint

What it does

Scores how easy a piece of English text is to read. It returns the Flesch Reading Ease score (higher is easier), the Flesch–Kincaid grade level, average words per sentence, average syllables per word, word and sentence counts, and a plain-language reading level such as "Very Easy (5th grade)". Use it to check content for a target audience before publishing.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to analyze for readability.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
resultObjectReadability scores.
result.fleschReadingEaseNumberFlesch Reading Ease score; higher is easier to read.
result.fleschKincaidGradeNumberFlesch–Kincaid US school grade level.
result.avgWordsPerSentenceNumberAverage number of words per sentence.
result.avgSyllablesPerWordNumberAverage number of syllables per word.
result.wordCountNumberNumber of words.
result.sentenceCountNumberNumber of sentences.
result.interpretationStringPlain-language reading level.
▣ ENDPOINT 02 / 04
POST
Text Similarity & Edit Distance
https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/similarity

QUICKSTART

GUIDE

Quickstart

Compare two text strings by sending them as a and b.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/similarity" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"a":"Machine learning is fun.","b":"Machine learning is enjoyable."}'

What you'll get back

The live response to the request above:

{
  "tool": "Text similarity client and server side from freedailypro",
  "result": {
    "distance": 9,
    "ratio": 0.7,
    "percent": 70
  }
}
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*

About this endpoint

What it does

Compares two strings and returns the edit distance (the number of single-character changes needed to turn one into the other) and how similar they are as a ratio and a percentage. The comparison is case-sensitive. Use it for fuzzy matching, typo detection and finding duplicate entries.

Request Body

ParameterTypeMandatoryDescription
aStringYesThe first input string to compare.
bStringYesThe second input string to compare.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
resultObjectSimilarity between the two strings.
result.distanceNumberLevenshtein distance: the number of single-character edits needed to turn a into b.
result.ratioNumberSimilarity from 0 to 1, where 1 means identical.
result.percentNumberSimilarity as a percentage.
▣ ENDPOINT 03 / 04
POST
Line-by-Line Text Diff
https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/security/diff

QUICKSTART

GUIDE

Quickstart

Compare two text inputs for a security diff by sending both strings in a JSON body.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/security/diff" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "textA": "The system stores customer data in a database.",
    "textB": "The system stores customer data in an encrypted database."
  }'

What you'll get back

The live response to the request above:

{
  "tool": "Diff checker client and server side from freedailypro",
  "result": {
    "lines": [
      {
        "type": "add",
        "line": "The system stores customer data in an encrypted database.",
        "lineNumberB": 1
      },
      {
        "type": "remove",
        "line": "The system stores customer data in a database.",
        "lineNumberA": 1
      }
    ],
    "added": 1,
    "removed": 1,
    "equal": 0
  }
}
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*

About this endpoint

What it does

Compares two texts line by line, like a code diff. Each line is marked as equal, add (only in textB) or remove (only in textA), with its line numbers, and the response includes totals for added, removed and unchanged lines. Use it to compare document versions, config files or content changes.

Request Body

ParameterTypeMandatoryDescription
textAStringYesThe first text to compare.
textBStringYesThe second text to compare.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
resultObjectLine-by-line comparison.
result.linesArray of ObjectEvery line from both texts, in order.
result.lines[].typeStringequal, add (only in textB) or remove (only in textA).
result.lines[].lineStringThe line content.
result.lines[].lineNumberBNumberLine number in textB. Absent for remove lines.
result.lines[].lineNumberANumberLine number in textA. Absent for add lines.
result.addedNumberNumber of added lines.
result.removedNumberNumber of removed lines.
result.equalNumberNumber of unchanged lines.
▣ ENDPOINT 04 / 04
POST
Paper Formatting Checker
https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/paper-format

QUICKSTART

GUIDE

Quickstart

Send the text you want checked for paper-format issues in a single JSON body.

curl -X POST "https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/paper-format" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"This is a sample academic paragraph for format checking."}'

What you'll get back

The live response to the request above:

{
  "tool": "Paper format checker client and server side from freedailypro",
  "result": {
    "words": 9,
    "hasTitleLikeHeading": true,
    "hasDoubleSpacingHint": false,
    "paragraphCount": 1,
    "notes": [
      "Heuristic only — not a full APA/MLA layout engine."
    ]
  }
}
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*

About this endpoint

What it does

Runs a quick heuristic check on a text's paper formatting: word count, paragraph count, title-like heading and double spacing. It is not a full APA/MLA validator.

Request Body

ParameterTypeMandatoryDescription
textStringYesThe text to analyze.

Response

A successful call returns a JSON object with these fields:

ParameterTypeDescription
toolStringName of the tool that produced the response.
resultObjectFormatting checks.
result.wordsNumberNumber of words.
result.hasTitleLikeHeadingBooleantrue if the text starts with a title-like heading.
result.hasDoubleSpacingHintBooleantrue if the text appears to use double spacing.
result.paragraphCountNumberNumber of paragraphs.
result.notesArray of StringNotes about the check.
▣ 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.