Skip to main content
Use the API to convert documents into structured Markdown, chunks, and metadata. The API identifies elements like text, tables, and form fields with exact page and coordinate references. After parsing, you can:

Use ADE Parse to Parse Documents

Use the API to parse data from documents. See the full API reference here. To get detailed information about the API response, go to JSON Response for Parsing.
Rotation detection can be enabled upon request. To request this feature, contact [email protected].

Specify Documents to Parse

The API offers two parameters for specifying the document you want to parse:
  • document: Specify the actual file you want to parse.
  • document_url: Include the URL to the file that you want to parse.

Set Up Splits for Parsing

By default, the full document is parsed when you call the API. However, you can set the split parameter to page to parse each page of the document separately. When this is selected, the splits object in the API output contains a set of data for each page.

Example: Parse a Document with the API

This example shows how to parse a document with the API and save the Markdown output to a file. Materials:
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
}

url = 'https://api.va.landing.ai/v1/ade/parse'

# Upload a document
document = open('wire-transfer.pdf', 'rb')
files = {'document': document}
data = {'model': 'dpt-2-latest'}

response = requests.post(url, files=files, data=data, headers=headers)
response_data = response.json()

# Print the full response
print(response_data)

# Extract and save the markdown content
if 'markdown' in response_data:
    markdown_content = response_data['markdown']

    # Save markdown content to file
    with open('markdown-wire-transfer.md', 'w', encoding='utf-8') as f:
        f.write(markdown_content)

    print("\nMarkdown content saved to a Markdown file.")
else:
    print("No 'markdown' field found in the response")

# Close the file
document.close()
The full response will be similar to the JSON below. Notice that each chunk has an id. For example, the first chunk is the text ”# WIRE TRANSFER FORM”. The id for that chunk is 33335548-e7c3-40bd-898e-4f23d6c99d34.
{
   'markdown':"<a id='33335548-e7c3-40bd-898e-4f23d6c99d34'></a>\n\n# WIRE TRANSFER FORM\n\n<a id='0777dc07-855b-4b83-b422-5e8063405249'></a>\n\nInvoice Information\n\nInvoice Description: Professional consulting services - Q3 2025\n\nTotal Invoice Amount: $15,750.00 USD\n\n<a id='7c56b114-cc66-4fe4-99cb-9425a5210747'></a>\n\nBeneficiary Bank Information\n\nBank Name: JPMorgan Chase Bank, N.A.\n\nBank Address: 270 Park Avenue, New York, NY 10017, USA\n\nBank Account Number: 4578923456789012\n\nSWIFT Code: CHASUS33\n\nABA Routing Number: 021000021\n\nACH Routing Number: 021000021\n\n<a id='b95955a2-3f1d-4b96-be12-d5af677efd60'></a>\n\nInvoice Line Items\n<table><thead><tr><th>Description</th><th>Amount</th></tr></thead><tbody><tr><td>Strategic planning consultation (40 hours @ $150/hr)</td><td>$6,000.00</td></tr><tr><td>Market analysis report preparation</td><td>$3,500.00</td></tr><tr><td>Implementation roadmap development</td><td>$2,250.00</td></tr><tr><td>Executive presentation materials</td><td>$1,500.00</td></tr><tr><td>Follow-up consultation sessions (15 hours @ $150/hr)</td><td>$2,250.00</td></tr><tr><td>Travel expenses (reimbursable)</td><td>$250.00</td></tr><tr><td>TOTAL</td><td>$15,750.00</td></tr></tbody></table>\n\n<a id='d9296cc1-f804-43e2-9f0f-99e7c62eec48'></a>\n\nWire Transfer Instructions\n\nPayment Method: International Wire Transfer\nCurrency: USD (United States Dollars)\nBeneficiary Name: ABC Consulting Services LLC\n\n<a id='f2b8a1d4-4436-4e05-9467-bdaf5ca4bd3b'></a>\n\nBeneficiary Address: 1234 Business Park Drive, Suite 500, Los Angeles, CA 90210, USA\n\nPurpose of Payment: Payment for professional consulting services as per Invoice #INV-2025-0847\n\n<a id='1d536fff-e204-48d4-a53a-8e524665aec5'></a>\n\n- Special Instructions:\n  - Please include invoice number INV-2025-0847 in the payment reference\n  - All bank charges to be borne by the sender\n  - Payment should be received within 3-5 business days\n  - Please send wire confirmation receipt to [email protected]\n  - For any questions regarding this transfer, contact: +1 (555) 123-4567\n\n<a id='fb34e8c2-0aa6-4866-895d-060c07b717ea'></a>\n\n**Urgency:** Standard processing (3-5 business days acceptable)\n\n<a id='7c686aab-8142-4da2-a7e7-dae4495aade5'></a>\n\nForm completed on: September 3, 2025\n\nReference Number: WT-2025-0847",
   'chunks':[
      {
         'markdown':'# WIRE TRANSFER FORM',
         'type':'text',
         'id':'33335548-e7c3-40bd-898e-4f23d6c99d34',
         'grounding':{
            'box':{
               'left':0.2622728943824768,
               'top':0.07604080438613892,
               'right':0.7369285821914673,
               'bottom':0.10924206674098969
            },
            'page':0
         }
      },
      {
         'markdown':'Invoice Information\n\nInvoice Description: Professional consulting services - Q3 2025\n\nTotal Invoice Amount: $15,750.00 USD',
         'type':'text',
         'id':'0777dc07-855b-4b83-b422-5e8063405249',
         'grounding':{
            'box':{
               'left':0.10331332683563232,
               'top':0.13015401363372803,
               'right':0.8966385126113892,
               'bottom':0.2544138431549072
            },
            'page':0
         }
      },
      {
         'markdown':'Beneficiary Bank Information\n\nBank Name: JPMorgan Chase Bank, N.A.\n\nBank Address: 270 Park Avenue, New York, NY 10017, USA\n\nBank Account Number: 4578923456789012\n\nSWIFT Code: CHASUS33\n\nABA Routing Number: 021000021\n\nACH Routing Number: 021000021',
         'type':'text',
         'id':'7c56b114-cc66-4fe4-99cb-9425a5210747',
         'grounding':{
            'box':{
               'left':0.10399597883224487,
               'top':0.2693082094192505,
               'right':0.895996630191803,
               'bottom':0.5048781633377075
            },
            'page':0
         }
      },
      {
         'markdown':'Invoice Line Items\n<table><thead><tr><th>Description</th><th>Amount</th></tr></thead><tbody><tr><td>Strategic planning consultation (40 hours @ $150/hr)</td><td>$6,000.00</td></tr><tr><td>Market analysis report preparation</td><td>$3,500.00</td></tr><tr><td>Implementation roadmap development</td><td>$2,250.00</td></tr><tr><td>Executive presentation materials</td><td>$1,500.00</td></tr><tr><td>Follow-up consultation sessions (15 hours @ $150/hr)</td><td>$2,250.00</td></tr><tr><td>Travel expenses (reimbursable)</td><td>$250.00</td></tr><tr><td>TOTAL</td><td>$15,750.00</td></tr></tbody></table>',
         'type':'table',
         'id':'b95955a2-3f1d-4b96-be12-d5af677efd60',
         'grounding':{
            'box':{
               'left':0.10457819700241089,
               'top':0.5198298096656799,
               'right':0.8970209956169128,
               'bottom':0.8072096705436707
            },
            'page':0
         }
      },
      {
         'markdown':'Wire Transfer Instructions\n\nPayment Method: International Wire Transfer\nCurrency: USD (United States Dollars)\nBeneficiary Name: ABC Consulting Services LLC',
         'type':'text',
         'id':'d9296cc1-f804-43e2-9f0f-99e7c62eec48',
         'grounding':{
            'box':{
               'left':0.10443270206451416,
               'top':0.8223555088043213,
               'right':0.8968669176101685,
               'bottom':0.974624514579773
            },
            'page':0
         }
      },
      {
         'markdown':'Beneficiary Address: 1234 Business Park Drive, Suite 500, Los Angeles, CA 90210, USA\n\nPurpose of Payment: Payment for professional consulting services as per Invoice #INV-2025-0847',
         'type':'text',
         'id':'f2b8a1d4-4436-4e05-9467-bdaf5ca4bd3b',
         'grounding':{
            'box':{
               'left':0.11186572909355164,
               'top':0.022329870611429214,
               'right':0.8772550821304321,
               'bottom':0.09824278950691223
            },
            'page':1
         }
      },
      {
         'markdown':'- Special Instructions:\n  - Please include invoice number INV-2025-0847 in the payment reference\n  - All bank charges to be borne by the sender\n  - Payment should be received within 3-5 business days\n  - Please send wire confirmation receipt to [email protected]\n  - For any questions regarding this transfer, contact: +1 (555) 123-4567',
         'type':'text',
         'id':'1d536fff-e204-48d4-a53a-8e524665aec5',
         'grounding':{
            'box':{
               'left':0.11558690667152405,
               'top':0.10176733136177063,
               'right':0.8238765001296997,
               'bottom':0.20318034291267395
            },
            'page':1
         }
      },
      {
         'markdown':'**Urgency:** Standard processing (3-5 business days acceptable)',
         'type':'text',
         'id':'fb34e8c2-0aa6-4866-895d-060c07b717ea',
         'grounding':{
            'box':{
               'left':0.11588779091835022,
               'top':0.204525887966156,
               'right':0.6877880096435547,
               'bottom':0.23076602816581726
            },
            'page':1
         }
      },
      {
         'markdown':'Form completed on: September 3, 2025\n\nReference Number: WT-2025-0847',
         'type':'text',
         'id':'7c686aab-8142-4da2-a7e7-dae4495aade5',
         'grounding':{
            'box':{
               'left':0.35991770029067993,
               'top':0.26450976729393005,
               'right':0.641823947429657,
               'bottom':0.3033582866191864
            },
            'page':1
         }
      }
   ],
   'splits':[
      {
         'class':'full',
         'identifier':'full',
         'pages':[
            0,
            1
         ],
         'markdown':"<a id='33335548-e7c3-40bd-898e-4f23d6c99d34'></a>\n\n# WIRE TRANSFER FORM\n\n<a id='0777dc07-855b-4b83-b422-5e8063405249'></a>\n\nInvoice Information\n\nInvoice Description: Professional consulting services - Q3 2025\n\nTotal Invoice Amount: $15,750.00 USD\n\n<a id='7c56b114-cc66-4fe4-99cb-9425a5210747'></a>\n\nBeneficiary Bank Information\n\nBank Name: JPMorgan Chase Bank, N.A.\n\nBank Address: 270 Park Avenue, New York, NY 10017, USA\n\nBank Account Number: 4578923456789012\n\nSWIFT Code: CHASUS33\n\nABA Routing Number: 021000021\n\nACH Routing Number: 021000021\n\n<a id='b95955a2-3f1d-4b96-be12-d5af677efd60'></a>\n\nInvoice Line Items\n<table><thead><tr><th>Description</th><th>Amount</th></tr></thead><tbody><tr><td>Strategic planning consultation (40 hours @ $150/hr)</td><td>$6,000.00</td></tr><tr><td>Market analysis report preparation</td><td>$3,500.00</td></tr><tr><td>Implementation roadmap development</td><td>$2,250.00</td></tr><tr><td>Executive presentation materials</td><td>$1,500.00</td></tr><tr><td>Follow-up consultation sessions (15 hours @ $150/hr)</td><td>$2,250.00</td></tr><tr><td>Travel expenses (reimbursable)</td><td>$250.00</td></tr><tr><td>TOTAL</td><td>$15,750.00</td></tr></tbody></table>\n\n<a id='d9296cc1-f804-43e2-9f0f-99e7c62eec48'></a>\n\nWire Transfer Instructions\n\nPayment Method: International Wire Transfer\nCurrency: USD (United States Dollars)\nBeneficiary Name: ABC Consulting Services LLC\n\n<a id='f2b8a1d4-4436-4e05-9467-bdaf5ca4bd3b'></a>\n\nBeneficiary Address: 1234 Business Park Drive, Suite 500, Los Angeles, CA 90210, USA\n\nPurpose of Payment: Payment for professional consulting services as per Invoice #INV-2025-0847\n\n<a id='1d536fff-e204-48d4-a53a-8e524665aec5'></a>\n\n- Special Instructions:\n  - Please include invoice number INV-2025-0847 in the payment reference\n  - All bank charges to be borne by the sender\n  - Payment should be received within 3-5 business days\n  - Please send wire confirmation receipt to [email protected]\n  - For any questions regarding this transfer, contact: +1 (555) 123-4567\n\n<a id='fb34e8c2-0aa6-4866-895d-060c07b717ea'></a>\n\n**Urgency:** Standard processing (3-5 business days acceptable)\n\n<a id='7c686aab-8142-4da2-a7e7-dae4495aade5'></a>\n\nForm completed on: September 3, 2025\n\nReference Number: WT-2025-0847",
         'chunks':[
            '33335548-e7c3-40bd-898e-4f23d6c99d34',
            '0777dc07-855b-4b83-b422-5e8063405249',
            '7c56b114-cc66-4fe4-99cb-9425a5210747',
            'b95955a2-3f1d-4b96-be12-d5af677efd60',
            'd9296cc1-f804-43e2-9f0f-99e7c62eec48',
            'f2b8a1d4-4436-4e05-9467-bdaf5ca4bd3b',
            '1d536fff-e204-48d4-a53a-8e524665aec5',
            'fb34e8c2-0aa6-4866-895d-060c07b717ea',
            '7c686aab-8142-4da2-a7e7-dae4495aade5'
         ]
      }
   ],
   'metadata':{
      'filename':'wire-transfer.pdf',
      'org_id':None,
      'page_count':2,
      'duration_ms':7861,
      'credit_usage':6.0,
      'version':'latest'
   }
}
To extract specific fields from the parsed Markdown, see Extract Data.

Run Parse with Our Libraries

Click one of the tiles below to learn how to run the API with our libraries.
The legacy agentic-doc library does not support the API.

Migrate from the Legacy Parse Endpoint

If you’ve been using the legacy API endpoint (v1/tools/agentic-document-analysis), the API returns a different output format. When migrating to the endpoint, you may need to update scripts that process the parsed output. Key differences in the output:
  • The output doesn’t include extraction data. Use the separate API for field extraction.
  • The output is not wrapped in a data object.
  • Each chunks object now has a markdown attribute.
  • The chunk type is in the type attribute (legacy uses chunk_type).
  • The chunk ID is in the id attribute (legacy uses chunk_id).
  • Bounding box coordinates use full names: left, top, right, bottom (legacy uses l, t, r, b).
  • The output includes a splits object showing how the document was split.
  • The output includes a metadata object with processing information.