# 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](/api-reference/overview.md#api-endpoint).

### 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         | <p>JSON only. When <code>true</code>, shortens JSON keys to reduce payload size.<br>See <a href="/pages/VXTsQ0sY5BFRLUsqxnbL#boolean-parameter-values">boolean parameters</a>.</p> |

See [Overview](/api-reference/overview.md#common-parameters) for details.

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

<table><thead><tr><th width="187">Parameter</th><th>Possible values</th><th width="187">Default value</th><th>Description</th></tr></thead><tbody><tr><td>cmd</td><td><ul><li>check</li></ul></td><td></td><td>Command name for checking text for all types of writing errors.</td></tr><tr><td>lang</td><td><ul><li><a href="/pages/GUZ6cksYHij4R1JW5Nhz">Supported languages</a> (e.g. en_US)</li></ul></td><td>auto</td><td>A short code of a language which will be used for check.</td></tr><tr><td>tokens</td><td><ul><li>Array of strings, e.g. ["This is a sentence number 1.", "This is a sentence number 2."]</li></ul></td><td><br></td><td><p>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.</p><p>You can use either <strong>tokens</strong> or <strong>text</strong> at a time in a request.</p></td></tr><tr><td>text</td><td><ul><li>plain text</li></ul></td><td><br></td><td><p>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.</p><p>Avoid using # and &#x26; symbols in the text.</p></td></tr><tr><td>user_dictionary</td><td><ul><li>user dictionary name (e.g. testdict)</li></ul></td><td><br></td><td>A user dictionary name which will be used during spell checking.</td></tr><tr><td>user_wordlist</td><td><ul><li>additional wordlist</li></ul></td><td><br></td><td>The list of additional comma-separated words which will be used for spell checking.</td></tr><tr><td>custom_dictionary</td><td><ul><li>custom dictionary IDs (e.g. 100694)</li></ul></td><td><p><br>For Cloud: list of all dictionaries</p><p><br>For self-hosted: empty list</p></td><td><p>Global custom dictionary ID(s) which can be used during spell checking.</p><p>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 <a href="/pages/Q6el9DcFxN8tyjXNHZkQ"><strong>Cloud</strong></a> or <a href="/pages/QZaTeyhvOZoa75dlfTAM"><strong>Server</strong></a> guides respectively.</p></td></tr><tr><td>ignore_all_caps</td><td><ul><li>0 – Do not ignore all words written in capital letters (e.g. UPPERCASE).</li><li>1 – Ignore all words written in capital letters.</li></ul></td><td>0</td><td>Ignore capitalized words.</td></tr><tr><td>ignore_words_with_numbers</td><td><ul><li>0 – Do not ignore words that contain numbers (e.g. Number1).</li><li>1 – Ignore words that contain numbers.</li></ul></td><td>0</td><td>Ignore words containing numbers.</td></tr><tr><td>ignore_mixed_case</td><td><ul><li>0 – Do not ignore words with mixed case letters (e.g. MixedCase).</li><li>1 – Ignore words with mixed case letters.</li></ul></td><td>0</td><td>Ignore words written with mixed case letters.</td></tr><tr><td>ignore_domain_names</td><td><ul><li>0 – Do not ignore web addresses that start with either “www”, “http:” or “https:” and end with a domain name.</li><li>1 – Ignore web addresses and domain names.</li></ul></td><td>0</td><td>Ignore domain names, web addresses.</td></tr><tr><td>min_word_length</td><td><ul><li>minimal number of letters in a word to be checked</li></ul></td><td>3</td><td>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.</td></tr><tr><td>disable_spelling</td><td><ul><li>true</li><li>false</li></ul></td><td>false</td><td>Disable the check text for spelling errors.<br>See <a href="/pages/VXTsQ0sY5BFRLUsqxnbL#boolean-parameter-values">boolean parameters</a>.</td></tr><tr><td>disable_grammar</td><td><ul><li>true</li><li>false</li></ul></td><td>false<br></td><td>Disable the check text for grammar and style problems.<br>See <a href="/pages/VXTsQ0sY5BFRLUsqxnbL#boolean-parameter-values">boolean parameters</a>.</td></tr><tr><td>disable_style_guide</td><td><ul><li>true</li><li>false</li></ul></td><td>false</td><td>Disabling style guide functionality.<br>See <a href="/pages/VXTsQ0sY5BFRLUsqxnbL#boolean-parameter-values">boolean parameters</a>.</td></tr><tr><td>auto_lang_priorities</td><td>{"en":"en_US", "es":"es_ES"}</td><td><br><br></td><td>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.</td></tr><tr><td>disabled_rules</td><td><ul><li>JSON array</li></ul></td><td>[]<br></td><td>Disabling specific grammar rules IDs.</td></tr><tr><td>disabled_categories</td><td><ul><li>JSON array</li></ul></td><td>[]</td><td>Disabling specific grammar rules categories.</td></tr><tr><td>check_kit</td><td><ul><li>ai</li><li>ai_lt</li><li>lt_hs</li><li>ai_lt_hs0</li><li>ai_lt_hs1</li></ul></td><td>Depends on service default configuration</td><td><p>Enable special engine combinations:</p><ul><li><code>ai</code> AI engine</li><li><code>lt</code> LanguageTool</li><li><code>hs</code> Hunspell</li><li><code>0</code> and <code>1</code> — applicable to Hunspell only; <code>0</code> means without suggestions, <code>1</code> means with suggestions</li></ul><p><strong>Example:</strong> <code>ai_lt_hs1</code> means use AI, LanguageTool, and Hunspell with suggestions for the request.</p></td></tr><tr><td>enforce_ai</td><td><ul><li>true</li><li>false</li></ul></td><td>false</td><td>To replace the classic algorithmic engines with an AI-powered engine. It only works along with languages which supported AI.</td></tr><tr><td>enable_style_guide_collections</td><td><ul><li>JSON array</li></ul></td><td><code>[]</code></td><td>Enable specific client collections for check action.<br><br>Accepts both collection and category value.<br><br>All the clients collections are enabled if parameter is not provided.<br><br>Example: <code>enable_style_guide_collections=["MY_COLLECTION_IN_THE_CATEGORY_FORMAT","My Collection in the Collection format"]</code></td></tr></tbody></table>

#### Response Structure <a href="#checksommand-responsestructure" id="checksommand-responsestructure"></a>

The **result** is an array of objects which contains matches, where **matches** is also an array of objects consisting of attribute-value pairs.

The table below represents the following attribute-value pairs:

<table data-header-hidden><thead><tr><th width="158"></th><th width="139.99993896484375"></th><th width="138.39990234375"></th><th></th></tr></thead><tbody><tr><td>Attribute</td><td>Type</td><td>Value</td><td>Description</td></tr><tr><td><strong>type</strong></td><td>string</td><td><ul><li>spelling</li><li>grammar</li><li>style</li></ul></td><td>Type of the match found.</td></tr><tr><td><strong>offset</strong></td><td>unsigned number</td><td><br></td><td>Start position of a match found in a sentence/text.</td></tr><tr><td><strong>length</strong></td><td>unsigned number</td><td><br></td><td>The length of the match.</td></tr><tr><td><strong>ud</strong></td><td>boolean</td><td><ul><li>true</li><li>false</li></ul></td><td>True if a misspelled word is present in a user dictionary.</td></tr><tr><td><strong>url</strong></td><td>boolean</td><td><ul><li>true</li><li>false</li></ul></td><td>True if match is a part of the URL/URI.</td></tr><tr><td><strong>suggestions</strong></td><td>array of strings</td><td><br></td><td>Suggested corrections for spelling, grammar or style problem.</td></tr><tr><td><strong>rule</strong></td><td>string</td><td><br></td><td>A short description of the match by rule; available only for type 'grammar'.</td></tr><tr><td><strong>message</strong></td><td>string</td><td><br></td><td>Description of the problem; available only for type 'grammar'.</td></tr><tr><td><strong>probability</strong></td><td>float number</td><td>between 0.0 and 1.0</td><td>Probability of the match.</td></tr></tbody></table>

Type: Spelling

```json
{
    "result": [
        {
            "matches": [
                {
                    "type": "spelling",
                    "offset": X,
                    "length": Y,
					          "ud": true,
					          "probability": 1.0,
                    "suggestions": ["..."]
                }
            ]
        }
    ]
}
```

Type: Grammar

```json
{
    "result": [
        {
            "matches": [
                {
                    "type": "grammar",
                    "offset": X,
                    "length": Y,
                    "rule": "...",
                    "message": "...",
                    "probability": 0.Z
                    "suggestions": ["..."]
                }
            ]
        }
    ]
}
```

#### Example 1.1 \[GET]: Check request for American English text with all available check types (output in JSON) <a href="#checksommand-example1.1-get-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinjso" id="checksommand-example1.1-get-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinjso"></a>

Request URL (GET):

```
https://svc.webspellchecker.net/api?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id]
```

```
http(s)://server_entry_point/?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json
```

**Parameters:**

* Command: *check*
* Text: *this* sample *text demonstrates the work of the Web API service.*
* Language: *en\_US*
* Format: *json*

**Request response:**

```json
{
  "result": [
    {
      "matches": [
        {
          "type": "grammar",
          "offset": 0,
          "length": 4,
          "message": "",
          "rule": "14766687526281413077",
          "description": "",
          "category": "",
          "probability": 0.9970703125,
          "suggestions": [
            "This"
          ]
        },
        {
          "type": "spelling",
          "offset": 5,
          "length": 5,
          "message": "Spelling mistake",
          "rule": "14551130629728879226",
          "probability": 0.9970703125,
          "suggestions": [
            "sample"
          ]
        }
      ]
    }
  ]
}
```

#### Example 1.2 \[GET]: Check request for American English text with all available check types (output in XML) <a href="#checksommand-example1.2-get-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinxml" id="checksommand-example1.2-get-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinxml"></a>

Request URL (GET):

```
https://svc.webspellchecker.net/api?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=xml&customerid=[your-service-id]
```

```
http(s)://server_entry_point/?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=xml
```

**Parameters:**

* Command: *check*
* Text: *this sampl text demonstrates the work of the Web API service.*
* Language: *en\_US*
* Format: *xml*

**Request response:**

```xml
<result>
	<result>
		<matches>
			<matches>
				<type>grammar</type>
				<offset>0</offset>
				<length>4</length>
				<message/>
				<rule>14766687526281413077</rule>
				<description/>
				<category/>
				<probability>0.99707</probability>
				<suggestions>
					<suggestions>This</suggestions>
				</suggestions>
			</matches>
			<type>spelling</type>
			<offset>5</offset>
			<length>5</length>
			<message>Spelling mistake</message>
			<rule>14551130629728879226</rule>
			<probability>0.99707</probability>
			<suggestions>
				<suggestions>sample</suggestions>
			</suggestions>
		</matches>
	</result>
</result>
```

#### Example 1.3 \[GET]: Check request for American English text as two tokens with all available check types (output in JSON) <a href="#checksommand-example1.3-get-checkrequestforamericanenglishtextastwotokenswithallavailablechecktypes" id="checksommand-example1.3-get-checkrequestforamericanenglishtextastwotokenswithallavailablechecktypes"></a>

Request URL (GET):

```
https://svc.webspellchecker.net/api?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&customerid=[your-service-id]
```

```
http(s)://server_entry_point/?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US
```

**Parameters:**

* Command: *check*
* Tokens: *\["this sampl text.", " It demonstrate the work of the Web API service."]*
* Language: *en\_US*
* Format: *json*

**Request response:**

```json
{
  "result": [
    {
      "matches": [
        {
          "type": "grammar",
          "offset": 0,
          "length": 4,
          "message": "This sentence does not start with an uppercase letter.",
          "rule": "UPPERCASE_SENTENCE_START",
          "description": "Checks that a sentence starts with an uppercase letter",
          "category": "CASING",
          "probability": 1.0,
          "suggestions": [
            "This"
          ]
        },
        {
          "type": "spelling",
          "offset": 5,
          "length": 5,
          "message": "Spelling mistake",
          "rule": "14551130629728879226",
          "probability": 0.943359375,
          "suggestions": [
            "sample"
          ]
        }
      ]
    },
    {
      "matches": [
        {
          "type": "grammar",
          "offset": 4,
          "length": 11,
          "message": "",
          "rule": "11156818907134265203",
          "description": "",
          "category": "",
          "probability": 0.90234375,
          "suggestions": [
            "demonstrated"
          ]
        }
      ]
    }
  ]
}
```

#### Example 1.4 \[GET]: Check request for American English text as two tokens with all available check types and shortened response (output in JSON) <a href="#checksommand-example1.4-get-checkrequestforamericanenglishtextastwotokenswithallavailablechecktypesa" id="checksommand-example1.4-get-checkrequestforamericanenglishtextastwotokenswithallavailablechecktypesa"></a>

Request URL (GET):

```
https://svc.webspellchecker.net/api?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&short_answer=true&customerid=[your-service-id]
```

```
http(s)://server_entry_point/?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&short_answer=true
```

**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:**

```json
{
  "r": [
    {
      "m": [
        {
          "t": "grammar",
          "o": 0,
          "l": 4,
          "m": "This sentence does not start with an uppercase letter.",
          "r": "UPPERCASE_SENTENCE_START",
          "d": "Checks that a sentence starts with an uppercase letter",
          "c": "CASING",
          "p": 1.0,
          "s": [
            "This"
          ]
        },
        {
          "t": "spelling",
          "o": 5,
          "l": 5,
          "m": "Spelling mistake",
          "r": "14551130629728879226",
          "p": 0.9576822519302368,
          "s": [
            "sample"
          ]
        }
      ]
    },
    {
      "m": [
        {
          "t": "grammar",
          "o": 4,
          "l": 11,
          "m": "",
          "r": "11156818907134265203",
          "d": "",
          "c": "",
          "p": 0.9033203125,
          "s": [
            "demonstrated"
          ]
        }
      ]
    }
  ]
}
```

#### Example 1.5 \[POST]: Check request for American English text with all available check types (output in JSON) <a href="#checksommand-example1.4-post-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinjs" id="checksommand-example1.4-post-checkrequestforamericanenglishtextwithallavailablechecktypes-outputinjs"></a>

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

Request URL (POST):

```
https://svc.webspellchecker.net/api?
```

```
http(s)://server_entry_point/?
```

Body (Raw):

```
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id]
```

**Request response:**

```json
{
  "result": [
    {
      "matches": [
        {
          "type": "grammar",
          "offset": 0,
          "length": 4,
          "message": "",
          "rule": "14766687526281413077",
          "description": "",
          "category": "",
          "probability": 0.9970703125,
          "suggestions": [
            "This"
          ]
        },
        {
          "type": "spelling",
          "offset": 5,
          "length": 5,
          "message": "Spelling mistake",
          "rule": "14551130629728879226",
          "probability": 0.9970703125,
          "suggestions": [
            "sample"
          ]
        }
      ]
    }
  ]
}
```

#### Example 1.6 \[POST]: Check request for text with the auto-detected language (output in JSON) <a href="#checksommand-example1.5-post-checkrequestfortextwiththeauto-detectedlanguage-outputinjson" id="checksommand-example1.5-post-checkrequestfortextwiththeauto-detectedlanguage-outputinjson"></a>

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):

{% tabs %}
{% tab title="JSON" %}

```json
{
  "cmd": "check",
  "text": "this sampl text demonstrates the work of the Web API service.",
  "lang": "auto",
  "format": "json",
  "serviceid": "[your-service-id]",
  "auto_lang_priorities": {
    "en": "en_GB"
  }
}
```

{% endtab %}

{% tab title="Raw" %}

```json
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=auto&format=json&serviceid=[your-service-id]&auto_lang_priorities={"en":"en_AI"}
{

}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/api-reference/check-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
