NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server

Spell Check API

The Spell Check API checks spelling and provides corrections for any text.

(4.5)

From 3,269 users

2,000+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
194ms223ms277ms601ms1081ms

Didn't find what you were looking for? Suggest an improvement


/v1/spellcheck GET

https://api.api-ninjas.com/v1/spellcheck

Returns spelling corrections and suggestions for any given text.

Parameters

  • text  required

    Input text. Maximum 50 characters for free tier, 500 characters for premium subscribers.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object with the following fields or an error if the request is unsuccessful.

  • original  required

    The original text input.

  • corrected  required

    The corrected text.

  • corrections  required

    An array of corrections for the original text. Each correction contains the following properties:

    • word  required

      The word that was corrected.

    • index  required

      The index of the word in the original text.

    • correction  required

      The corrected word.

    • candidates  required

      An array of possible corrections for the word.

Sample Request Live Demo!

text

Try our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

https://api.api-ninjas.com/v1/spellcheck?text=i am not kiddign

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
{
    original:"i am not kiddign",
    corrected:"i am not kidding",
    corrections:[
      {
        word:"kiddign",
        index:3,
        correction:"kidding",
        candidates:[
          "kidding"
        ]
      }
    ]
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/spellcheck?text=i%20am%20not%20kiddign" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Spell Check API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • It is useful for validating and auto-correcting user input in forms, search boxes, and chat applications, as well as cleaning up text before further processing. It pairs well with the Text Language API for detecting language and the Profanity Filter API for moderating content.
  • The single required text parameter accepts up to 50 characters on the free tier and up to 500 characters for premium subscribers, so longer content must be split into chunks; you can upgrade on the pricing page.
  • The response returns the original input text, the fully corrected text, and a corrections array. Each item in corrections includes the misspelled word, its index in the text, the chosen correction, and a candidates array of possible alternatives; see the error codes page for unsuccessful requests.
  • For each entry in the corrections array, the candidates field provides an array of possible corrections for that word, while correction gives the single best suggestion. To then look up the meaning of a corrected word, you can use the Dictionary API.