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

http(s)://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]

Parameters:

Request response:

{
    "result": [
        {
            "matches": [
                {
                    "type": "spelling",
                    "offset": 5,
                    "length": 5,
                    "suggestions": [
                        "sample",
                        "sampled",
                        "sampler",
                        "samples",
                        "ample",
                        "amply",
                        "scamp",
                        "stamp"
                    ]
                },
                {
                    "type": "grammar",
                    "offset": 0,
                    "length": 4,
                    "rule": "UPPERCASE_SENTENCE_START",
                    "message": "This sentence does not start with an uppercase letter",
                    "suggestions": [
                        "This"
                    ]
                }
            ]
        }
    ]
}

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

http(s)://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]

Parameters:

Request response:

<result>
	<result>
		<matches>
			<matches>
				<type>spelling</type>
				<offset>5</offset>
				<length>5</length>
				<suggestions>
					<suggestions>sample</suggestions>
					<suggestions>sampled</suggestions>
					<suggestions>sampler</suggestions>
					<suggestions>samples</suggestions>
					<suggestions>ample</suggestions>
					<suggestions>amply</suggestions>
					<suggestions>scamp</suggestions>
					<suggestions>stamp</suggestions>
				</suggestions>
			</matches>
			<type>grammar</type>
			<offset>0</offset>
			<length>4</length>
			<rule>UPPERCASE_SENTENCE_START</rule>
			<message>This sentence does not start with an uppercase letter</message>
			<suggestions>
				<suggestions>This</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)

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]

Parameters:

Request response:

{
    "result": [
        {
            "matches": [
                {
                    "type": "spelling",
                    "offset": 5,
                    "length": 5,
                    "suggestions": [
                        "sample",
                        "sampled",
                        "sampler",
                        "samples",
                        "ample",
                        "amply",
                        "scamp",
                        "stamp"
                    ]
                },
                {
                    "type": "grammar",
                    "offset": 0,
                    "length": 4,
                    "rule": "UPPERCASE_SENTENCE_START",
                    "message": "This sentence does not start with an uppercase letter",
                    "suggestions": [
                        "This"
                    ]
                }
            ]
        },
        {
            "matches": [
                {
                    "type": "grammar",
                    "offset": 4,
                    "length": 11,
                    "rule": "IT_VBZ",
                    "message": "Did you mean demonstrates?",
                    "suggestions": [
                        "demonstrates"
                    ]
                }
            ]
        }
    ]
}

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

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]

Parameters:

Request response:

{
    "r": [
        {
            "m": [
                {
                    "t": "spelling",
                    "o": 5,
                    "l": 5,
                    "s": [
                        "sample",
                        "sampled",
                        "sampler",
                        "samples",
                        "ample",
                        "amply",
                        "scamp",
                        "stamp"
                    ]
                },
                {
                    "t": "grammar",
                    "o": 0,
                    "l": 4,
                    "r": "UPPERCASE_SENTENCE_START",
                    "m": "This sentence does not start with an uppercase letter",
                    "s": [
                        "This"
                    ]
                }
            ]
        },
        {
            "m": [
                {
                    "t": "grammar",
                    "o": 4,
                    "l": 11,
                    "r": "IT_VBZ",
                    "m": "Did you mean demonstrates?",
                    "s": [
                        "demonstrates"
                    ]
                }
            ]
        }
    ]
}

Example 1.4 [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.

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]

Request response:

{
    "result": [
        {
            "matches": [
                {
                    "type": "spelling",
                    "offset": 5,
                    "length": 5,
                    "suggestions": [
                        "sample",
                        "sampled",
                        "sampler",
                        "samples",
                        "ample",
                        "amply",
                        "scamp",
                        "stamp"
                    ]
                },
                {
                    "type": "grammar",
                    "offset": 0,
                    "length": 4,
                    "rule": "UPPERCASE_SENTENCE_START",
                    "message": "This sentence does not start with an uppercase letter",
                    "suggestions": [
                        "This"
                    ]
                }
            ]
        }
    ]
}

Example 1.5 [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 AI-based English will be used during check request.

https://svc.webspellchecker.net/api?
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=auto&format=json&customerid=[your-service-id]&auto_lang_priorities={"en":"en_AI"}