Node.js OCR SDK
Mindee API Helper Library for Node.js
Quickly and easily connect to Mindee's API services using Node.js.
Quick Start
Here's the TL;DR of getting started.
First, get an API Key
Then, install this library:
npm install mindeeFinally, Node.js away!
Loading a File and Parsing It
Global Documents
const mindee = require("mindee");
// for TS or modules:
// import * as mindee from "mindee";
// Init a new client
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
// Load a file from disk
const inputSource = mindeeClient.docFromPath("/path/to/the/file.ext");
// Parse it on the API of your choice
const apiResponse = mindeeClient.parse(mindee.product.InvoiceV4, inputSource);Note: Files can also be loaded from:
A base64 encoded string:
A byte sequence:
A stream:
A buffer:
A URL (https only):
You can also load the document locally before sending it:
Note: Files hidden behind redirections are rejected by the server; this solution helps to circumvent that issue.
Region-Specific Documents
Region-Specific Documents use the following syntax:
Custom Documents (docTI & Custom APIs)
Custom documents will require you to provide their endpoint manually.
Handling the Return
Additional Options
Options to pass when sending a file to be parsed.
Page Options
Allows only sending certain pages in a PDF.
In this example we only send the first, penultimate, and last pages:
Further Reading
Take a look at the Reference Documentation.
License
Copyright © Mindee
Available as open source under the terms of the MIT License.
Last updated
Was this helpful?

