Skip to main content

Classify Document

ExtractClassify 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

Quick reference

Endpoint: POST /api/v2/ClassifyDocument · Required: api-key, docContent, docName

Try it live

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.

Loading API Tester...

Overview, parameters, and 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.
Best for

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.

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.

Get Help