# 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
- **Features:** Limited permissions
- **Stats:** 63 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/actors/running/actors-in-store.md#pay-per-usage

## 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

## 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gr_59017/pdf-proofreader"
        }
    }
}
```

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/e9jXTyZOAk4TGLCxW/builds/phklGG9IRsmhgzbVf/openapi.json
