top of page
grammar_magnify.png

Generation 1 - GrammarBot API

 

This page contains information regarding the original GrammarBot API, which will continue to be supported along with the newer GrammarBot Neural service.

The GrammarBot API has been integrated into RapidAPI for the following features

  • Free package for tinkerers and makers

  • Client code in 10+ programming languages

  • Browser-based testing of requests and results

  • API analytics dashboard

 Step 1: Get an API Key from RapidAPI 

Use this link to get your API key from RapidAPI (external website).  NOTE: for high volume and/or privacy sensitive applications, we allow directly connecting to our servers (i.e., bypassing RapidAPI). Contact us for more information.

 Step 2: Send Text and Receive Suggestions 

Using the GrammarBot API is as easy as making a request and receiving suggested spelling and grammar corrections in JSON format.  Just add your RapidAPI key in the code below:

    /usr/bin/curl -X POST \
     -H "x-rapidapi-host: grammarbot
.p.rapidapi.com" \
     -H "x-rapidapi-key:
your-rapid-api-key-here" \
     -d "language=en-US" \
     -d "text=I can't remember how to go their" \
     "https://grammarbot.p.rapidapi.com/check"

The Rapid API page for Grammar Bot includes code examples to make a request in more than 10 programming languages. There are also pre-built clients listed below:

NOTE: Browser-based "AJAX" requests will not work due to CORS restrictions. To use in a browser, create a server-side script that acts as a proxy.

Tutorials

Take your learning a step further with these tutorials to help you get up and running quickly:

Request Limits

Grammar Bot offers the most generous free limits on grammar and spelling check, but it's not unlimited.  With an API key, you can receive 500 requests/mo at no cost. Premium options are available for higher volumes.

Document Length Limits

Text longer than 10,000 characters must be split into separate requests.  Contact us if your application requires more than this.

NOTE: the information below pertains to the older version of our API.  IF YOU HAVE NOT YET SIGNED UP FOR AN API KEY, USE THE INFORMATION ABOVE.

Pre-Built Grammar Bot Clients

Let us know if you have a client to add to this list:

 

You will then see a JSON response similar to the following output.

Sample Response:

{
  "software": {

    "name": "GrammarBot",
  "version": "4.3-SNAPSHOT",
  "apiVersion": 1,
  "premium": false,
  "premiumHint": "You might be missing errors only the Premium version can find. Upgrade to see what you're missing.",
  "status": ""
  },
  "warnings": {
  "incompleteResults": false
  },
  "language": {
  "name": "English",
  "code": "en-US",
  "detectedLanguage": {
     "name": "English (US)",
     "code": "en-US"
  }
  },
  "matches": [
  {
     "message": "Statistics suggests that 'there' (as in 'Is there an answer?') might be the correct word here, not 'their' (as in 'It’s not their fault.'). Please check.",
     "shortMessage": "",
     "replacements": [
       {
         "value": "there"
       }
     ],
     "offset": 27,
     "length": 5,
     "context": {
       "text": "I can't remember how to go their.",
       "offset": 27,
       "length": 5
     },
     "sentence": "I can't remember how to go their.",
     "type": {
       "typeName": "Other"
     },
     "rule": {
       "id": "CONFUSION_RULE",
       "description": "Statistically detect wrong use of words that are easily confused",
       "issueType": "non-conformance",
       "category": {
         "id": "TYPOS",
         "name": "Possible Typo"
       }
     }
  }
  ]
}

It's really that simple!  Ready to signup for your free API Key?

bottom of page