
Search PDF
Search PDF is a REST API tool that finds text in PDF documents using literal strings, regular expressions, and predefined pattern searches. Each match can include the text found, its page number, and its location on the page, giving your application structured results it can use for review, indexing, or a follow-up PDF operation. Search several patterns in one request and limit processing to selected pages when needed.
Key Benefits of Search PDF API
- Find known terms with literal searches, or use a custom regular expression to match company-specific formats such as work order IDs.
- Use predefined regex presets for common data patterns, then combine them with custom searches in the same request.
- Receive matched text with page numbers and page coordinates so your application can present each result in context.
- Search selected pages or ranges to focus processing on the portions of a PDF that matter to your workflow.
- Return search results as JSON for application logic, or request a downloadable JSON output file.
- Pass retained search results to Highlight PDF, Redact PDF, or Replace PDF Text to turn discovery into a targeted document update.
Start right from your browser - upload files, choose parameters, generate code, and send API Calls directly from API Lab!
You have document processing problems, we have Solutions. Explore the many ways pdfRest can align your documents with your business objectives.
Find PDF Text by Exact Match or Pattern
Search PDF gives you three ways to find text. Choose the method based on how much you know about the wording or format of what you’re looking for:
- Exact text: Find a known value, such as a product name or a specific phrase in a contract. This works well when the same wording appears across documents.
- Built-in presets: Find common formats such as email addresses, phone numbers, and dates without writing a pattern from scratch.
- Custom regular expressions: Match text that follows your organization’s rules. For example, find work order IDs such as
WO-AB-10482using a pattern that describes the prefix, site code, and five-digit job number.
Combine several search definitions in one request, or limit a search to the pages that matter to your workflow.
Locate PDF Text with Page Coordinates
A search result is more useful when you can show exactly where the text appears. Search PDF returns structured JSON that your application can use to locate each occurrence:
- Matched text shows the actual value found, even when a pattern can match many different values.
- Page numbers tell your application which page to open or link to from a list of results.
- Coordinates tell your viewer where to mark the match and distinguish separate occurrences on the same page.
For example, a service portal can find a part number across equipment manuals and take technicians directly to the relevant diagram or parts list. If the number appears three times on a page, the coordinates let a technician jump to each occurrence without searching the page again.
Turn PDF Search Results into Document Edits
Once you know what text appears and where, choose which matches to keep and send the selected results with the PDF you searched. The tool you call depends on what you want to do with the findings:
- Highlight PDF marks selected text with annotations. Use it to call out references or terms that reviewers need to find.
- Redact PDF takes selected findings as targets for removal. Use it to prepare a copy for sharing when specific sensitive text needs to be removed.
- Replace PDF Text changes selected text in the document. Add the new wording to each selected match before sending the replacement request.
The same search results can support different tasks. For example, highlight internal references for reviewers and redact selected references in a separately prepared external copy.
Need more help?
Start with a Tutorial for step-by-step guidance
Learn about the parameters for this tool to create your custom solution.
The searches parameter accepts a nonempty array of search definitions. Each definition has a type and a value. You can mix methods in a single request.
literal: Use the exact wording to find, such asInspection Required.preset: Use a built-in pattern name, such asemailfor email addresses ordatefor dates.regex: Supply a regular expression for a format specific to your documents. For example,WO-[A-Z]{2}-[0-9]{5}matches a work order ID such asWO-AB-10482.
In a JSON request, send the definitions as an array. In a multipart request, send the array as a JSON-encoded string in the searches field.
Each definition also accepts an optional content_scope. Use all (default) for all existing text or body to exclude detected headers and footers.
Safe & Secure
Confidently process your sensitive data with pdfRest. Our platform is built for robust, Enterprise-grade security and compliance. We meet rigorous standards for GDPR and HIPAA, and our controls are independently audited to ensure strict SOC 2 Type 2 compliance. Your data's protection is our commitment.

