apyhub
Back
DEVELOPER TOOLS · SMART GENERATION

Correct Text Spelling API

What it does

The Correct Text Spelling API is a spelling correction API that finds misspelled words in a piece of text and fixes them. Send a short text and get back the corrected version, together with a list of every word that was wrong and what it was changed to.

It is one POST endpoint with a single text field, and the answer comes back in the same request. The response has three parts: original with the text you sent, corrected with the fixed text, and misspelled, an object that maps each wrong word to its correction. Sending Ths is a smple sentence. returns This is a simple sentence., with Ths mapped to This and smple mapped to simple.

Because you get both the corrected text and the individual changes, you can auto-correct text in the background or show each fix to the user so they can accept or ignore it. Input is limited to 512 characters, so it is built for short text: form fields, chat and support messages, search queries, comments, product titles and reviews.

If you only want suggestions without changing the text, use the Check Spelling API. For longer text, or to fix grammar as well as spelling, use the Proofread Text and Grammar Check API. To screen the same messages for offensive language, pair it with the CheckText Profanity API or the Detect Text Toxicity API, and to show users exactly what changed between two versions, use the Differentiate Text API.

You can try it right here in the playground. Start for free with 5 API calls a day, no card required, and check your own text before you commit.

The API is also available through ApyHub MCP, so AI agents can correct spelling directly before they store or send text.

POST
Detect misspelled words and return a corrected version of the text
https://api.eu.apyhub.com/dosvak/spellcheck-text

QUICKSTART

GUIDE

Quickstart

Send a short piece of text to check and correct its spelling.

curl -X POST "https://api.eu.apyhub.com/dosvak/spellcheck-text" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text":"Ths is a smple sentence."}'

What you'll get back

Returns a JSON object with original and corrected string fields, plus a misspelled object that maps each misspelled word to its correction.

{
  "original": "Ths is a smple sentence.",
  "corrected": "This is a simple sentence.",
  "misspelled": {
    "Ths": "This",
    "smple": "simple"
  }
}
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*
Input text. Maximum length: 512 characters.

About this endpoint

What it does

Detects misspelled words in the submitted text and returns the original text, a corrected version, and a mapping of misspelled terms to their corrections.

Request Body

ParameterTypeMandatoryDescription
textStringYesInput text. Maximum length: 512 characters.

Response

Returns a JSON object with three top-level fields: original and corrected as strings, and misspelled as an object mapping string keys to string values.

ParameterTypeMandatoryDescription
originalStringNoThe original input text.
correctedStringNoThe corrected version of the text.
misspelledObjectNoAn object whose additional properties are strings, representing misspelled words and their corresponding corrections.

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.