Command name: check_spelling

Here is a list of all possible parameters and values that can be used with the check_spelling command.

#ParameterPossible ValuesDefault ValueDescription
1format
  • json
  • xml
jsonThe response format for output data.
2callback
  • callback function name

A callback function name that will be used to manipulate with the JSON data received from the server. Such approach enables sharing of data bypassing same-origin policy. It can be used only along with “format=json”.
3out_type
  • positions – Return positions and length of misspelled words in a given text and their suggestions.
  • words – Return misspelled words and their suggestions.
wordsA type of data output specifying the way to return misspelled words positions in the provided text or exact words.
4ignore_all_caps
  • 0 – Do not ignore all words written in capital letters (e.g. UPPERCASE). 
  • 1 – Ignore all words written in capital letters.
0Ignore capitalized words.
5ignore_words_with_numbers
  • 0 – Do not ignore words that contain numbers (e.g. Number1).
  • 1 – Ignore words that contain numbers.
0Ignore words containing numbers.
6ignore_mixed_case
  • 0 – Do not ignore words with mixed case letters (e.g. MixedCase).
  • 1 – Ignore words with mixed case letters.
0Ignore words written with mixed case letters.
7ignore_domain_names
  • 0 – Do not ignore web addresses that start with either “www”, “http:” or “https:” and end with a domain name.
  • 1 – Ignore web addresses and domain names.
0Ignore domain names, web addresses.
8text
  • plain text

A piece of text which will be sent for check. The text has to be in the UTF-8 encoding. Any found tags in the text will be interpreted as a plan text as well. 

Avoid using # and & symbols in the text.

9slangen_USA short code of a language which will be used for spell checking.
10user_dictionary
  • user dictionary name (e.g. testdict)

A user dictionary name which will be used during spell checking.
11user_wordlist
  • additional wordlist

The list of additional comma-separated words which will be used for spell checking.
12custom_dictionary
  • custom dictionary IDs (e.g. 100694)

Global custom dictionary ID(s) which can be used during spell checking.

Each new Dictionary on the creation obtains its unique Dictionary ID. Depending on the type of the version of product you are using, refer to Cloud or Server guides respectively.

13version1.01.0The version of Web API.
14customerid
  • your-service-id value

A special service ID value (activation key) that has to be passed to a request query. It's obtained upon subscription to the Cloud services (paid or trial).

Applicable only for the Cloud version.

Example 2.1 [GET]: Check spelling request (Output in XML)

Request URL (GET): 
https://svc.webspellchecker.net/api?cmd=check_spelling&format=xml&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]

Parameters:

  • Command: check_spelling
  • Format:  xml
  • Text: This sampl text demonstrates the work of the WebSpellChecker Web API service.
  • Output: words
  • Language: en_US

Request response:

<?xml version="1.0" encoding="utf-8"?>
<check_spelling>
    <misspelling>
        <word>sampl</word>
        <ud>false</ud>
        <suggestions>
            <suggestion>sample</suggestion>
            <suggestion>sampled</suggestion>
            <suggestion>sampler</suggestion>
            <suggestion>samples</suggestion>
            <suggestion>ample</suggestion>
            <suggestion>amply</suggestion>
            <suggestion>scamp</suggestion>
            <suggestion>stamp</suggestion>
        </suggestions>
    </misspelling>
</check_spelling>

Example 2.2 [GET]: Check spelling request (Output in JSON)

Request URL (GET): 
https://svc.webspellchecker.net/api?cmd=check_spelling&format=json&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]

Parameters:

  • Command: check_spelling
  • Format: json
  • Text: This sampl text demonstrates the work of the WebSpellChecker Web API service.
  • Output: words
  • Language: en_US

Request response:

[
    {
        "word": "sampl",
        "ud": false,
        "suggestions": [
            "sample",
            "sampled",
            "sampler",
            "samples",
            "ample",
            "amply",
            "scamp",
            "stamp"
        ]
    }
]

Example 2.3 [POST]: Check spelling request (Output in JSON)

Here we use the same request and parameters as described in example above but form it as a POST request.

Request URL (GET): 
https://svc.webspellchecker.net/api?
Body (Raw): 
cmd=check_spelling&format=json&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]

Request response:

[
   {
       "word": "sampl",
       "ud": false,
       "suggestions": [
           "sample",
           "sampled",
           "sampler",
           "samples",
           "ample",
           "amply",
           "scamp",
           "stamp"
       ]
   }
]