Overview
This tutorial walks you through how to parse a document with the API and extract specific fields from it with the API. This tutorial uses the library and library. In this tutorial, we will:- Parse this PDF: Wire Transfer Form
- Extract these fields: Bank Name and Total Invoice Amount
These examples require the Python or TypeScript client library. Before running a script, set your API key and install the library and any required dependencies.
The scripts have been tested with PDF and PNG files and may work with other file types supported by .
1. Download the Document to Process
Download the Wire Transfer Form and save it to a local directory.2. Create the Script
Copy the script for your language and save it asparse-extract.py or parse-extract.ts in the same directory as the PDF.
3. Run the Script
Run the script from the same directory:4. View Extraction Output
The results are saved to anoutput folder in the same directory. View the extracted fields and metadata in wire-transfer_extract_output.json.
Next Steps
Now that you have a working script, you can:- Replace
wire-transfer.pdfwith any document you want to parse and extract from. - Modify the
schemadictionary to extract different fields. For guidance, see Extraction Schema (JSON). - Use the Playground to build and test a schema before adding it to your code. See Schema Wizard.
- Link extracted fields back to their locations in the original document. See Link Extracted Data to Document Locations.

