# Grammar and Spelling Checker: bulk texts and web pages (`examsens.ai/grammar-checker`) Actor

Checks many texts, web pages or dataset fields for spelling, grammar, punctuation and style issues in more than 20 languages with the open source LanguageTool, run inside the actor. Returns each issue with its position and suggestions, counts by kind, and a corrected text.

- **URL**: https://apify.com/examsens.ai/grammar-checker.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** AI, For creators
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 text checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Grammar and Spelling Checker: bulk texts and web pages

Proofread many texts at once. Paste texts, send JSON records with your own IDs, list web pages, or point it at an Apify dataset, and get every spelling, grammar, punctuation and style issue with suggested fixes, counts by kind, and a corrected version of each text.

Checking is done by LanguageTool, the open source proofreading engine (LGPL 2.1 or later), running inside the actor. Your text is never sent to an outside service.

### What you get for each text

- `issueCount`, `issuesPer100Words` and `issuesByKind` (spelling, grammar, punctuation, typography, style, casing, confused words, meaning, other)
- `issues`: each with `message`, `kind`, `category`, `ruleId` and `ruleDescription`, `offset` and `length` (where it sits in your text), `problemText`, `context` (the words around it) and up to 5 `replacements`
- `correctedText`: the text with the first suggestion of each issue applied, and `correctionsApplied`
- `language` and `languageCode` used, `wordCount`
- Every other field of a record you sent, such as your `id`

For example, "This sentence have a error. Their going to the park tomorow, and they will bring there dog." returns 4 issues and the corrected text "This sentence has an error. Their going to the park tomorrow, and they will bring their dog."

### Languages

Arabic, Asturian, Belarusian, Breton, Catalan, Chinese, Crimean Tatar, Danish, Dutch, English, Esperanto, French, Galician, German, Greek, Irish, Italian, Japanese, Khmer, Persian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Tagalog, Tamil and Ukrainian, 31 in all, with regional variants such as en-US, en-GB, de-DE, de-AT, de-CH, pt-PT and pt-BR. Rule coverage differs by language.

Leave the language on auto to detect it per text, or give a code. A regional code also checks regional spelling: `colour` and `grey` are flagged with en-US and accepted with en-GB.

### Input

- Texts, texts with IDs (`{"id": "...", "text": "..."}`), web pages (main text, with menus and footers left out), Apify datasets (text field found for you, or named)
- Language (auto by default), preferred variants for auto (such as en-GB), the writer's first language (turns on false friend checks)
- Picky mode for stricter style and typography rules
- Rules and categories to skip, using the `ruleId` and category IDs from the results, such as `TYPOS` to skip spelling
- Words to accept, such as product and brand names
- Issues listed per text (default 200; the counts always cover every issue), corrected text (default on)

### Output

Dataset: one item per text, in input order. A text that cannot be checked gets `ok: false` and an `error`, such as `HTTP 404` for a page or an empty text. The other texts still run. An unsupported language code stops the run at the start with a message naming the codes to use.

### Pricing

Pay per event: one event per text checked. A text that fails is not charged. The run stops when it reaches the maximum charge you set.

The engine needs memory: give runs at least 2 GB.

### Scope and conduct

Each web page is downloaded once. LanguageTool runs on the actor's own machine and listens on its local address only. Nothing is stored beyond the run's own storage.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

## `texts` (type: `array`):

One text per entry.

## `items` (type: `array`):

JSON objects with "text" and any other fields, such as an "id". The other fields are copied to the result.

## `urls` (type: `array`):

Pages whose main text is checked. Menus, footers and scripts are left out.

## `datasetIds` (type: `array`):

Datasets in your account; each item is one text. The field is found for you (text, markdown, content, body, description, article, review, comment), or set it below.

## `textField` (type: `string`):

Field of each dataset item to check.

## `language` (type: `string`):

auto detects each text's language. Or give a code such as en-US, en-GB, de-DE, fr, es, pt-BR, nl, it, pl. A regional code such as en-US also checks spelling for that region.

## `preferredVariants` (type: `array`):

With auto, the regional spelling to use for each language, such as en-GB or de-AT.

## `motherTongue` (type: `string`):

Code such as de or fr. Turns on the false friend checks between that language and the text's language.

## `picky` (type: `boolean`):

Also apply the stricter style and typography rules.

## `disabledRules` (type: `array`):

Rule IDs to turn off, as shown in ruleId of the results, such as WHITESPACE_RULE or UPPERCASE_SENTENCE_START.

## `disabledCategories` (type: `array`):

Category IDs to turn off, such as TYPOS (spelling), STYLE, TYPOGRAPHY, CASING or REDUNDANCY.

## `ignoreWords` (type: `array`):

Words and names that are never reported, such as product and brand names.

## `maxIssues` (type: `integer`):

Most issues to list for one text. The counts always cover every issue.

## `correctedText` (type: `boolean`):

Add the text with the first suggestion of each issue applied.

## Actor input object example

```json
{
  "texts": [
    "This sentence have a error. Their going to the park tomorow, and they will bring there dog."
  ],
  "language": "auto",
  "picky": false,
  "maxIssues": 200,
  "correctedText": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "texts": [
        "This sentence have a error. Their going to the park tomorow, and they will bring there dog."
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/grammar-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "texts": ["This sentence have a error. Their going to the park tomorow, and they will bring there dog."] }

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/grammar-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "texts": [
    "This sentence have a error. Their going to the park tomorow, and they will bring there dog."
  ]
}' |
apify call examsens.ai/grammar-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/grammar-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Ul7W6lJYVYmN6H6IM/builds/S6N0UbBgSQoCvI9nA/openapi.json
