
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
ocr-space-api-wrapper
Advanced tools
Node.js wrapper for ocr.space APIs, a service for executing OCR (Optical Character Recognition) to images and PDFs.
npm i ocr-space-api-wrapper
const { ocrSpace } = require('ocr-space-api-wrapper');
async function main () {
try {
// Using the OCR.space default free API key (max 10reqs in 10mins) + remote file
const res1 = await ocrSpace('http://dl.a9t9.com/ocrbenchmark/eng.png');
// Using your personal API key + local file
const res2 = await ocrSpace('/path/to/file.pdf', { apiKey: '<API_KEY_HERE>' });
// Using your personal API key + base64 image + custom language
const res3 = await ocrSpace('data:image/png;base64...', { apiKey: '<API_KEY_HERE>', language: 'ita' });
} catch (error) {
console.error(error);
}
}
input
string (required)The input param specifies the input file (see examples above). It can be one of the following:
URL address
such as http://example.com/image.jpg
;file path
such as /path/to/file.pdf
;base64 image
string such as data:image/png;base64...
.options
objectThis param is an object with the following keys:
apiKey
: your API key for ocr.space APIs. Default API key has a limit of max 10reqs in 10mins.ocrUrl
: a different URL for ocr.space APIs, for example when you purchase the PRO plan.This package does not change the response in any way, please refer to the official website.
npm run lint
npm test
Please open a new issue.
FAQs
Node.js wrapper for ocr.space APIs.
The npm package ocr-space-api-wrapper receives a total of 8,352 weekly downloads. As such, ocr-space-api-wrapper popularity was classified as popular.
We found that ocr-space-api-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.