--- title: "OCR" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/zia-services/ocr/ description: "This page describes the method to use the Optical Character Recognition feature to detect textual characters in your Nodejs application with sample code snippets" last_updated: 2026-09-08T11:07:33Z service: Zia Services type: general related_links: - name: "OCR - API" url: /en/api/code-reference/zia-services/ocr/#OCR --- # Optical Character Recognition > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/ocr/) now. [Zia Optical Character Recognition](https://docs.catalyst.zoho.com/en/zia-services/help/optical-character-recognition/introduction) electronically detects textual characters in images or digital documents, and converts them into machine-encoded text. Zia OCR can recognize text in 9 international languages and 10 Indian languages. You can [check the list of languages and language codes from the API documentation](https://docs.catalyst.zoho.com/en/api/code-reference/zia-services/ocr/#OCR) > **Note:**Catalyst does not store any of the files you upload in its systems. The files you upload are used for one-time processing only. They are not used for ML model training purposes either. Catalyst components are fully compliant with all applicable data protection and privacy laws. You must specify the path to the image or document file that needs to be processed for OCR. The response will also include a confidence score, which defines the accuracy of the processing, in addition to the recognized text. **Allowed file formats:** ._jpg_, ._jpeg_, ._png_, ._tiff_, ._bmp_, ._pdf_ **File size limit:** 20 MB You must pass the file path, model type, and languages as arguments to the `extractOpticalCharacters()` method. However, the model type and language values are optional. By default, it is passed as the `OCR` model type, and the languages are automatically detected if they are not specified. The `zia` reference used below is defined in the [component instance page](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/zia-services/get-component-instance). The promise returned here is resolved to a JSON object. ```javascript let fs = require('fs'); //Define the file stream for file attachments let result = await zia.extractOpticalCharacters( fs.createReadStream('/Users/amelia-421/Desktop/MyDoc.webp'), { language:'eng', modelType: 'OCR' }) ; console.log(result); ``` A sample response that you will receive is shown below. The response is the same for both versions of Node.js. #### Node js ```json { "confidence":95, "text":"This is a lot of 12 point text to test the\nocr code and see if it works on all types\nof file format\n\nThe quick brown dog jumped over the\nlazy fox. The quick brown dog jumped\nover the lazy fox. The quick brown dog\njumped over the lazy fox. The quick\nbrown dog jumped over the lazy fox" } ```