Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Check API

The check command combines all available check types (spelling, grammar and style) of text in a single command.

Command name: check

API endpoint

See Overview.

Parameters

These parameters work with any cmd.

Name
Type
Required
Description

serviceid

string

Cloud only

Cloud API key. Required for Cloud requests. Not used on-premises.

format

string

No

Response format. Values: json (default), xml.

callback

string

No

JSONP wrapper function name. Use only with format=json.

short_answer

boolean

No

JSON only. When true, shortens JSON keys to reduce payload size. See boolean parameters.

See Overview for details.

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

Parameter
Possible values
Default value
Description

cmd

  • check

Command name for checking text for all types of writing errors.

lang

auto

A short code of a language which will be used for check.

tokens

  • Array of strings, e.g. ["This is a sentence number 1.", "This is a sentence number 2."]

A piece of text separated in tokens that will be sent for check. The text should be presented as an array of strings. Right now each string is a token which equals one sentence.

You can use either tokens or text at a time in a request.

text

  • 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 plain text as well.

Avoid using # and & symbols in the text.

user_dictionary

  • user dictionary name (e.g. testdict)

A user dictionary name which will be used during spell checking.

user_wordlist

  • additional wordlist

The list of additional comma-separated words which will be used for spell checking.

custom_dictionary

  • custom dictionary IDs (e.g. 100694)

For Cloud: list of all dictionaries

For self-hosted: empty list

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.

ignore_all_caps

  • 0 – Do not ignore all words written in capital letters (e.g. UPPERCASE).

  • 1 – Ignore all words written in capital letters.

0

Ignore capitalized words.

ignore_words_with_numbers

  • 0 – Do not ignore words that contain numbers (e.g. Number1).

  • 1 – Ignore words that contain numbers.

0

Ignore words containing numbers.

ignore_mixed_case

  • 0 – Do not ignore words with mixed case letters (e.g. MixedCase).

  • 1 – Ignore words with mixed case letters.

0

Ignore words written with mixed case letters.

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

0

Ignore domain names, web addresses.

min_word_length

  • minimal number of letters in a word to be checked

3

The minimal number of letters in the word which will be checked for spelling. E.g. if 3 is specified, the words with 2 letters and less will be ignored.

disable_spelling

  • true

  • false

false

Disable the check text for spelling errors. See boolean parameters.

disable_grammar

  • true

  • false

false

Disable the check text for grammar and style problems. See boolean parameters.

disable_style_guide

  • true

  • false

false

Disabling style guide functionality. See boolean parameters.

auto_lang_priorities

{"en":"en_US", "es":"es_ES"}

Priority of language dialect for auto-detected language code. For example, auto-detect returns "en", then American English will be used as a language for check.

disabled_rules

  • JSON array

[]

Disabling specific grammar rules IDs.

disabled_categories

  • JSON array

[]

Disabling specific grammar rules categories.

check_kit

  • ai

  • ai_lt

  • lt_hs

  • ai_lt_hs0

  • ai_lt_hs1

Depends on service default configuration

Enable special engine combinations:

  • ai AI engine

  • lt LanguageTool

  • hs Hunspell

  • 0 and 1 — applicable to Hunspell only; 0 means without suggestions, 1 means with suggestions

Example: ai_lt_hs1 means use AI, LanguageTool, and Hunspell with suggestions for the request.

enforce_ai

  • true

  • false

false

To replace the classic algorithmic engines with an AI-powered engine. It only works along with languages which supported AI.

enable_style_guide_collections

  • JSON array

[]

Enable specific client collections for check action. Accepts both collection and category value. All the clients collections are enabled if parameter is not provided. Example: enable_style_guide_collections=["MY_COLLECTION_IN_THE_CATEGORY_FORMAT","My Collection in the Collection format"]

correct_text

  • true

  • false

false

Add the correctedText field to every sentence in the response. The field contains the sentence with the first suggestion of every match applied. See boolean parameters.

Response structure

The response is an object with these top-level fields:

Field
Type
Description

result

array of objects

One object for each checked sentence. The objects keep the order of the sentences in the request.

warning

string

A message about a problem that did not stop the check. It is present only when the service has something to report.

Each object in result describes one sentence:

Field
Type
Description

matches

array of objects

The problems found in the sentence.

lang

string

The language resolved for the sentence, for example en_US. It is present only when the request uses lang=auto. It is absent when the service cannot resolve a language.

correctedText

string

The sentence with the first suggestion of every match applied. It is present only when the request uses correct_text=true.

Each object in matches has these attribute-value pairs:

Attribute
Type
Value
Description

type

string

spelling, grammar, style

Type of the match found.

offset

unsigned number

Start position of the match in the sentence.

length

unsigned number

Length of the match.

message

string

Description of the problem.

rule

string

Identifier of the rule that produced the match.

description

string

Description of the rule. It can be empty.

category

string

Category of the rule, for example CASING. It can be empty.

ud

boolean

true, false

true if the misspelled word is present in a user dictionary.

url

boolean

true, false

true if the match is a part of a URL or a URI.

probability

float number

between 0.0 and 1.0

Probability of the match.

suggestions

array of strings

Suggested corrections for the match.

A match does not always contain every attribute. The set of attributes depends on the match type and on the engine that produced the match.

Type: Spelling

Type: Grammar

Example 1.1 [GET]: Check request for American English text with all available check types (output in JSON)

Request URL (GET):

Parameters:

  • Command: check

  • Text: this sample text demonstrates the work of the Web API service.

  • Language: en_US

  • Format: json

Request response:

Example 1.2 [GET]: Check request for American English text with all available check types (output in XML)

Request URL (GET):

Parameters:

  • Command: check

  • Text: this sampl text demonstrates the work of the Web API service.

  • Language: en_US

  • Format: xml

Request response:

Example 1.3 [GET]: Check request for American English text as two tokens with all available check types (output in JSON)

Request URL (GET):

Parameters:

  • Command: check

  • Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]

  • Language: en_US

  • Format: json

Request response:

Example 1.4 [GET]: Check request for American English text as two tokens with all available check types and shortened response (output in JSON)

Request URL (GET):

Parameters:

  • Command: check

  • Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]

  • Language: en_US

  • Format: json

  • Short Answer: true

Request response:

Example 1.5 [POST]: Check request for American English text with all available check types (output in JSON)

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

Request URL (POST):

Body (Raw):

Request response:

Example 1.6 [POST]: Check request for text with the auto-detected language (output in JSON)

In this POST type request, we use “auto” as a value for language and define the priorities for the language dialects. If “en” is detected, then British English will be used during check request.

Request body (POST):

Example 1.7 [GET]: Check request with the detected language and the corrected text

This request uses lang=auto, so the response reports the resolved language in lang. It also uses correct_text=true, so the response contains correctedText for the sentence.

Request URL (GET):

Parameters:

  • Command: check

  • Text: This is speling mistake.

  • Language: auto

  • Correct text: true

  • User dictionary: my_dictionary

Request response:

In this example the service cannot read my_dictionary. It reports the problem in warning, completes the check, and returns the result.

Was this helpful?