{"id":15654543,"url":"https://github.com/davideviolante/ocr-space-api-wrapper","last_synced_at":"2026-04-14T09:03:44.273Z","repository":{"id":39321944,"uuid":"311373030","full_name":"DavideViolante/ocr-space-api-wrapper","owner":"DavideViolante","description":"Node.js wrapper for ocr.space APIs.","archived":false,"fork":false,"pushed_at":"2025-03-01T11:08:08.000Z","size":1500,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T21:14:18.631Z","etag":null,"topics":["api","javascript","nodejs","ocr","ocr-recognition","wrapper"],"latest_commit_sha":null,"homepage":"https://ocr.space/ocrapi","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavideViolante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-09T14:57:03.000Z","updated_at":"2025-03-01T11:08:05.000Z","dependencies_parsed_at":"2023-02-17T05:01:06.135Z","dependency_job_id":"84158523-7688-4b6a-9eac-7d3b72c7591b","html_url":"https://github.com/DavideViolante/ocr-space-api-wrapper","commit_stats":{"total_commits":107,"total_committers":6,"mean_commits":"17.833333333333332","dds":0.4953271028037384,"last_synced_commit":"2922ffadd942d0b2e641555693718fa013623085"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Focr-space-api-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Focr-space-api-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Focr-space-api-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavideViolante%2Focr-space-api-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavideViolante","download_url":"https://codeload.github.com/DavideViolante/ocr-space-api-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","javascript","nodejs","ocr","ocr-recognition","wrapper"],"created_at":"2024-10-03T12:52:22.642Z","updated_at":"2026-04-14T09:03:44.261Z","avatar_url":"https://github.com/DavideViolante.png","language":"JavaScript","funding_links":["https://www.paypal.me/dviolante"],"categories":[],"sub_categories":[],"readme":"# OCR.Space Node.js API wrapper\n[![](https://github.com/davideviolante/ocr-space-api-wrapper/workflows/Node.js%20CI/badge.svg)](https://github.com/DavideViolante/ocr-space-api-wrapper/actions?query=workflow%3A\"Node.js+CI\") [![Coverage Status](https://coveralls.io/repos/github/DavideViolante/ocr-space-api-wrapper/badge.svg?branch=master)](https://coveralls.io/github/DavideViolante/ocr-space-api-wrapper?branch=master) [![npm](https://img.shields.io/npm/dm/ocr-space-api-wrapper)](https://www.npmjs.com/package/ocr-space-api-wrapper) [![Donate](https://img.shields.io/badge/paypal-donate-179BD7.svg)](https://www.paypal.me/dviolante)\n\n[![NPM](https://nodei.co/npm/ocr-space-api-wrapper.png)](https://www.npmjs.com/package/ocr-space-api-wrapper)\n\nNode.js wrapper for [ocr.space APIs](https://ocr.space/ocrapi), a service for executing OCR (Optical Character Recognition) to images and PDFs.\n\n## Install\n`npm i ocr-space-api-wrapper`\n\n## Usage\n```js\nconst { ocrSpace } = require('ocr-space-api-wrapper');\n\nasync function main () {\n  try {\n    // Using the OCR.space default free API key (max 10reqs in 10mins) + remote file\n    const res1 = await ocrSpace('http://dl.a9t9.com/ocrbenchmark/eng.png');\n\n    // Using your personal API key + local file\n    const res2 = await ocrSpace('/path/to/file.pdf', { apiKey: '\u003cAPI_KEY_HERE\u003e' });\n    \n    // Using your personal API key + base64 image + custom language\n    const res3 = await ocrSpace('data:image/png;base64...', { apiKey: '\u003cAPI_KEY_HERE\u003e', language: 'ita' });\n  } catch (error) {\n    console.error(error);\n  }\n}\n```\n\n## Params\n### `input` string (required)\nThe input param specifies the input file (see examples above). It can be _one_ of the following:\n - a remote `URL address` such as `http://example.com/image.jpg`;\n - a local `file path` such as `/path/to/file.pdf`;\n - a `base64 image` string such as `data:image/png;base64...`.\n\n### `options` object\nThis param is an object with the following keys:\n- `apiKey`: your API key for [ocr.space APIs](https://ocr.space/ocrapi). Default API key has a limit of max 10reqs in 10mins.\n- `ocrUrl`: a different URL for ocr.space APIs, for example when you purchase the PRO plan.\n- `signal`: an `AbortSignal` for `AbortController` to abort the request.\n- All other params as documented in the [official website](https://ocr.space/OCRAPI#PostParameters).\n\n## Response\nThis package does not change the response in any way, please refer to the [official website](https://ocr.space/OCRAPI#Response).\n\n## Run lint\n`npm run lint`\n\n## Run tests\n`npm test`\n\n## Bug or feedback\nPlease open a new issue.\n\n## Author\n- [Davide Violante](https://github.com/DavideViolante)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideviolante%2Focr-space-api-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavideviolante%2Focr-space-api-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideviolante%2Focr-space-api-wrapper/lists"}