# Grammar Check API

> Grammar Check is a grammar checker and spell check API for English text that inspects text for spelling and grammar errors, returning the corrected wording, error count, and a modified flag. Paid plans add detailed rule descriptions, character offsets, and suggestions for every detected mistake.

**Endpoint:** `POST https://api.apiverve.com/v1/grammarcheck`  
**Category:** Text Processing  
**Cost:** 20 credits per call  
**Canonical page:** https://apiverve.com/marketplace/grammarcheck

## Overview

A grammar check API and spell check API for proofreading user-written text. Pass any raw string in the request body to scan it for grammatical issues and misspelled words, and get back whether anything needed fixing, how many issues were found, and a corrected copy of the text.

It fits anywhere people type prose that others will read: support replies, product reviews, listings, comments, emails and form fields. Run it before saving to flag sloppy submissions, or show the corrected version as a one-click fix. Typical catches include misspellings like "becuase" and "tomorow", repeated words such as "The The", subject-verb agreement ("He don't"), a/an, their/they're/there, its/it's and your/you're mix-ups, and "could of". Names, acronyms, code identifiers and British spellings are left alone.

The Free plan returns the modified flag, the error count and the fully corrected text. Paid plans also receive the list of individual corrections: the rule each error broke, a readable message, the character positions where it starts and ends, and the replacement suggestions, which is what you need to underline errors in an editor and let the writer choose.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/grammarcheck" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"The the pig snorted when I saw it on the barn gate. I was a little mad becuase it woke up my pupppppy"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | Yes | The English text you want to check for grammatical and spelling errors. length 0-50000 |

## Response fields

- `modified` — boolean · Indicates whether any grammar or spelling errors were found
- `corrected` — string · The text with grammar and spelling corrections applied
- `errorCount` — number · Total number of errors found in the text
- `dialect` — string · The English variant the text was checked against, detected from its spelling: American, British, Canadian, Australian or Indian
  - `corrections.0.rule` — string · The kind of problem found, such as Spelling, Agreement, Repetition, Capitalization or Word Choice · (premium)
  - `corrections.0.message` — string · Description of the error · (premium)
  - `corrections.0.position` — object · Start and end position of the error in the text · (premium)
    - `corrections.0.position.start` — number · Character offset where the flagged text begins · (premium)
    - `corrections.0.position.end` — number · Character offset where the flagged text ends · (premium)
  - `corrections.0.suggestions` — array · Replacement text for the flagged span, best first. An empty string means the span should be deleted · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "modified": true,
    "corrected": "The pig snorted when I saw it on the barn gate. I was a little mad because it woke up my puppy",
    "errorCount": 3,
    "dialect": "American",
    "corrections": [
      {
        "rule": "Repetition",
        "message": "Did you mean to repeat this word?",
        "position": {
          "start": 0,
          "end": 7
        },
        "suggestions": [
          "The"
        ]
      },
      {
        "rule": "Spelling",
        "message": "Did you mean `because`?",
        "position": {
          "start": 71,
          "end": 78
        },
        "suggestions": [
          "because"
        ]
      },
      {
        "rule": "Spelling",
        "message": "Did you mean `puppy`?",
        "position": {
          "start": 93,
          "end": 101
        },
        "suggestions": [
          "puppy",
          "puppetry"
        ]
      }
    ]
  }
}
```

## Use cases

- **Content Management Proofing** — Flag grammar mistakes in submitted blog drafts and substitute corrected sentences before publishing articles to readers.
- **Customer Support Messaging** — When agents write replies in ticketing desks, the system uses the error count to warn them of uncorrected typos.
- **Resume Intake Screening** — Job portals scan cover letters during applicant uploads, noting whether the text was modified to preserve clean candidate profiles.
- **Student Essay Feedback** — Learning management platforms pass student submissions to display the number of errors and return properly formatted text.

## SDKs

- **npm** — `npm install @apiverve/grammarcheck` (https://www.npmjs.com/package/@apiverve/grammarcheck)
- **PyPI** — `pip install apiverve-grammarcheck` (https://pypi.org/project/apiverve-grammarcheck/)
- **NuGet** — `dotnet add package APIVerve.API.GrammarCheck` (https://www.nuget.org/packages/APIVerve.API.GrammarCheck)
- **Source** — https://github.com/apiverve/grammarcheck-api

## More

- Full reference: https://docs.apiverve.com/ref/grammarcheck
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
