STANDS4 Web Services:

Grammar API

The Grammar API from STANDS4 is a web service for checking the spelling and style of text in many languages.

Request URL:

https://www.stands4.com/services/v2/grammar.php

Request parameters:

Parameter Value Required Default Description
uid string Y  

Your API user id

tokenid string Y  

Your valid developer token id

text string Y  

The text you would like to check

lang string N en-US

The language of the provided text,
e.g. es (Spanish) or fr (French)

format string N json

The format in which you want the result returned (json or xml)

Sample request URL:

https://www.stands4.com/services/v2/grammar.php?uid=1001&tokenid=tk324324&text=i%20loves%20you&format=json

Response elements:

matches Contains all of the check responses
message

Specific error message

rule

Rule broken ID

description

Rule broken description

Sample response:

{
  software: "Grammar.com v2",
  warnings: {
    incompleteResults: false
  },
  language: {
    name: "English (US)",
    code: "en-US"
  },
  matches: [
    {
      message: "This sentence does not start with an uppercase letter",
      shortMessage: "",
      replacements: [
        {
          value: "I"
        }
      ],
      offset: 0,
      length: 1,
      context: {
        text: "i loves you",
        offset: 0,
        length: 1
      },
      rule: {
        id: "UPPERCASE_SENTENCE_START",
        description: "Checks that a sentence starts with an uppercase letter",
        issueType: "typographical",
        category: {
          id: "CASING",
          name: "Capitalization"
        }
      }
    }
  ]
}
<?xml version="1.0" encoding="UTF-8" ?>
<software>Grammar.com v2</software>
<warnings>
    <incompleteResults>false</incompleteResults>
</warnings>
<language>
    <name>English (US)</name>
    <code>en-US</code>
</language>
<matches>
    <message>This sentence does not start with an uppercase letter</message>
    <shortMessage></shortMessage>
    <replacements>
        <value>I</value>
    </replacements>
    <offset>0</offset>
    <length>1</length>
    <context>
        <text>i loves you</text>
        <offset>0</offset>
        <length>1</length>
    </context>
    <rule>
        <id>UPPERCASE_SENTENCE_START</id>
        <description>Checks that a sentence starts with an uppercase letter</description>
        <issueType>typographical</issueType>
        <category>
            <id>CASING</id>
            <name>Capitalization</name>
        </category>
    </rule>
</matches>

Want to use this service?

The Grammar API service is free to use for up to 100 queries per day.

For a premium commercial license, please contact us.

Apply here

Improve your writing now:

Download Grammar eBooks

It’s now more important than ever to develop a powerful writing style. After all, most communication takes place in reports, emails, and instant messages.



Browse Grammar.com

Quiz

Are you a grammar master?

»
Identify the sentence with correct use of the future perfect tense:
A They have been working on the project for weeks.
B By next year, she will have completed her degree.
C We will be finishing our meal by the time they arrive.
D She finished her book before the movie started.