Get OCR results

A step-by-step guide on how to extract the OCR results with API

To get the OCR results via API, get the collection_id of the processed file from:

  • Upload a file endpoint (Base64 or Binary)

  • Get collections endpoint

  • URL e.g. https://workspace.alphamoon.ai/supervision/223742cc9bca43fd81b2d41b0018e4c7

OCR results - plain text

To get the OCR results as plain text, use the following endpoint:

Get OCR results as plain text

GET /api/v0.3/ocr/{collection_id}

Path Parameters

Name
Type
Description

collection-id*

String

The id of the collection for which you want to extract the results.

{
  "collectionId": "c0da3bd0798e4549a1eb673887258dd3",
  "collectionName": "Invoices_2023.pdf",
  "collectionStatus": "Needs Review",
  "processId": "93580f176efb48cda64f25cba74d8ca4",
  "processName": "My invoices",
  "results": [
    {
      "fileId": "c4f70139d07e4b7abbd7162ecc34860c",
      "fileName": "Invoices_2023.pdf",
      "status": {
        "status": "Completed",
        "code": "F100",
        "msg": "Completed"
      },
      "totalPages": 4,
      "createdAt": "2024-01-09T10:20:31Z",
      "documents": [
        {
          "documentId": "6dd70cd65a994409b2cd9b29542796e1",
          "name": "Invoices_2023_#1.pdf",
          "pages": [
            {
              "pageId": "fc60a26ba7604595b98d13b45cbb7682",
              "pageNum": 0,
              "text": "8 INVOICE 55 BILLED TO : Invoice No . 12345 16 June 2025 Imani Olowe +123-456-7890 63 Ivy Road , Hawkville , GA , USA 31036 Item Quantity Unit Price Total Eggshell Camisole Top 1 $123 $123 Cuban Collar Shirt 2 $127 $254 Floral Cotton Dress 1 $123 $123 Subtotal $500 Tax (0 %) $0 Total $500 Thank you ! PAYMENT INFORMATION Briard Bank Account Name : Samira Hadid Account No . : 123-456-7890 Pay by : 5 July 2025 Samira Hadid 123 Anywhere St ., Any City , ST 12345"
            },
            {
              "pageId": "f5e49be0d4304d27adc3b06adf64b42b",
              "pageNum": 1,
              "text": "One Stop Phone Shop Invoice TERMS AND CONDITIONS OF SALE We're sorry there's so much information here but we are required to document our terms and conditions of sale . If you have a query regarding anything you have purchased from us , please call our Customer Services team on 0871 522 3401 or for cashback queries on 0871 522 3404 . If this is too small for you to read comfortably , larger copies are available from Customer Services on the above number . Some sections of these terms are printed in bold to draw your attention to them . In these Terms : \"Airtime Contract \" means a contract entered into between you and your Network Operator relating to the provision of the Services ; \"Equipment \" means equipment including , without limitation , your Mobile Phone , Smart Phone and accessories , datacard , USB modem and other GSM/UMTS equipment ; \"Minimum Period \" means the minimum period for the provision of the Services under your Airtime Contract ; \"Mobile Phone \" means a cellular telephone or other device which incorporates a SIM Card used by you to receive the Services and any accessories included in the price of your phone provided to you by us ; \"Network \" means the mobile telecommunication system run by your Network Operator ; \"Network Operator \" means a Network provider nominated by us to you into which you have entered any Airtime Contract ; \"Services \" means services including airtime services enabling you to make or receive calls and to send and receive data by means of the Network ; and \"Smart Phone \" means PDA , MDA , XDA , Blackberry and similar devices and any accessories included in the price of your device provided to you by us . All orders for Equipment from a buyer (\"you \") accepted by One Stop Phone Shop (a trading division of The Carphone Warehouse Limited ) (\"One Stop Phone Shop \" or \"we/our/us \") are subject exclusively and strictly to the following conditions and no alterations proposed by you shall be binding unless we agree in writing : 1 . ORDERS AND SPECIFICATIONS 1.1 . We shall not be deemed to have accepted your order for Equipment unless it has been confirmed in writing by one of our authorised representatives . 1.2 . You shall be responsible for ensuring the Equipment you purchase is of the correct specification for its intended use and location . 1.3 . From time to time we may have to make changes in the specification of the Equipment : 1.3.1 . to make it conform with any applicable safety or other statutory requirements ; or 1.3.2 . to make it reflect changes in the manufacturer's specification . 1.4 . We may also have to make other necessary changes in the specification of the Equipment from time to time , but these will not materially reduce the quality or performance of the Equipment . 2 . PRICE OF EQUIPMENT 2.1 . Subject to clause 2.3 , the price of the Equipment shall be our quoted price (which we can change in the case of an error ) or , where no price has been quoted (or a quoted price is no longer valid ), the price listed in our published price list current at the date we accept your order . For the avoidance of doubt , the date that we accept your order shall be the date that the Equipment is despatched ."
            },
            {
              "pageId": "336ba7bf98364c72ba7e090d44ee3b47",
              "pageNum": 2,
              "text": "One Stop Phone Shop Invoice TERMS AND CONDITIONS OF SALE We're sorry there's so much information here but we are required to document our terms and conditions of sale . If you have a query regarding anything you have purchased from us , please call our Customer Services team on 0871 522 3401 or for cashback queries on 0871 522 3404 . If this is too small for you to read comfortably , larger copies are available from Customer Services on the above number . Some sections of these terms are printed in bold to draw your attention to them . In these Terms : \"Airtime Contract \" means a contract entered into between you and your Network Operator relating to the provision of the Services ; \"Equipment \" means equipment including , without limitation , your Mobile Phone , Smart Phone and accessories , datacard , USB modem and other GSM/UMTS equipment ; \"Minimum Period \" means the minimum period for the provision of the Services under your Airtime Contract ; \"Mobile Phone \" means a cellular telephone or other device which incorporates a SIM Card used by you to receive the Services and any accessories included in the price of your phone provided to you by us ; \"Network \" means the mobile telecommunication system run by your Network Operator ; \"Network Operator \" means a Network provider nominated by us to you into which you have entered any Airtime Contract ; \"Services \" means services including airtime services enabling you to make or receive calls and to send and receive data by means of the Network ; and \"Smart Phone \" means PDA , MDA , XDA , Blackberry and similar devices and any accessories included in the price of your device provided to you by us . All orders for Equipment from a buyer (\"you \") accepted by One Stop Phone Shop (a trading division of The Carphone Warehouse Limited ) (\"One Stop Phone Shop \" or \"we/our/us \") are subject exclusively and strictly to the following conditions and no alterations proposed by you shall be binding unless we agree in writing : 1 . ORDERS AND SPECIFICATIONS 1.1 . We shall not be deemed to have accepted your order for Equipment unless it has been confirmed in writing by one of our authorised representatives . 1.2 . You shall be responsible for ensuring the Equipment you purchase is of the correct specification for its intended use and location . 1.3 . From time to time we may have to make changes in the specification of the Equipment : 1.3.1 . to make it conform with any applicable safety or other statutory requirements ; or 1.3.2 . to make it reflect changes in the manufacturer's specification . 1.4 . We may also have to make other necessary changes in the specification of the Equipment from time to time , but these will not materially reduce the quality or performance of the Equipment . 2 . PRICE OF EQUIPMENT 2.1 . Subject to clause 2.3 , the price of the Equipment shall be our quoted price (which we can change in the case of an error ) or , where no price has been quoted (or a quoted price is no longer valid ), the price listed in our published price list current at the date we accept your order . For the avoidance of doubt , the date that we accept your order shall be the date that the Equipment is despatched ."
            }
          ]
        },
        {
          "documentId": "50cdac7ea33542efa47918d72361d01a",
          "name": "Invoices_2023_#2.pdf",
          "pages": [
            {
              "pageId": "e0b5db9050ee4523afc371fdd93345d0",
              "pageNum": 0,
              "text": "Example Business Name or Business Owner 123 Example Business Address Boston , MA 02135 INVOICE Example Customer Name 456 Example Customer Address Boston , MA 02135 Invoice # 123456 Invoice Date 08/19/2020 Due Date 09/19/2020 Item Description Unit Price Quantity Amount Service Example of service in industry 25.00 4.00 100.00 Product Example of product in industry 500.00 1.00 500.00 Discount Example of discount in industry -100.00 1.00 -100.00 NOTES : Provide a concise , professional description of the services , product , and discount listed above . Subtotal 600.00 Total 500.00 Amount Paid 0.00 Balance Due $500.00"
            }
          ]
        }
      ]
    }
  ]
}

See the example

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/ocr/c0da3bd0798e4549a1eb673887258dd3' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'

OCR results - list of detected words

Using the following endpoint, you'll get the OCR results as a list of detected words, containing Relative Bounding Boxes for each word with the relative value between 0-1 in terms of the position in the picture.

Get OCR results as a list of detected words

GET /api/v0.3/ocr/{collection_id}/words

Path Parameters

Name
Type
Description

collection-id*

String

The id of the collection for which you want to extract the results.

{
  "collectionId": "c0da3bd0798e4549a1eb673887258dd3",
  "collectionName": "Invoices_2023.pdf",
  "collectionStatus": "Needs Review",
  "processId": "93580f176efb48cda64f25cba74d8ca4",
  "processName": "My invoices",
  "results": [
    {
      "fileId": "c4f70139d07e4b7abbd7162ecc34860c",
      "fileName": "Invoices_2023.pdf",
      "status": {
        "status": "Completed",
        "code": "F100",
        "msg": "Completed"
      },
      "totalPages": 4,
      "createdAt": "2024-01-09T10:20:31Z",
      "documents": [
        {
          "documentId": "6dd70cd65a994409b2cd9b29542796e1",
          "name": "Invoices_2023_#1.pdf",
          "pages": [
            {
              "pageId": "fc60a26ba7604595b98d13b45cbb7682",
              "pageNum": 0,
              "words": [
                {
                  "id": "9ab0e2966cbd4741a7d3c664ec09d55b",
                  "value": "8",
                  "x": 0.11796733212341198,
                  "y": 0.08336896109448483,
                  "width": 0.06715063520871142,
                  "height": 0.05643437366395895
                },
                {
                  "id": "79fc4a68735d44c2bf7fca2c52e521b2",
                  "value": "INVOICE",
                  "x": 0.6079854809437386,
                  "y": 0.09833262077811031,
                  "width": 0.26557773744706603,
                  "height": 0.041898247114151355
                },
                {
                  "id": "35bbab2cf5a4444e981bb99232f34a44",
                  "value": "55",
                  "x": 0.1572897761645493,
                  "y": 0.12697734074390765,
                  "width": 0.008469449485783431,
                  "height": 0.0025651988029072315
                },
                {
                  "id": "8b03ee3f880141209f8922cab0615a74",
                  "value": "BILLED",
                  "x": 0.11736237144585603,
                  "y": 0.21419410004275333,
                  "width": 0.06473079249848758,
                  "height": 0.01496365968362548
                },
                {
                  "id": "6500aeef431d4a358f2e2b0d88db01bf",
                  "value": "TO",
                  "x": 0.1869328493647913,
                  "y": 0.21419410004275333,
                  "width": 0.02460173422060899,
                  "height": 0.01496365968362548
                },
                {
                  "id": "d495bd4940dd46229366ff61b2061e54",
                  "value": ":",
                  "x": 0.21153458358540028,
                  "y": 0.21419410004275333,
                  "width": 0.012300867110304509,
                  "height": 0.01496365968362548
                },
                {
                  "id": "fe3aac51af86411481ec627ec9b093f9",
                  "value": "Invoice",
                  "x": 0.7102238354506957,
                  "y": 0.21333903377511756,
                  "width": 0.07138535995160322,
                  "height": 0.016673792218896977
                },
                {
                  "id": "0d6e126d73e4414383d4cc90cbe6395a",
                  "value": "No",
                  "x": 0.7828191167574108,
                  "y": 0.2129115006412997,
                  "width": 0.025005041338979628,
                  "height": 0.01667379221889695
                },
                {
                  "id": "364b512932ac41b1927bbc47d43a2a0d",
                  "value": ".",
                  "x": 0.8078241580963904,
                  "y": 0.2129115006412997,
                  "width": 0.01250252066948987,
                  "height": 0.01667379221889695
                },
                {
                  "id": "cca71a6e875b47a880cc84ca2a9d1173",
                  "value": "12345",
                  "x": 0.8203266787658803,
                  "y": 0.21205643437366395,
                  "width": 0.05989110707803991,
                  "height": 0.017101325352714858
                },
                {
                  "id": "ad07efabd53947a0846470df8fe1d6f6",
                  "value": "16",
                  "x": 0.7549909255898367,
                  "y": 0.23300555793073963,
                  "width": 0.02298850574712641,
                  "height": 0.01496365968362548
                },
                {
                  "id": "816097e0ed6d4c75b367b22fb7b5fe9b",
                  "value": "June",
                  "x": 0.7803992740471869,
                  "y": 0.23300555793073963,
                  "width": 0.04597701149425293,
                  "height": 0.01496365968362548
                },
                {
                  "id": "cd26a661d688472c81281a1546dcddfc",
                  "value": "2025",
                  "x": 0.8312159709618875,
                  "y": 0.23300555793073963,
                  "width": 0.04597701149425282,
                  "height": 0.01496365968362548
                },
                {
                  "id": "b7728993421f4b068f800a92a6d03002",
                  "value": "Imani",
                  "x": 0.11373260738052027,
                  "y": 0.23685335613510047,
                  "width": 0.05747126436781608,
                  "height": 0.01752885848653271
                },
                {
                  "id": "bbfc58bdb5074424af91cff330c00cb3",
                  "value": "Olowe",
                  "x": 0.17120387174833634,
                  "y": 0.23685335613510047,
                  "width": 0.056866303690260134,
                  "height": 0.01752885848653271
                },
                {
                  "id": "5c399ee246ee4ef6bf07ddeb65422470",
                  "value": "+123-456-7890",
                  "x": 0.11736237144585603,
                  "y": 0.2556648140230868,
                  "width": 0.14640048396854205,
                  "height": 0.014963659683625508
                },
                {
                  "id": "8b13156540634ed0901413d3c52b0ee5",
                  "value": "63",
                  "x": 0.11494252873563218,
                  "y": 0.2740487387772552,
                  "width": 0.027828191167574096,
                  "height": 0.01795639162035062
                },
                {
                  "id": "c8413574189c436abaac6ad03227f63d",
                  "value": "Ivy",
                  "x": 0.14277071990320628,
                  "y": 0.2740487387772552,
                  "width": 0.03448275862068967,
                  "height": 0.01795639162035062
                },
                {
                  "id": "1330333d9dde463da0ddebcf6e7dd667",
                  "value": "Road",
                  "x": 0.17725347852389595,
                  "y": 0.2740487387772552,
                  "width": 0.04815486993345433,
                  "height": 0.01795639162035062
                },
                {
                  "id": "ef9866f25154474b98f52752b645cac6",
                  "value": ",",
                  "x": 0.22540834845735028,
                  "y": 0.2740487387772552,
                  "width": 0.012038717483363576,
                  "height": 0.01795639162035062
                },
                {
                  "id": "38d06bcbca044722a507dc02bc31ebe9",
                  "value": "Hawkville",
                  "x": 0.23744706594071385,
                  "y": 0.2740487387772552,
                  "width": 0.08656987295825769,
                  "height": 0.01795639162035062
                },
                {
                  "id": "81e05aae312344769ac5bfb13d9df9d9",
                  "value": ",",
                  "x": 0.32401693889897154,
                  "y": 0.2740487387772552,
                  "width": 0.009618874773139774,
                  "height": 0.01795639162035062
                },
                {
                  "id": "803b1d13ca904237bc73e1798a71df9c",
                  "value": "GA",
                  "x": 0.3336358136721113,
                  "y": 0.2740487387772552,
                  "width": 0.025005041338979628,
                  "height": 0.01795639162035062
                },
                {
                  "id": "f07d87213db249bd9ca2da429eecab45",
                  "value": ",",
                  "x": 0.35864085501109094,
                  "y": 0.2740487387772552,
                  "width": 0.012502520669489814,
                  "height": 0.01795639162035062
                },
                {
                  "id": "0df1695da9b94653ad72f5b48000a5aa",
                  "value": "USA",
                  "x": 0.37114337568058076,
                  "y": 0.2740487387772552,
                  "width": 0.04143980641258321,
                  "height": 0.01795639162035062
                },
                {
                  "id": "35f4381b8df64fde8d12b32c33e4c7d3",
                  "value": "31036",
                  "x": 0.4162129461584997,
                  "y": 0.2740487387772552,
                  "width": 0.05928614640048396,
                  "height": 0.01795639162035062
              ]
            }
          ]
        }
      ]
    }
  ]
}

See the example:

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/ocr/c0da3bd0798e4549a1eb673887258dd3/words' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'

OCR results - list of detected tables

If you wish to get the OCR results as a list of detected tables, use the following endpoint:

Get OCR results as a list of detected tables

GET /api/v0.3/ocr/{collection_id}/tables

Path Parameters

Name
Type
Description

collection-id*

String

The id of the collection for which you want to extract the results.

{
  "collectionId": "c0da3bd0798e4549a1eb673887258dd3",
  "collectionName": "Invoices_2023.pdf",
  "collectionStatus": "Needs Review",
  "processId": "93580f176efb48cda64f25cba74d8ca4",
  "processName": "My invoices",
  "results": [
    {
      "fileId": "c4f70139d07e4b7abbd7162ecc34860c",
      "fileName": "Invoices_2023.pdf",
      "status": {
        "status": "Completed",
        "code": "F100",
        "msg": "Completed"
      },
      "totalPages": 4,
      "createdAt": "2024-01-09T10:20:31Z",
      "documents": [
        {
          "documentId": "6dd70cd65a994409b2cd9b29542796e1",
          "name": "Invoices_2023_#1.pdf",
          "pages": [
            {
              "pageId": "fc60a26ba7604595b98d13b45cbb7682",
              "pageNum": 0,
              "tables": [
                {
                  "id": "69291318ed364dce8760a2f37e9ebc92",
                  "rows": [
                    [
                      {
                        "id": "8035c18244834e53903b16da83e81140",
                        "text": "Item",
                        "x": 0.11632335515312069,
                        "y": 0.34553495049476624,
                        "width": 0.42286526323879253,
                        "height": 0.0432652753864205
                      },
                      {
                        "id": "9bd930412ccc46828f3e1771120553a1",
                        "text": "Quantity",
                        "x": 0.5391886183919132,
                        "y": 0.34553495049476624,
                        "width": 0.11284194494548605,
                        "height": 0.0432652753864205
                      },
                      {
                        "id": "be4f34ee906841c993f1a6ea0135f46e",
                        "text": "Unit Price",
                        "x": 0.6520305633373993,
                        "y": 0.34553495049476624,
                        "width": 0.12871874817486462,
                        "height": 0.0432652753864205
                      },
                      {
                        "id": "6dbdac221ca74f8dbc78b260ddff1b44",
                        "text": "Total",
                        "x": 0.7807493115122639,
                        "y": 0.34553495049476624,
                        "width": 0.10689890752470432,
                        "height": 0.0432652753864205
                      }
                    ],
                    [
                      {
                        "id": "c847c2c13b5c4c41aeb414aa84586ba2",
                        "text": "Eggshell Camisole Top",
                        "x": 0.11632335515312069,
                        "y": 0.38880022588118673,
                        "width": 0.42286526323879253,
                        "height": 0.04450030905816127
                      },
                      {
                        "id": "5486fdff6c9a49a28a4db53eb5edbb27",
                        "text": "1",
                        "x": 0.5391886183919132,
                        "y": 0.38880022588118673,
                        "width": 0.11284194494548605,
                        "height": 0.04450030905816127
                      },
                      {
                        "id": "2d43c4ba5d054f9d98d0526e6f23c793",
                        "text": "$123",
                        "x": 0.6520305633373993,
                        "y": 0.38880022588118673,
                        "width": 0.12871874817486462,
                        "height": 0.04450030905816127
                      },
                      {
                        "id": "d91a96df52904c6c8edc09619373f4f3",
                        "text": "$123",
                        "x": 0.7807493115122639,
                        "y": 0.38880022588118673,
                        "width": 0.10689890752470432,
                        "height": 0.04450030905816127
                      }
                    ],
                    [
                      {
                        "id": "5339cf8adaea4e88baf134756add19cc",
                        "text": "Cuban Collar Shirt",
                        "x": 0.11632335515312069,
                        "y": 0.433300534939348,
                        "width": 0.42286526323879253,
                        "height": 0.04286088343102895
                      },
                      {
                        "id": "7c0b0abbeeb647279da59f0f37c43d2d",
                        "text": "2",
                        "x": 0.5391886183919132,
                        "y": 0.433300534939348,
                        "width": 0.11284194494548605,
                        "height": 0.04286088343102895
                      },
                      {
                        "id": "2076d3e2a7db4680bd30a2a9a478965d",
                        "text": "$127",
                        "x": 0.6520305633373993,
                        "y": 0.433300534939348,
                        "width": 0.12871874817486462,
                        "height": 0.04286088343102895
                      },
                      {
                        "id": "7046292438c244c9a88732cc100ccd26",
                        "text": "$254",
                        "x": 0.7807493115122639,
                        "y": 0.433300534939348,
                        "width": 0.10689890752470432,
                        "height": 0.04286088343102895
                      }
                    ],
                    [
                      {
                        "id": "708b22f00ae64cc5897850e6e2fbce83",
                        "text": "Floral Cotton Dress",
                        "x": 0.11632335515312069,
                        "y": 0.47616141837037695,
                        "width": 0.42286526323879253,
                        "height": 0.039864938755532875
                      },
                      {
                        "id": "8d40a152e367407fb7ac6955c503576c",
                        "text": "1",
                        "x": 0.5391886183919132,
                        "y": 0.47616141837037695,
                        "width": 0.11284194494548605,
                        "height": 0.039864938755532875
                      },
                      {
                        "id": "cf22d8cacac94a7884b8094f3baa04e6",
                        "text": "$123",
                        "x": 0.6520305633373993,
                        "y": 0.47616141837037695,
                        "width": 0.12871874817486462,
                        "height": 0.039864938755532875
                      },
                      {
                        "id": "5735ef4a213e44d3a1080f12de719283",
                        "text": "$123",
                        "x": 0.7807493115122639,
                        "y": 0.47616141837037695,
                        "width": 0.10689890752470432,
                        "height": 0.039864938755532875
                      }
                    ],
                    [
                      {
                        "id": "0a3ac93ffafd4eaa940f95909127b829",
                        "text": "",
                        "x": 0.11632335515312069,
                        "y": 0.5160263571259098,
                        "width": 0.42286526323879253,
                        "height": 0.08732764350904154
                      },
                      {
                        "id": "dbbaf03dccd54ad5be6cb228054d49e6",
                        "text": "",
                        "x": 0.5391886183919132,
                        "y": 0.5160263571259098,
                        "width": 0.11284194494548605,
                        "height": 0.08732764350904154
                      },
                      {
                        "id": "ed83bcefab644c2cb6f81063b414cbf7",
                        "text": "Subtotal Tax (0 %)",
                        "x": 0.6520305633373993,
                        "y": 0.5160263571259098,
                        "width": 0.12871874817486462,
                        "height": 0.08732764350904154
                      },
                      {
                        "id": "0c9f37c3c89740e39d1460d92c3eb2ec",
                        "text": "$500 $0",
                        "x": 0.7807493115122639,
                        "y": 0.5160263571259098,
                        "width": 0.10689890752470432,
                        "height": 0.08732764350904154
                      }
                    ],
                    [
                      {
                        "id": "579bde759fd44f8aa270d5983d221ea2",
                        "text": "",
                        "x": 0.11632335515312069,
                        "y": 0.6033540006349514,
                        "width": 0.42286526323879253,
                        "height": 0.0448744086028674
                      },
                      {
                        "id": "cb49b270d7cd4b2d8bbadaa31c6ae98c",
                        "text": "",
                        "x": 0.5391886183919132,
                        "y": 0.6033540006349514,
                        "width": 0.11284194494548605,
                        "height": 0.0448744086028674
                      },
                      {
                        "id": "97df277d045f45ab867d0ba6cd5b6e14",
                        "text": "Total",
                        "x": 0.6520305633373993,
                        "y": 0.6033540006349514,
                        "width": 0.12871874817486462,
                        "height": 0.0448744086028674
                      },
                      {
                        "id": "1e15b686acc7404498ffde6c4a2cf573",
                        "text": "$500",
                        "x": 0.7807493115122639,
                        "y": 0.6033540006349514,
                        "width": 0.10689890752470432,
                        "height": 0.0448744086028674
                      }
                    ]
                  ],
                  "boundingBox": {
                    "x": 0.11632335515312069,
                    "y": 0.34553495049476624,
                    "width": 0.7710416593604326,
                    "height": 0.302622526884079
                  }
                }
              ]
            },
            {
              "pageId": "f5e49be0d4304d27adc3b06adf64b42b",
              "pageNum": 1,
              "tables": []
            },
            {
              "pageId": "336ba7bf98364c72ba7e090d44ee3b47",
              "pageNum": 2,
              "tables": []
            }
          ]
        },
        {
          "documentId": "50cdac7ea33542efa47918d72361d01a",
          "name": "Invoices_2023_#2.pdf",
          "pages": [
            {
              "pageId": "e0b5db9050ee4523afc371fdd93345d0",
              "pageNum": 0,
              "tables": [
                {
                  "id": "65489db30ea94ba1942d14d8aa6f5acd",
                  "rows": [
                    [
                      {
                        "id": "8f7f384e47404e979379af095e79a9d3",
                        "text": "Item",
                        "x": 0.14366939663887024,
                        "y": 0.4517716887247496,
                        "width": 0.07591890213376387,
                        "height": 0.046019892772255155
                      },
                      {
                        "id": "9f4e6f7195394f3ba0cb4f308972e1fe",
                        "text": "Description",
                        "x": 0.2195882987726341,
                        "y": 0.4517716887247496,
                        "width": 0.35560231684822974,
                        "height": 0.046019892772255155
                      },
                      {
                        "id": "77911abf04d14d728413e553d79b3618",
                        "text": "Unit Price",
                        "x": 0.5751906156208638,
                        "y": 0.4517716887247496,
                        "width": 0.099514305158373,
                        "height": 0.046019892772255155
                      },
                      {
                        "id": "824f8147de8a478b8f31a79899429ec1",
                        "text": "Quantity",
                        "x": 0.6747049207792368,
                        "y": 0.4517716887247496,
                        "width": 0.10277649651943688,
                        "height": 0.046019892772255155
                      },
                      {
                        "id": "8c2339ea3fa64170a9ae181cfdc5f442",
                        "text": "Amount",
                        "x": 0.7774814172986737,
                        "y": 0.4517716887247496,
                        "width": 0.066487252533869,
                        "height": 0.046019892772255155
                      }
                    ],
                    [
                      {
                        "id": "f461f9396187418b8a8e14f561809a8f",
                        "text": "Service",
                        "x": 0.14366939663887024,
                        "y": 0.49779158149700475,
                        "width": 0.07591890213376387,
                        "height": 0.048136464075038354
                      },
                      {
                        "id": "c486b8abbf3c4e049488610d95789937",
                        "text": "Example of service in industry",
                        "x": 0.2195882987726341,
                        "y": 0.49779158149700475,
                        "width": 0.35560231684822974,
                        "height": 0.048136464075038354
                      },
                      {
                        "id": "0533fc6870e445c0ada451f5be618ada",
                        "text": "25.00",
                        "x": 0.5751906156208638,
                        "y": 0.49779158149700475,
                        "width": 0.099514305158373,
                        "height": 0.048136464075038354
                      },
                      {
                        "id": "169f815c3ea44c3f808c6fc5e4a2c6b6",
                        "text": "4.00",
                        "x": 0.6747049207792368,
                        "y": 0.49779158149700475,
                        "width": 0.10277649651943688,
                        "height": 0.048136464075038354
                      },
                      {
                        "id": "9777a4b3612b4755ace700f14612c5f1",
                        "text": "100.00",
                        "x": 0.7774814172986737,
                        "y": 0.49779158149700475,
                        "width": 0.066487252533869,
                        "height": 0.048136464075038354
                      }
                    ],
                    [
                      {
                        "id": "6ed93cc4590d4941a727f46df27eb834",
                        "text": "Product",
                        "x": 0.14366939663887024,
                        "y": 0.5459280455720431,
                        "width": 0.07591890213376387,
                        "height": 0.04544297673813291
                      },
                      {
                        "id": "84a5941a591241aa8202fc9b8e986b4b",
                        "text": "Example of product in industry",
                        "x": 0.2195882987726341,
                        "y": 0.5459280455720431,
                        "width": 0.35560231684822974,
                        "height": 0.04544297673813291
                      },
                      {
                        "id": "2e1a77f1c7854e688343e886a84e4909",
                        "text": "500.00",
                        "x": 0.5751906156208638,
                        "y": 0.5459280455720431,
                        "width": 0.099514305158373,
                        "height": 0.04544297673813291
                      },
                      {
                        "id": "9a5b36cff64f420090fb8daa6e9a512f",
                        "text": "1.00",
                        "x": 0.6747049207792368,
                        "y": 0.5459280455720431,
                        "width": 0.10277649651943688,
                        "height": 0.04544297673813291
                      },
                      {
                        "id": "af890ddb4686450aab8b9a4dfb789b42",
                        "text": "500.00",
                        "x": 0.7774814172986737,
                        "y": 0.5459280455720431,
                        "width": 0.066487252533869,
                        "height": 0.04544297673813291
                      }
                    ],
                    [
                      {
                        "id": "b0e8f9e193a743cabda9f8ba65395952",
                        "text": "Discount",
                        "x": 0.14366939663887024,
                        "y": 0.591371022310176,
                        "width": 0.07591890213376387,
                        "height": 0.04491367306914096
                      },
                      {
                        "id": "a5376335bd9c47cda3b2cf8109f3d10b",
                        "text": "Example of discount in industry",
                        "x": 0.2195882987726341,
                        "y": 0.591371022310176,
                        "width": 0.35560231684822974,
                        "height": 0.04491367306914096
                      },
                      {
                        "id": "a93c786367374f678f6916b4cd380249",
                        "text": "-100.00",
                        "x": 0.5751906156208638,
                        "y": 0.591371022310176,
                        "width": 0.099514305158373,
                        "height": 0.04491367306914096
                      },
                      {
                        "id": "d3f9b4a9ef5e4b1499064489701652ba",
                        "text": "1.00",
                        "x": 0.6747049207792368,
                        "y": 0.591371022310176,
                        "width": 0.10277649651943688,
                        "height": 0.04491367306914096
                      },
                      {
                        "id": "9942bf3076d5427e8333363241bbbb6c",
                        "text": "-100.00",
                        "x": 0.7774814172986737,
                        "y": 0.591371022310176,
                        "width": 0.066487252533869,
                        "height": 0.04491367306914096
                      }
                    ]
                  ],
                  "boundingBox": {
                    "x": 0.14366939663887024,
                    "y": 0.45177168872474965,
                    "width": 0.7002497613430023,
                    "height": 0.18491586927550935
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

See the example:

curl -X 'GET' \
  'https://workspace.alphamoon.ai/api/v0.3/ocr/c0da3bd0798e4549a1eb673887258dd3/tables' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic API_KEY_BASE64_ENCODED'

See next:

Last updated