NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Grammar Check API

POST

Fix spelling and grammar errors before user submissions get saved.

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.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/grammarcheck
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "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"
        ]
      }
    ]
  }
}

Start from a template — a working app you can deploy in a minute

About the Grammar Check API

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.

How it works

Grammar Check sends your text to a helper service built on harper-core 3, the Rust library behind the open-source Harper grammar checker, with an APIVerve layer on top that tunes it for automatic correction. Leading and trailing whitespace is trimmed first; line breaks inside the text are kept. An empty string returns a 400 error, and an input the checker service rejects also returns a 400 rather than a 500.

The text is parsed as Markdown, so inline code, links and URLs are not checked. The English variant is detected from the spelling the writer already uses and returned in dialect; British, Canadian, Australian and Indian spellings such as colour or theatre are not changed to American ones. Harper's grammar rules then run over the text, covering subject-verb agreement, a/an, their/they're/there, its/it's, your/you're, could of, repeated words, sentence capitalisation and several hundred common word-choice mistakes. Wording and style advice (shorter phrasings, en dashes and similar preferences) is not reported, because applying it automatically would rewrite correct text.

Spelling suggestions are ranked by how people actually mistype: swapped letters, a missing or extra double letter, a wrong vowel, a neighbouring key and words that sound alike count as smaller mistakes than arbitrary edits, and common words rank ahead of rare ones. A word typed in lowercase is never corrected to a proper noun, and the case you typed is kept, so TOMOROW becomes TOMORROW. Capitalised words in the middle of a sentence are treated as names and left alone unless they are one slip away from a known place or name. Acronyms, words with digits, camelCase identifiers and common technical terms such as JSON, OAuth or npm are not flagged.

errorCount is the number of reported problems and modified is true when there is at least one. corrected is built by applying the first suggestion of every problem, working from the end of the text backwards so earlier offsets stay valid; overlapping problems are reduced to one first, so every correction applies cleanly.

Each entry in corrections carries rule (the kind of problem, for example Spelling, Agreement, Repetition, Capitalization or Word Choice), message, position.start and position.end as character offsets into the trimmed text, and suggestions, the replacement strings for that span, best first. An empty-string suggestion means delete the span. Offsets count characters, not bytes, so they line up with JavaScript string indexes for most text. On the Free plan corrections is null and only the summary fields are returned.

What people use it for

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.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Grammar Check

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Grammar Check API.

Read the docs →
Is it cheap enough to check grammar on every user submission?
Yes. Each check costs 20 credits, which works out to about $0.003 per call on the Starter plan, or $3.00 per 1,000 calls. The Free plan gives you 10 checks each month to test your integration, while Starter covers 10,000 monthly checks.
Do I get error explanations and replacement suggestions on the Free plan?
No, detailed correction breakdown requires a paid plan. On the Free plan, you receive the corrected text, the error count, and a flag indicating if changes were made. Paid plans unlock the corrections list with violated rules, error positions, and specific replacement suggestions.
What types of writing mistakes does it detect?
It catches misspelled words and common grammar mistakes: subject-verb agreement, a versus an, their/they're/there, its/it's, your/you're, could of, repeated words and missing capitals at the start of a sentence. Names, acronyms, code identifiers and URLs are not flagged, and British, Canadian, Australian and Indian spellings are respected. Style preferences are not reported, so the corrected text only changes real mistakes.
What does the response look like if text contains no errors?
If your input text is already error-free, the modified flag returns false and errorCount is set to zero. The corrected text field simply returns your original submission without any alterations.
Can I highlight specific mistakes in an editor instead of auto-correcting?
Yes, on any paid plan. The premium corrections array provides character start and end positions alongside violated rules and suggested fixes. You can use those exact coordinates to build inline squiggly underlines and suggestion tooltips in your interface.
Does it check languages other than English?
No. The checker supports English only (American, British, Canadian and Australian spelling). Text that is clearly written in another language, such as German, Spanish, French, Portuguese, Italian or Dutch, returns a 400 that names the detected language instead of being rewritten into English. Short snippets under four words are always checked.

Ready to build with Grammar Check? Start with 200 free credits — one key unlocks all 404+ APIs.

Explore the catalog

404+ APIs on the same key and the same response shape.

Browse all APIs