Getting Started with the GrammarBot API

 

Thanks for choosing the Grammar Bot API to integrate detection of grammar and spelling errors into your project. Using a new API can sometimes be a challenge, so we’ve written a quick 3-minute guide to walk you through how to make your first API call and interpret the results.

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

  • Thousands of FREE requests per month

  • 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 or the Signup button below to get your API key.  Please note that our free plan charges $0.01 per request if you go over the monthly request limit.

 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.

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 100 requests/day (~3000/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?

© 2020 by GrammarBot