Tutorial to extract tabular data from images or PDFs

ExtractTable API allows extracting tabular data from an image or a PDF. The motivation is to make it easier for developers - not to worry about the table area, column or row coordinates, rotation et al in the input.

1. Prerequisite

API Key: A developer, you, must need a valid API key to use extracttable.com API. Get some FREE credits here. We dominate the service with greate accuracy and lowest $/credit and credits expiration. You are most welcomed to BUY credits here or email me at saradhi@extracttable.com for assistance.

2. Things to know

This section will help to give you a glance on an overview that helps you to troubleshoot issues when coding.

2.1 Endpoints

Firstly, note that there are 3 different API endpoints - all endpoints must need a valid API Key passed in header as “x-api-key”

Usage Endpoint Request Methods Must contain Common Mistakes
Validate API Key https://validator.extracttable.com/ GET a valid API Key passed in the request header as “x-api-key” missing API key in request headers
Trigger a request https://trigger.extracttable.com/ POST file data (not file location) in body as “input” of multipart/form-data requesting as x-www-form-urlencoded
Retrieve the result https://getresult.extracttable.com/ GET JobId- recieved in the trigger response Invalid JobId / POST instead of GET

2.2 Step-wise procedure

i. Check if your API Key is valid and get the usage details of it
ii. Trigger a Job to process the file
iii. Retrieve the result of the triggered job - always check for JobStatus in the response which indicates the status of the job, described as below

3. Code Samples

Below are some code samples in differnt programming languages with differnt libraries developed internally or shared by our customers for public