Skip to main content

Parse Document

ExtractParse Document

The Parse Document API extracts structured data from a PDF using a template you create in the PDF4me dashboard. You send docContent (optional; if omitted the document is fetched by docName), docName, TemplateId (GUID) or TemplateName, ParseId (GUID), and optionally async. The API returns JSON with parsed data (document type, page count, extracted fields). Use the tester below to try it; more details are in the sections that follow.

Try the Parse Document API

:::note Quick reference Endpoint: POST /api/v2/ParseDocument · Required: api-key, docName, TemplateId (or TemplateName), ParseId :::

:::info Try it live Use the form below to send your API key, PDF (Base64 or referenced by docName), template ID or name, and parse ID. The response is JSON with parsed document data. No code required—fill the fields and click Send request. :::

Loading API Tester...

Overview, parameters, and use cases

What is Parse Document?

This endpoint extracts structured data from a PDF using a parse template you create in the PDF4me dashboard. You provide the PDF (docContent optional—if omitted the document is fetched by docName), docName, TemplateId (GUID) or TemplateName, and ParseId (GUID). The API returns JSON with document type, page count, and extracted fields based on your template’s capture areas and keys.

Key features

  • Template-based – Create a template in the dashboard: upload a sample PDF, draw capture areas, configure keys and regex.
  • TemplateId or TemplateName – Use the template’s GUID or name from the dashboard.
  • ParseId – Unique GUID per parsing operation (generate client-side or use API-provided).
  • Structured output – JSON with document type, page count, and extracted structured data.

Getting Template and Parse IDs

  1. Access PDF4me Dashboard: Go to the parse document page.
  2. Create a Template: Click "Add" and input a template name, then save.
  3. Configure Template: Upload a template PDF, draw capture areas, configure keys and regular expressions, test the parse, and save.
  4. Get Template ID: Copy the unique GUID for your template (or use TemplateName).
  5. Generate Parse ID: Create a unique GUID for each parsing operation (client-side or via a tool).

:::tip Best for Use when you have recurring document types (invoices, forms) and need structured extraction. Combine with Classify Document to route by type, then parse with the right template. :::

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A PDF document in Base64 format or a public URL to a PDF file
  • A Parse Template created in your PDF4me dashboard (Create Parse Template)
    • You need the Template ID (GUID) or Template Name from your parse template
  • A Parse ID (GUID) for the parsing operation

Response Format

The API returns a JSON response with parsed document data including document type, page count, and extracted structured information.

Get Help