Classify Document
Extract → Classify Document
The Classify Document API analyzes a PDF and returns classification data (document type, category, metadata). You send the PDF as Base64 (docContent), docName, and optionally async. The API returns JSON with document type, category, and related metadata. Use the tester below to try it; more details are in the sections that follow.
Try the Classify Document API
Endpoint: POST /api/v2/ClassifyDocument · Required: api-key, docContent, docName
Use the form below to send your API key and PDF (Base64). The response is JSON with classification data (document type, category, metadata). No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Classify Document?
This endpoint analyzes a PDF and returns classification data: document type, category, and metadata. You provide the PDF (Base64) and optionally enable async; the API returns JSON with the classification result. Use it to identify document types or route documents in workflows.
Key features
- Document analysis – The API analyzes content to classify and identify document types and categories.
- JSON response – Document type, category, and metadata in a structured format.
- Async – Use async for larger PDFs to avoid timeouts.
Use when you need to identify document type (e.g. invoice, contract, form) or route documents by category. Combine with Parse Document for template-based extraction after classification.
When to use Classify Document
- Document routing – Classify incoming PDFs (invoices, contracts, forms) and route them to the right workflow.
- Compliance and indexing – Identify document type for retention or search.
- Pre-processing – Determine document type before Parse Document or Extract Form Data from PDF.
For request/response schemas and code samples, see Classify Document in the PDF4me API docs.
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
Response Format
The API returns a JSON response with classification data including document type, category, and metadata information.