Try synchronous extraction

Try out the most commonly used endpoint, the /extract endpoint. This endpoint accepts a document (PDF or image file) and returns extracted data synchronously.

Audience

If you're new to APIs, use this tutorial to return document data from an example tax form.

Or, if you're familiar with APIs:

  • see the quickstart to get a sample API response.

  • explore the Sensible Postman collection:

Run in Postman

Prerequisites

See prerequisites.

Run the request in Postman

To run a Sensible API request in Postman, follow these steps:

  1. Copy the following code sample, and replace YOUR_API_KEY with your API key:
curl --request POST \
  --url 'https://api.sensible.so/v0/extract/tax_forms' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/pdf' \
  --data-binary '@/PATH_TO_DOWNLOADED_PDF.pdf'
  1. In your Postman workspace, click Import, select Raw text, paste the code sample, and follow the prompts to import to code sample.

Click to enlarge

  1. Download the following example PDF, which works with the prerequisite tax_forms document type:

Download the following example tax form:

Example PDFDownload link
  1. Correct the path to the downloaded PDF: In the request, click the Body tab, select binary, then click Select file and select the PDF you downloaded:

Click to enlarge

  1. Click Send. The response includes a parsed_document object that looks something like the following:
{
    "parsed_document": {
        "year": {
            "type": "string",
            "value": "2021"
        },
        "filing_status.single": {
            "type": "boolean",
            "value": true
        },
        "filing_status.married_filing_jointly": {
            "type": "boolean",
            "value": false
        },
        "filing_status.married_filing_separately": {
            "type": "boolean",
            "value": false
        },
        "filing_status.head_of_household": {
            "type": "boolean",
            "value": false
        },
        "filing_status.qualifying_widow": {
            "type": "boolean",
            "value": false
        },
        "name": {
            "type": "string",
            "value": "Connor Roy"
        },
        "ssn": {
            "type": "string",
            "value": "337-18-2333"
        }
    }
}

Note: Did you notice that this API call doesn't specify a config (1040_2021)? As a convenience, Sensible evaluates all the configs for the document type (tax_forms), and automatically chooses the one that fits best.

(Optional) See how it works in the Sensible app

To see this example in the Sensible app:

  1. Log into the Sensible app.

  2. Navigate to the 1040 configuration in the tax forms document type.

  3. Visually examine the example PDF (middle pane), config (left pane), and extracted data (right pane) to better understand the configuration for the API call you just ran:

q