npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sharpapi/sharpapi-node-proofread

v1.0.1

Published

SharpAPI.com Node.js SDK for proofreading text

Readme

SharpAPI GitHub cover

Proofread & Grammar Checker API for Node.js

✍️ Fix grammar and spelling errors with AI — powered by SharpAPI.

npm version License

SharpAPI Proofread & Grammar Checker uses advanced AI to detect and correct grammar, spelling, punctuation, and style errors. Perfect for content creation, document editing, and quality assurance.


📋 Table of Contents

  1. Requirements
  2. Installation
  3. Usage
  4. API Documentation
  5. Examples
  6. License

Requirements

  • Node.js >= 16.x
  • npm or yarn

Installation

Step 1. Install the package via npm:

npm install @sharpapi/sharpapi-node-proofread

Step 2. Get your API key

Visit SharpAPI.com to get your API key.


Usage

const { SharpApiProofreadService } = require('@sharpapi/sharpapi-node-proofread');

const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
const service = new SharpApiProofreadService(apiKey);

const text = `
This is a sentance with some erors that need to be fixed.
Their are several gramatical mistakes in this text.
`;

async function proofreadText() {
  try {
    // Submit proofreading job
    const statusUrl = await service.proofread(text);
    console.log('Job submitted. Status URL:', statusUrl);

    // Fetch results (polls automatically until complete)
    const result = await service.fetchResults(statusUrl);
    const corrections = result.getResultJson();

    console.log('Original:', text);
    console.log('Corrected:', corrections.corrected_text);
    console.log('Errors found:', corrections.errors.length);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

proofreadText();

API Documentation

Methods

proofread(text: string, language?: string): Promise<string>

Proofreads text and returns corrections for grammar, spelling, and punctuation errors.

Parameters:

  • text (string, required): The text content to proofread
  • language (string, optional): The language of the text (default: 'English')

Returns:

  • Promise: Status URL for polling the job result

Example:

const statusUrl = await service.proofread(textWithErrors, 'English');
const result = await service.fetchResults(statusUrl);

Response Format

The API returns corrected text with detailed error information:

{
  "corrected_text": "This is a sentence with some errors that need to be fixed. There are several grammatical mistakes in this text.",
  "errors": [
    {
      "error": "sentance",
      "correction": "sentence",
      "type": "spelling",
      "position": 10,
      "explanation": "Incorrect spelling"
    },
    {
      "error": "erors",
      "correction": "errors",
      "type": "spelling",
      "position": 30,
      "explanation": "Incorrect spelling"
    },
    {
      "error": "Their",
      "correction": "There",
      "type": "grammar",
      "position": 60,
      "explanation": "Wrong usage of 'their' vs 'there'"
    }
  ],
  "error_count": 3
}

Examples

Basic Proofreading

const { SharpApiProofreadService } = require('@sharpapi/sharpapi-node-proofread');

const service = new SharpApiProofreadService(process.env.SHARP_API_KEY);

const draft = `
I has been working on this project for three weeks.
Its going very good and we should be done soon.
`;

service.proofread(draft)
  .then(statusUrl => service.fetchResults(statusUrl))
  .then(result => {
    const corrections = result.getResultJson();
    console.log('✏️ Corrected text:');
    console.log(corrections.corrected_text);
    console.log(`\n🔍 Found ${corrections.error_count} errors`);
  })
  .catch(error => console.error('Proofreading failed:', error));

Detailed Error Analysis

const service = new SharpApiProofreadService(process.env.SHARP_API_KEY);

const document = `
The company annouced their new product line yesterday.
We recieved alot of positive feedback from customers.
`;

const statusUrl = await service.proofread(document);
const result = await service.fetchResults(statusUrl);
const corrections = result.getResultJson();

console.log('Error Report:');
corrections.errors.forEach((error, index) => {
  console.log(`\n${index + 1}. ${error.type.toUpperCase()}`);
  console.log(`   Error: "${error.error}"`);
  console.log(`   Correction: "${error.correction}"`);
  console.log(`   Explanation: ${error.explanation}`);
});

Batch Proofreading

const service = new SharpApiProofreadService(process.env.SHARP_API_KEY);

const articles = [
  { title: 'Article 1', content: 'Your text here...' },
  { title: 'Article 2', content: 'More text...' },
  { title: 'Article 3', content: 'Even more text...' }
];

const proofreadResults = await Promise.all(
  articles.map(async (article) => {
    const statusUrl = await service.proofread(article.content);
    const result = await service.fetchResults(statusUrl);
    const corrections = result.getResultJson();

    return {
      title: article.title,
      original: article.content,
      corrected: corrections.corrected_text,
      error_count: corrections.error_count
    };
  })
);

proofreadResults.forEach(result => {
  console.log(`${result.title}: ${result.error_count} errors corrected`);
});

Use Cases

  • Content Creation: Ensure error-free blog posts, articles, and marketing copy
  • Email Communication: Polish professional emails and messages
  • Academic Writing: Improve essays, papers, and research documents
  • Business Documents: Perfect reports, proposals, and presentations
  • Social Media: Check posts for grammar and spelling before publishing
  • E-commerce: Ensure product descriptions are error-free
  • Customer Support: Validate support responses for clarity and correctness

Detection Capabilities

The proofreader identifies various types of errors:

  • Spelling errors: Typos, misspelled words
  • Grammar mistakes: Subject-verb agreement, tense errors
  • Punctuation: Missing or incorrect punctuation marks
  • Capitalization: Proper noun capitalization, sentence starts
  • Word choice: Commonly confused words (their/there/they're)
  • Style issues: Redundancy, wordiness, clarity problems

API Endpoint

POST /content/proofread

For detailed API specifications, refer to:


Related Packages


License

This project is licensed under the MIT License. See the LICENSE.md file for details.


Support


Powered by SharpAPI - AI-Powered API Workflow Automation