- Parse this PDF: Wire Transfer Form
- Extract these fields: Bank Name and Total Invoice Amount
- Save the parse response and the extract response as JSON files
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 parse with a synchronous request, which consumes credits at the full rate. To parse many documents, submit them as Parse Jobs on the
standard tier, which consume half the credits. See Parse a Directory of Documents.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 the Output
The script prints the extracted values and saves two files to anoutput folder in the same directory:
The extract response has these top-level fields:
A run on the wire transfer form saved this
wire-transfer_extract_output.json, shown with the IDs and most of the Markdown shortened. Your ranges and metadata can differ, because they depend on your parse and the model version:
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
schemato extract different fields. For guidance, see Extraction Schema (JSON). - Find each extracted value on the page: pass
extraction_metadataand the parse’sstructureto the Ground API. See Link Extracted Data to Document Locations.