Get document results

Use this endpoint to retrieve the document result after successfully calling the /api/analyze endpoint.

When you call the /api/analyze endpoint, it will return a JSON of the document’s data. This endpoint is useful when we do not want to trigger another analysis for a document thats already been analyzed.

This will save you credits!

Tip: Use this endpoint to merge similar tables

Sometimes, tables run across pages but the JSON result will give use two tables instead of one! We can also use this endpoint to merge similar tables together.

Endpoint

GET https://app.pdfdodo.com/api/documents/{id}/results
Retrieves your document data results. We can also use the merge=true query string to merge similar tables together!
Header
X-API-Key
string
Your API key. You can find this from the "Settings" page
Query string
id
guid
The document Id you want to get the results from.
merge
bool
This is optional. Accepts true or false. When true, we will merge tables that spans across multiple pages.

Response

The response will be a JSON similar to the following:

{
  "tables": [
    {
      "title": "The title of your table",
      "tableId": "a0f229f6-ade7-4637-bbff-e31fbbd64ec5",
      "pageNumber": 1,
      "rows": [
        [
          "0",
          "Money In ",
          "$1,880.00 "
        ],
        [
          "1",
          "Money Out ",
          "$150.25 "
        ],
        [
          "2",
          "You Received ",
          "$1,729.75 "
        ]
      ],
      "left": 0.6953286,
      "top": 0.2655254,
      "width": 0.2580709,
      "height": 0.11655326,
      "mergedTables": []
    }    
  ]
}

Example curl request

curl -X GET \
     -H "x-api-key: YOUR_API_KEY_HERE" \
     -H "Content-Type: application/json" \
     "https://app.pdfdodo.com/api/documents/123e4567-e89b-12d3-a456-426614174000/results"

Example curl request with merge tables

curl -X GET \
     -H "x-api-key: YOUR_API_KEY_HERE" \
     -H "Content-Type: application/json" \
     "https://app.pdfdodo.com/api/documents/123e4567-e89b-12d3-a456-426614174000/results?merge=true"