Build a parser for any document.
Define your own field schema and extract exactly what you need, or let PDF4me classify mixed batches and route each file by type. This is the custom engine. Ready-made invoice and receipt parsers live on AI data extraction.
Parse extracts. Classify routes.
Use them together on a mixed inbox, or call Parse alone when you already know the document type. Ready-made parsers for invoices and receipts are a different product.
Parse Document
Send a document and a parse definition. Get JSON keyed to the fields you named. The most flexible AI endpoint for any layout, including forms you have never seen before.
Set up ParseClassify Document
Send a document and get the predicted type (invoice, contract, receipt) plus a confidence score. Use it as the routing step before you parse.
Set up ClassifyExtract exactly the fields you name.
Parse Document is the universal AI endpoint. Provide a document and a parse definition; receive JSON keyed by your field schema. Native actions in Power Automate, Make and n8n.
Four keys describe any field.
- Describe the fields. Write a parse definition: each field has a
fieldName, afieldTypeand a plain-languagefieldDescription. Or build the same schema as a Parse Analyzer in the dashboard. - POST the document. Send Base64
docContentwithdocNameto/api/v2/ParseDocument, plus your Analyzer Id or parse definition. - Read the JSON. The response carries
parsedDatakeyed to your schema, plusdocumentTypeandpageCount.
fieldNameis the JSON key you get back.fieldTypeisstring,number,date, ortablefor repeating rows.fieldDescriptionis the plain-language hint. List alternate labels for accuracy.fieldMethodis optional:extracttakes the value as printed,generatederives or normalises it.
curl -X POST https://api.pdf4me.com/api/v2/ParseDocument \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"docContent": "<base64 pdf>",
"docName": "form.pdf",
"AnalyzerId": "custom_form_parser",
"async": false
}'Know the type before you parse it.
Classify Document predicts whether a file is an invoice, contract, receipt or another type, with a confidence score. Use it to sort a mixed batch, then parse each file by type.
One POST, type plus confidence.
- POST the document. Base64-encode the PDF and send it as
docContentwith adocNameto/api/v2/ClassifyDocument. - Read the verdict. The response returns
documentType,categoryand aconfidencescore between 0.0 and 1.0. - Branch, then parse. Route high-confidence files to the matching parser. Queue low-confidence ones for review. For mixed inboxes, a Classify Analyzer can route and extract in one call.
curl -X POST https://api.pdf4me.com/api/v2/ClassifyDocument \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"docContent": "<base64 PDF>",
"docName": "incoming.pdf"
}'Build the schema once, call it everywhere.
A Parse Analyzer or Classify Analyzer in the dashboard gives you a stable Analyzer Id for the REST API, Power Automate, Make, n8n and Zapier. Custom forms that are not in the ready-made set live here.
Get your documents done.
Build it into your product with the API, automate it with no code, or use the free tools in your browser. No credit card to begin.
curl -X POST https://api.pdf4me.com/v1/ConvertToPdfFree tier · No credit card required