Extract
Comprehensive guide to PDF.co’s extraction APIs for programmatically extracting data from PDF documents. Includes endpoints for document parsing, table extraction, and more.
Document Parser
How Do I Transfer a Document Parser Template to Another PDF.co Account?
Q: Can I transfer a template to another account?
Yes — by copying the raw template code and pasting it into the new account.
Q: Where do I get the template code?
- Open the Document Parser Page
- Go to Manage My Templates
- Click the three dots next to your template name
- Select View Raw Code
- Copy the full code shown
Q: How do I add it to the other account?
- Log in to the second PDF.co account
- Go to the Template Editor
- Click Edit Raw Template
- Paste the code
- Click Save Template and Return
Q: Anything else I should know?
- Template names can be changed after pasting
- No automatic sync — this is a manual copy
Parse Only Specific Pages in a PDF by Keyword (e.g., “Driver Copy”)
You can extract and parse specific pages from a PDF by searching for a keyword (like “Driver Copy”) and processing only those pages
Follow these 3 steps:
- Find the pages containing the keyword
- Use the /pdf/find API.
- Set
searchString
to a keyword or regex
Example:
This returns the page numbers where the keyword is found.
- Split the PDF to extract those pages
- Use the /pdf/split API.
- Set the
pages
parameter to the page numbers returned in step 1. - This creates new PDFs with only the target pages.
- Parse the split pages
- Use the /pdf/documentparser API.
- Pass the split PDF
- Use your custom Document Parser template to extract data.
Helpful Tips
- Use this method if you don’t know the page numbers in advance.
- If you already know the page numbers, skip step 1 and go straight to /pdf/split.
- For large files, use
"async": true
and monitor job status. - Ensure your Document Parser template is aligned to the content of the Driver copy section.
Related Guides:
- Zapier: How to Split and Parse PDFs in Zapier
- Make/Integromat: How to Split and Parse Multi-paged PDFs in Make
Still Need Help? Contact Support
To help us assist you faster, please send:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or short description of the issue
Parse Every Page in a Multi-Page PDF
You want to extract structured data from all pages of a multi-page PDF using the Document Parser. The /pdf/documentparser API processes only one page at a time for non-table fields.
To parse all pages, follow this 2-step workflow:
Step 1: Split the PDF into separate pages
- Use the /pdf/split or /pdf/split2 API.
- Set the
pages
parameter to"*"
to split the PDF into individual files—one file per page.
Example:
This will return a separate PDF for each page.
Step 2: Parse each page separately
- Run the /pdf/documentparser API for each split PDF file.
- Use the same Document Parser template if the layout is the same across pages.
- Automate this step using your integration platform (Zapier, Make, or API).
Example: Parse all pages in a 5-page PDF
- Split step: Returns 5 PDFs (page1.pdf, page2.pdf, page3.pdf, page4.pdf, page5.pdf).
- Parse step: Run /pdf/documentparser once for each file.
Related Guides:
Helpful Tips
- Use
"pages": "*"
to split each page individually. - For large documents, enable
"async": true
and check the job status. - Ensure the parsing template works consistently across all pages.
Still Need Help? Contact Support
To help us assist you faster, please send:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.)
- Any input files, URLs, or sample data
- The exact error message (if any)
- A screenshot or brief description of what went wrong
Document Classifier
How to Parse a Document Based on Its Document Type
You want to classify a document first (e.g., bank statement, receipt) and automatically apply the correct parsing template—without manually choosing the template.
Why This Happens
The Document Classifier identifies the document type but doesn’t automatically tell the Document Parser which template to use.
You need to connect the classifier output to the parser input.
How to Link the Classifier to a Parser Template
Use the template ID as the class name in your Document Classifier.
- Create your Document Parser template → copy the template ID (e.g.,
12345
). - In the Document Classifier → set the class name to match the template ID.
- Run the classifier → it returns the class name (which is the template ID).
- Pass the class name to
/pdf/documentparser
as thetemplateId
parameter.
Result: The correct template is automatically applied based on the document type.
Example
- Your invoice template ID =
98765
- Set class name =
98765
in the classifier - Classifier output:
{"className": "98765"}
- Pass
98765
to/pdf/documentparser
→ parses with the invoice template
Platform-Specific Related Resources
Helpful Tips
- Class name must exactly match the template ID.
- If you’re using code, you can extract the class name from the classifier JSON output.
- Use the /pdf/documentparser endpoint to run the parser using the ID.
Still Need Help? Contact Support
Send us the following to speed things up:
- What you’re trying to do
- Your platform (API, Zapier, Make, etc.) Any input files, URLs, or sample data The exact error message (if you saw one) A screenshot or brief description of what went wrong