# PDF Proofreader (`gr_59017/pdf-proofreader`) Actor

Analyzes PDF documents to detect basic spelling and grammar issues by extracting text content. Provides a proofreading quality score and highlights common writing mistakes to help improve document clarity and correctness.

- **URL**: https://apify.com/gr\_59017/pdf-proofreader.md
- **Developed by:** [Gautam Rana](https://apify.com/gr_59017) (community)
- **Categories:** Other
- **Stats:** 64 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## PDF Proofreader

An API that analyzes PDF documents to detect basic spelling and grammar issues and provides a proofreading quality score.

***

### Description

**PDF Proofreader** extracts text content from PDF files and analyzes it to identify common spelling and grammar mistakes. It also calculates a proofreading quality score to help users quickly assess the overall writing quality of their documents.

This API is useful for:

- Students reviewing assignments or reports
- Developers building document analysis tools
- Content teams checking document quality
- Automation workflows that process PDFs at scale

***

### Features

- Extracts text from PDF files
- Detects common spelling mistakes
- Detects basic grammar issues
- Calculates total word count
- Generates a proofreading quality score
- Returns structured JSON output
- Supports multiple PDF URLs per request

***

### Tech Stack

- Platform: Apify Actor
- Language: (your implementation language)
- PDF Parsing: (e.g., pdf-parse, PyPDF, etc.)
- Grammar Engine: Rule-based / NLP

***

### Input Format

The API accepts a JSON input with a list of PDF URLs.

#### Example `input.json`

```json
{
  "pdfUrls": [
    {
      "url": "https://raw.githubusercontent.com/Gautamrana14/pdf-test-files/main/DBMS-10%20(1).pdf"
    }
  ]
}
```

***

### Usage

#### Base Endpoint (Apify Actor)

```
https://api.apify.com/v2/acts/<your-actor-id>/run-sync-get-dataset-items
```

#### Example Request (cURL)

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -d @input.json \
  "https://api.apify.com/v2/acts/<your-actor-id>/run-sync-get-dataset-items?token=YOUR_API_TOKEN"
```

#### Example using JavaScript

```javascript
import fetch from "node-fetch";

const response = await fetch("https://api.apify.com/v2/acts/<your-actor-id>/run-sync-get-dataset-items?token=YOUR_API_TOKEN", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    pdfUrls: [
      { url: "https://example.com/sample.pdf" }
    ]
  })
});

const data = await response.json();
console.log(data);
```

#### Example using Python

```python
import requests

url = "https://api.apify.com/v2/acts/<your-actor-id>/run-sync-get-dataset-items"
params = {"token": "YOUR_API_TOKEN"}

payload = {
    "pdfUrls": [
        {"url": "https://example.com/sample.pdf"}
    ]
}

response = requests.post(url, params=params, json=payload)
print(response.json())
```

***

### Output Format

The API returns a dataset URL containing the proofreading results.

#### Output Schema

```json
{
  "dataset": "https://api.apify.com/v2/datasets/xxxx/items"
}
```

***

### Dataset Schema

Each dataset item has the following structure:

```json
{
  "pdfUrl": "https://example.com/sample.pdf",
  "wordCount": 1520,
  "detectedIssues": [
    "Misspelled word: teh",
    "Incorrect verb tense in paragraph 3",
    "Repeated word: the"
  ],
  "issueCount": 3,
  "proofreadingScore": 92
}
```

#### Field Description

| Field             | Description                              |
| ----------------- | ---------------------------------------- |
| pdfUrl            | URL of the analyzed PDF file             |
| wordCount         | Total number of words extracted          |
| detectedIssues    | List of detected spelling/grammar issues |
| issueCount        | Total number of issues found             |
| proofreadingScore | Quality score (0–100)                    |

***

### Limitations

- Only detects basic grammar and spelling issues
- Accuracy depends on text extraction quality
- Not a replacement for professional proofreading

***

### Rate Limits

Depends on your Apify plan and actor configuration.

***

### Roadmap

- Advanced grammar detection
- Language support beyond English
- Issue categorization (spelling vs grammar)
- Suggestions for corrections
- Highlight positions in original PDF

***

### Contributing

Contributions are welcome.

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Open a pull request

***

### License

MIT License

***

### Author

Gautam Rana
GitHub: <https://github.com/Gautamrana14>

***

# Actor input Schema

## `pdfUrls` (type: `array`):

List of PDF file URLs to analyze for proofreading issues.

## Actor input object example

```json
{
  "pdfUrls": [
    {
      "url": "https://raw.githubusercontent.com/Gautamrana14/pdf-test-files/main/DBMS-10%20(1).pdf"
    }
  ]
}
```

# Actor output Schema

## `dataset` (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 = {
    "pdfUrls": [
        {
            "url": "https://raw.githubusercontent.com/Gautamrana14/pdf-test-files/main/DBMS-10%20(1).pdf"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gr_59017/pdf-proofreader").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 = { "pdfUrls": [{ "url": "https://raw.githubusercontent.com/Gautamrana14/pdf-test-files/main/DBMS-10%20(1).pdf" }] }

# Run the Actor and wait for it to finish
run = client.actor("gr_59017/pdf-proofreader").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "pdfUrls": [
    {
      "url": "https://raw.githubusercontent.com/Gautamrana14/pdf-test-files/main/DBMS-10%20(1).pdf"
    }
  ]
}' |
apify call gr_59017/pdf-proofreader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gr_59017/pdf-proofreader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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