---
title: "Text Analysis & Comparison API"
slug: text-analysis-comparison-api
url: https://apyhub.com/freedailypro/service/text-analysis-comparison-api
provider: FreeDailyPro
tags: [text-analysis, readability, text-similarity, diff-checker, text-comparison]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 4
atoms: 10
mcp: true
---

# Text Analysis & Comparison API

Easily score readability and compare texts using the Text Analysis & Comparison API. Get Flesch scores, similarity, line-by-line diffs and format checks.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/readability` | What it does Scores how easy a piece of English text is to read. It returns the Flesch Reading Ease… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/similarity` | What it does Compares two strings and returns the edit distance (the number of single-character cha… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/security/diff` | What it does Compares two texts line by line, like a code diff. Each line is marked as equal, add (… | 10 |
| POST | `https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/paper-format` | What it does Runs a quick heuristic check on a text's paper formatting: word count, paragraph count… | 10 |

## Endpoint reference

### Readability Score (Flesch)

`POST https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/readability` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | body | string | yes |  |

#### Quickstart

Send a text sample to get a readability analysis.

```bash
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:

```json
{
  "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)"
  }
}
```

### Text Similarity & Edit Distance

`POST https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/similarity` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `a` | body | string | yes |  |
| `b` | body | string | yes |  |

#### Quickstart

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

```bash
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:

```json
{
  "tool": "Text similarity client and server side from freedailypro",
  "result": {
    "distance": 9,
    "ratio": 0.7,
    "percent": 70
  }
}
```

### Line-by-Line Text Diff

`POST https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/security/diff` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `textA` | body | string | yes |  |
| `textB` | body | string | yes |  |

#### Quickstart

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

```bash
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:

```json
{
  "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
  }
}
```

### Paper Formatting Checker

`POST https://api.eu.apyhub.com/freedailypro/text-analysis-comparison-api/text/paper-format` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `text` | body | string | yes |  |

#### Quickstart

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

```bash
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:

```json
{
  "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."
    ]
  }
}
```

## About

## 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.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/text-analysis-comparison-api
