{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"f7f9f0c7-f534-47fb-baff-0fe17bfc40d6","name":"extracttable.com","description":"\n[ExtractTable](https://extracttable.com) API allows extracting structured tabular data from images or PDF files. The motivation is to make it easier for developers to not worry about the table area, column or row coordinates, rotation et al in the input.\n\n> If you are a Python Developer check out the official pip library [ExtractTable-py](https://github.com/ExtractTable/ExtractTable-py) - takes only 3 lines of code for the output ![image](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue)\n\n```python\nfrom ExtractTable import *\net_sess = ExtractTable(api_key=YOUR_API_KEY)\t# Replace your VALID API Key here\nprint(et_sess.check_usage())        \t\t\t# Validates API Key & show credits usage \ntable_data = et_sess.process_file(filepath=Location_of_Image_with_Tables, output_format=\"df\")\n```\n\n\n# Prerequisite\n\nThe service is authenticated with an API key, grab some [FREE credits here](https://extracttable.com/signup/trial.html) for trial or  most welcome to [BUY credits here](https://extracttable.com/#pricing). ExtractTable.com offers the best accuracy, lowest $/credit with longest validity and credit refund on bad outputs(literally, no one does this). For any information needed/assistance/troubleshooting feel free to email me at saradhi@extracttable.com. A detailed competitive comparison [here](https://extracttable.com/compare.html).\n\n\n# Authentication\n\n**How/Where to use the API Key?**\n\n1. For API usage - must be passed through headers as \"x-api-key\" in every request\n2. For Web usage - go to [Web-PRO](https://extracttable.com/pro.html) and provide the API Key when prompted\n\n\n\n# API Request - Common mistakes\n\nFirstly, note that there are 3 different API endpoints - all endpoints must need a valid API Key passed in header as “x-api-key”\n\n| Usage \t| Endpoint \t| Request Methods \t| Must contain \t| Common Mistakes \t|\n|---------------------\t|-------------------------------------\t|-----------------\t|-------------------------------------------------------------------------\t|-------------------------------------\t|\n| Validate API Key \t| https://validator.extracttable.com/ \t| GET \t| a valid API Key passed in the request header as “x-api-key” \t| missing API key in request headers \t|\n| Trigger a request \t| https://trigger.extracttable.com/ \t| POST \t| file data (not file location) in body as “input” of multipart/form-data \t| requesting as x-www-form-urlencoded \t|\n| Retrieve the result \t| https://getresult.extracttable.com/ \t| GET \t| JobId- recieved in the trigger response \t| Invalid JobId / POST instead of GET \t|\n\n\n**What are the common error codes & How to resolve?**\n\n| Code \t| Description                          \t| ProTip                                      \t|\n|------\t|--------------------------------------\t|---------------------------------------------\t|\n| 400   | Bad Request - Requirements not matched| Endpoint is expecting query params or body, but not sent in request |\n| 401  \t| Invalid \"x-api-key\" found in headers \t| Check 'x-api-key' value in the headers      \t|\n| 403  \t| \"x-api-key\" is not found in headers  \t| Attach APIKey as 'x-api-key' in the headers \t|\n\n\n\n# API response - Explained\n\n**What are all the possible responses?**\n\nEvery triggered job can have one of the below 4 status\n\n| JobStatus  | Description                                                 |\n|--------------|-------------------------------------------------------------------|\n| `Success`    | Process completed. Check the response for tables\t\t\t|\n| `Failed`     | Process Failed, No Credits used                                   |\n| `Processing` | Still in process, use \"JobId\" to retrieve the output later        |\n| `Incomplete` | Process finished, but all pages are not processed. Partial output |\n\n\n**What is the output of the process?**\n\nThe output response will be in the below format, based on the API Key Plan type.\n```javascript\n{\n    \"JobStatus\": <string>,                              # Status of the triggered Process  @ JOB-LEVEL\n    \"Pages\": <integer>,                                 # Number of pages processed in this request @ PAGE-LEVEL\n    \"Tables\": [<list of key-value objects of table>     # List of all tables found @ TABLE-LEVEL\n        {\n            \"Page\": <integer>,                              ## Page number in which this table is found\n            \"CharacterConfidence\": <float>,                 ## Accuracy of Characters recognized from the input-page\n            \"LayoutConfidence\": <float>,                    ## Accuracy of table layout's design decision\n            \"TableJson\": <dict>,                            ## Table Cell Text in key-value format with index orientation - {row#: {col#: <str>}}\n            \"TableCoordinates\": <dict>,                     ## Top-left & Bottom-right Cell Coordinates - {row#: {col#: <list(x1,y1,x2,y2)>}}\n            \"TableConfidence\": <dict>                       ## Cell level accuracy of detected characters - {row#: {col#: <float>}}\n        },\n    {...}                                               ## ... more \"Tables\" objects\n    ],\n    \"Lines\": [<list of key-value objects>               # Pagewise Line details @ PAGE-LEVEL\n        {\n            \"Page\": <integer>,                          # Page number in which the lines are found\n            \"CharacterConfidence\": <float>,             # Average Accuracy of all Characters recognized from the input-page\n            \"LinesArray\": [\n                <list of key-value objects of line>     # Ordered list of lines in this page @ LINE-LEVEL\n                {\n                    \"Line\": <str>,                          ## Detected text of the complete line\n                    \"WordsArray\": [\n                        <list of key-value objects>         ## Word level datails in this line @ WORD-LEVEL\n                        {\n                            \"Conf\": <float>,                    ### Accuracy of recognized characters of the word\n                            \"Word\": <str>,                      ### Detected text of the word\n                            \"Loc\": [x1, y1, x2, y2]             ### Top-left & Bottom-right coordinates, w.r.t the input-page width-height dimensions\n                        },\n                    {...}                                   ### More \"WordsArray\" objects\n                    ]\n                },\n            {...}                                       ## More \"LinesArray\" objects\n            ]\n        },\n    {...}                                               # More Pagewise \"Lines\" details\n    ]\n}\n```\n\n\nOutput objects are based on the API Key Plan type. Available plan types are \n\n**Purchased Plans**\n*   \"LITE\"   - **only table data** in the output\n*   \"FULL\"   - **table and text data** in the output\n*   \"EXTRA\"  - **table, text data along with cell & word coordintates and character detection accuracy**\n\n**Promotional Plans**: Any plan other than Purchased plans are promotional\n*   \"free_trial\", \"camelotpro\" - these are promotional API Keys, gives only table data equivalent to \"LITE\" plan type\n\n\n<br>\nExplained below is the object level details of the output\n\n\n| Key Name \t| Parent \t| Type \t| Description \t| Availability \t|\n|-\t|-\t|-\t|-\t|-\t|\n| JobStatus \t| Job \t| String \t| Status of the triggered process \t| ALL Plans \t|\n| Pages \t| Job \t| Integer \t| Number of pages processed in the request \t| ALL Plans \t|\n| Tables \t| Job \t| Array \t| List of all tables found \t| ALL Plans \t|\n| Tables[0].Page \t| Table \t| Integer \t| Page number in which the table is found \t| ALL Plans \t|\n| Tables[0].CharacterConfidence \t| Table \t| Decimal \t| Accuracy of Characters recognized from the image \t| ALL Plans \t|\n| Tables[0].LayoutConfidence \t| Table \t| Decimal \t| Accuracy of table layout's design decision \t| ALL Plans \t|\n| Tables[0].TableJson \t| Table \t| Json/dict \t| Table Cell Text in key-value format with index orientation - {row#: {col#: }} \t| ALL Plans \t|\n| Tables[0].TableCoordinates \t| Table \t| Json/dict \t| Top-left & Bottom-right Cell Coordinates - {row#: {col#: }} \t| EXTRA Plan \t|\n| Tables[0].TableConfidence \t| Table \t| Json/dict \t| Cell level accuracy of detected characters - {row#: {col#: }} \t| EXTRA Plan \t|\n| Lines \t| Job \t| Array \t| List of page-wise lines text \t| FULL, EXTRA\t|\n| Lines[0].Page \t| Page \t| Integer \t| Page number in which the lines are found \t| Full Plan \t|\n| Lines[0].CharacterConfidence \t| Page \t| Decimal \t| Average Accuracy of all Characters recognized from the input-page \t| Full Plan \t|\n| Lines[0].LineArray \t| Page \t| Array \t| Ordered list of lines of the page \t|  \t|\n| Lines[0].LineArray[0].Line \t| Line \t| String \t| Detected text of the complete line \t| Full Plan \t|\n| Lines[0].LineArray[0].WordsArray \t| Line \t| Array \t| Word level datails in this line \t| EXTRA Plan \t|\n| Lines[0].LineArray[0].WordsArray[0].Conf \t| Word \t| Decimal \t| Accuracy of recognized characters of the word \t| EXTRA Plan \t|\n| Lines[0].LineArray[0].WordsArray[0].Word \t| Word \t| String \t| Detected text of the word \t| EXTRA Plan \t|\n| Lines[0].LineArray[0].WordsArray[0].Loc \t| Word \t| Array \t| Top-left & Bottom-right coordinates, w.r.t the input-page width-height dimensions \t| EXTRA Plan \t|\n\n\n# Additional resources - transform response to a CSV\n**How to transform the \"TableJson\" to csv?**\n\n`ResponseJSON[\"Tables\"]`, an array, contain tabular json data of all tables extracted from the file.\n\n`ResponseJSON[\"Tables\"][0]`.TableJson is a dictionary with row number as key and column data as values.\n\nGathered helpful resources to make it easier for you to convert the JSON response into a CSV file. \n\n\n| Language   \t| Library                          \t| Helpful Link                                                                     \t|\n|------------\t|----------------------------------\t|----------------------------------------------------------------------------------\t|\n| Javascript \t| json2csv - Open Source library   \t| https://github.com/zemirco/json2csv                                              \t|\n| Python     \t| standard csv library             \t| https://docs.python.org/3/library/csv.html#csv.DictReader                        \t|\n| Python     \t| pandas - orient=\"index\"          \t| https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html \t|\n| Node       \t| jsonexport - Open Source library \t| https://github.com/kauegimenes/jsonexport                                        \t|\n| Ruby       \t| json2csv - Open Source library   \t| https://github.com/korczis/json2csv                                              \t|\n| PHP        \t| developer hack                   \t| https://stackoverflow.com/a/20667637/6041169                                     \t|\n| GO         \t| standard csv library             \t| usage - https://stackoverflow.com/a/16482056/6041169                             \t|\n| R\t\t\t\t| **rjson** library to convert json to csv\t| usage - https://www.tutorialspoint.com/r/r_json_files.htm\t|\n\n\n**Do you have website recommendations to VIEW the recieved JSON resonse as a CSV?**\n\n[https://json-csv.com](https://json-csv.com/?ref=ExtractTable.com)\n\n\n# Let's START this","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"6396033","collectionId":"f7f9f0c7-f534-47fb-baff-0fe17bfc40d6","publishedId":"SVfMS9xu","public":true,"publicUrl":"https://documenter-api.postman.tech/view/6396033/SVfMS9xu","privateUrl":"https://go.postman.co/documentation/6396033-f7f9f0c7-f534-47fb-baff-0fe17bfc40d6","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2019-09-27T14:26:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/SVfMS9xu"}