
Start Your AI Journey Today
- Access 100+ AI APIs in a single platform.
- Compare and deploy AI models effortlessly.
- Pay-as-you-go with no upfront fees.
In this guide, you’ll discover how to perform multi-page OCR using JavaScript and the Eden AI API. We’ll walk through how to initiate an OCR job, fetch the results, and efficiently process large documents using Eden AI’s asynchronous workflow and support for multiple OCR providers.
Optical Character Recognition (OCR) is a powerful method for converting text from images or scanned documents into editable, searchable content. With Eden AI’s multi-page OCR feature, handling documents that span several pages becomes simple and efficient.
In this tutorial, you’ll learn how to implement multi-page OCR in JavaScript using the Eden AI API, covering both how to start a job and how to retrieve the results.
Multipage OCR (Optical Character Recognition) is a technology that allows users to extract text from documents with multiple pages, such as PDFs or image-based files.
By scanning each page of the document, it recognizes and converts printed text into machine-readable, editable, and searchable formats, making it easier to work with large or scanned documents without manual data entry.
1. Sign Up: If you don't have an Eden AI account, create a free here. Once you do that you can obtain your API key, which you can use to access Multipage OCR.
2. Access OCR Tools: Once logged in, go to the document parsing section of the platform.
3. Choose the Multipage OCR Feature: Select the Multipage OCR tool. You can also explore advanced parsing options based on your specific requirements
Install JavaScript Requests Module
To interact with APIs in JavaScript, we’ll use Axios, a promise-based HTTP client.
Axios simplifies sending HTTP requests and handling responses, making it perfect for calling RESTful APIs like Eden AI.
Eden AI uses asynchronous processing for large or complex files (like multi-page PDFs). This means you first launch the job, and then poll the API to retrieve the results once the processing is complete. This two-step flow helps with performance, reliability, and scalability.
This first stage uploads the file to Eden AI and starts the OCR process.
file_url: URL of your document (can be a multi-page PDF).
providers: Eden AI supports multiple OCR providers (like Amazon Textract).
This call starts the OCR job and returns a public_id used to check job status and retrieve results.
Once the OCR job is complete, use the public_id to fetch the results.
Here’s what a typical response might include:
For better management of your OCR tasks, Eden AI provides additional endpoints. These extra endpoints allow you to track and manage your jobs more effectively. You can:
These endpoints enhance flexibility and control, helping you manage and clean up OCR tasks efficiently. For further details, refer to the full documentation!
Eden AI provides several advantages.
You can choose between different AI services, helping you compare results for the best performance.
Simplify development with a single API key that provides access to multiple AI services. Eliminate the hassle of managing separate integrations and accelerate your launch.
Only pay for what you use. No upfront costs, just flexible access to multiple AI services with a single API key.
Leveraging JavaScript with the Eden AI API for multi-page OCR provides an efficient and scalable solution for processing large or complex documents.
By utilizing Eden AI's asynchronous job handling and multiple OCR providers, you can automate text extraction from multi-page documents with ease, saving time and effort while improving accuracy.
Whether for personal use or large-scale applications, this approach ensures smooth document processing every time.
You can directly start building now. If you have any questions, feel free to chat with us!
Get startedContact sales