PDF Search API
Send a PDF URL and a search term, get back every match with its page number and line. Search for plain words or regular expressions, case-sensitive when you need it.
- Free plan
- No credit card
Request
curl -X POST https://apdf.io/api/pdf/content/search \
-H "Authorization: Bearer TOKEN" \
-d file="FILE_URL" \
-d text="SEARCH_TEXT"
const data = new FormData();
data.append('file', 'FILE_URL');
data.append('text', 'SEARCH_TEXT');
fetch('https://apdf.io/api/pdf/content/search', {
headers: {'Authorization': 'Bearer TOKEN'},
method: 'POST',
body: data
})
.then(response => response.json())
.then(json => console.log(json));
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post(
'https://apdf.io/api/pdf/content/search', [
'headers' => [
'Authorization' => 'Bearer TOKEN'
],
'form_params' => [
'file' => 'FILE_URL',
'text' => 'SEARCH_TEXT'
]
]);
$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'
response = RestClient.post(
'https://apdf.io/api/pdf/content/search',
{
'file' => 'FILE_URL',
'text' => 'SEARCH_TEXT'
},
{
Authorization: "Bearer TOKEN"
}
)
puts response.body
import requests
response = requests.post(
'https://apdf.io/api/pdf/content/search',
headers = {
'Authorization': 'Bearer TOKEN'
},
data = {
'file': 'FILE_URL',
'text': 'SEARCH_TEXT'
}
)
print(response.text)
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
data := map[string]string{
"file": "FILE_URL",
"text": "SEARCH_TEXT"
}
resp, _ := client.R().
SetFormData(data).
SetHeader("Authorization", "Bearer TOKEN").
Post("https://apdf.io/api/pdf/content/search")
fmt.Println(resp.String())
}
import okhttp3.*;
class Pdf {
public static void main(String[] args) throws Exception {
OkHttpClient client = new OkHttpClient();
FormBody formBody = new FormBody.Builder()
.add("file", "FILE_URL")
.add("text", "SEARCH_TEXT")
.build();
Request request = new Request.Builder()
.url("https://apdf.io/api/pdf/content/search")
.addHeader("Authorization", "Bearer TOKEN")
.post(formBody)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
Find the term.
Know the page.
Every match comes back with its page and the line it was found in.
The exact words show how the document actually writes them.
7. "ISO 32000-1:2008 – Document management – Portable document format – Part 1: PDF
37. Adobe Systems Inc. (July 1, 2008). "Document Management – Portable Document Format –
64. "Processing Dangerous Paths – On Security and Privacy of the Portable Document Format"
- text
- The word, phrase or pattern to find
- case=1
- Match upper and lower case exactly
- regex=1
- Treat the text as a regular expression
- async=1
- Run in the background, get a job ID
- (defaults)
- Plain text, upper and lower case alike
Answers with page numbers.
When you need to know whether a document mentions something, and where, one call tells you.
Compliance checks
Flag contracts that contain a clause your legal team wants to review, and send reviewers straight to the right page.
Reference numbers
Find invoice, order or policy numbers with a regular expression and pass the exact values on to your system.
Document routing
Route incoming PDFs by the words they contain, like a customer name, a product or a deadline in the text.
Search in your app
Let users search the PDFs in your product and jump to the page and the line where their term appears.
Search from anywhere.
Check documents for a term wherever they arrive.
One account and one monthly allowance behind every route.
One authenticated POST from any language. Copy-paste samples in cURL, Node.js, Python and more.
POST /api/pdf/content/search
Pick the action in any Zap and map files from earlier steps. No code and no servers to run.
Search PDF Text
Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.
Search PDF content
Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.
search-pdf-content
1,000 searches
a month. Free.
Start on the free plan and move up only when your volume does — up to 1,000,000 operations a month on Business.
- One call is one operation, however many pages.
- Only calls that do the work are counted.
- Hard limits, so no surprise overage charges.
Searching PDFs, answered
Search PDF tutorials
Search a PDF From Your Editor
The integration spec is a PDF and your questions arrive mid-function. With the editor connected over MCP, 'what's the retry policy?' comes back with the exact line and page — and a regex search turns 'list every error code' into one call with three cited matches.
Building a "Search Inside PDF" Feature for Your Web App
This tutorial shows how to build a PDF search feature using Python and the Apdf Search API. Find specific terms, get page numbers and context lines, and optionally use regex patterns for advanced matching. Includes a Flask web interface example.
Your code made the PDF.
Then it went dark.
Opened, read, signed or ignored — you never see any of it. Send the PDFs you generate as personal links, and every open, page read, comment and signature comes back to your software as a webhook. Need it signed? Same link. Same account, same API key, one more call.
API · Webhook · MCP