Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

GitHub license

Aspose.OCR Cloud Node.js SDK

Aspose.OCR Cloud is a simple SDK used to add text recognition to your app with merely a few lines of code.

In detail, it's a set of SDKs for optical character recognition and document scanning in our Cloud. It supports reading and recognizing text from most commonly used raster image formats. Just pass a specific image to the Aspose.OCR Cloud API, and it will return a response with recognized text.

It is easy to get started with Aspose.OCR Cloud, and there is nothing to install. Create an account at Aspose Cloud and get your application information, then you are ready to use SDKs

  • API version: 21.2.0
  • Package version: 21.2.0

OCR Processing Features

  • Recognize and extract text from images via OCR.
  • Specify the area of the image from which you want to extract text.
  • Perform OCR to recognize text from the whole or partial image.
  • Fetch character and font information from raster images.
  • Return the response in the JSON or XML format.
  • Supports English text recognition.

Save OCR As


Read OCR Formats


How to use the SDK?

Our API is completely independent of your operating system, database system, or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, we have provided and support SDKs in many development languages to make it easier to integrate with us.


To use Aspose OCR for Cloud Node.js SDK you need to register an account with Aspose Cloud and lookup/create App Key and SID at Cloud Dashboard. There is a free quota available. For more details, see Aspose Cloud Pricing.



npm install @asposecloud/aspose-ocr-cloud --save


Install it via:

    npm install --save

Getting Started

  1. Sign Up. Before you begin, you need to sign up for an account on our Dashboard and retrieve your credentials.
  2. Minimum requirements. This SDK requires Node.js 6.x and higher.
  3. Install Aspose.OCR Cloud Node.js SDK.

Please, add the following nmp package to your project.json as a dependency.

  "dependencies": {

Please follow the installation instruction and execute the following JS code:

NOTE: Use the helper from /test/helper.js for an upload and save data.

    // Get keys from aspose site.
    // There is free quota available. 
    // For more details, see
var conf = {

//Create storage api for upload to server
var fs = require('fs');
var path = require('path');
var instance = new Asposeocrcloud.OcrApi(conf);

var buffer = Buffer.alloc(1024 * 50);
var fileData = fs.readFileSync(YOUR_FILE_PATH, buffer);

instance.RecognizeFromContentAuto(fileData, function (err, data, res) {
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your package from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('@asposecloud/aspose-ocr-cloud') in javascript files from the directory you ran the last command above from.

Install For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the OCR pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
      parser: {
        amd: false

OCR from URL in Node.Js

	// Get your ClientId and ClientSecret from (free registration required).
	var conf = {
	const ocrApi = new Asposeocrcloud.OcrApi(conf);

	var imageUrl = "";
	ocrApi.RecognizeFromUrlAuto(imageUrl, function (err, data, res) {

Documentation for API Endpoints

DEMO Application contain various examples of using the Aspose.OCR SDK NodeJS.

Detailed API Reference is avalable at /docs/ folder.


Image formats suported: .bmp, .dib .jpeg, .jpg, .jpe .jp2 .png .webp .pbm, .pgm, .ppm .pxm, .pnm .pfm .sr, .ras .tiff, .tif .exr .hdr, .pic

Aspose.OCR Cloud SDKs in Popular Languages

.NET Java Python Android NodeJS
GitHub GitHub GitHub GitHub GitHub
NuGet Maven PIP Maven NPM

Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial


Aspose OCR Cloud NodeJS SDK is a simple OCR technology, which you can use in your application to convert image to text.








No packages published