Extract PDF Content API
Send a PDF URL and get its text back as JSON — one entry per page, each with a character count. Made for search indexes, RAG pipelines and LLM prompts.
- Free plan
- No credit card
Request
curl -X POST https://apdf.io/api/pdf/content/read \
-H "Authorization: Bearer TOKEN" \
-d file="FILE_URL"
const data = new FormData();
data.append('file', 'FILE_URL');
fetch('https://apdf.io/api/pdf/content/read', {
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/read', [
'headers' => [
'Authorization' => 'Bearer TOKEN'
],
'form_params' => [
'file' => 'FILE_URL'
]
]);
$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'
response = RestClient.post(
'https://apdf.io/api/pdf/content/read',
{
'file' => 'FILE_URL'
},
{
Authorization: "Bearer TOKEN"
}
)
puts response.body
import requests
response = requests.post(
'https://apdf.io/api/pdf/content/read',
headers = {
'Authorization': 'Bearer TOKEN'
},
data = {
'file': 'FILE_URL'
}
)
print(response.text)
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
data := map[string]string{
"file": "FILE_URL"
}
resp, _ := client.R().
SetFormData(data).
SetHeader("Authorization", "Bearer TOKEN").
Post("https://apdf.io/api/pdf/content/read")
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")
.build();
Request request = new Request.Builder()
.url("https://apdf.io/api/pdf/content/read")
.addHeader("Authorization", "Bearer TOKEN")
.post(formBody)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
Every page.
Its own text.
The response keeps the text split by page, in page order.
Pages without any text still show up, with zero characters.
Portable Document Format (PDF), standardized as ISO 32000 ...
- pages_total
- Number of pages in the file
- characters_total
- Characters across the whole document
- page
- Page number, starting at 1
- characters
- Characters on that page
- content
- The page as plain text, line breaks kept
Text your code can use.
A PDF is made for reading, not for processing. Extract the text once and hand it to whatever comes next.
Search indexes
Index every page of the PDFs your users upload, so a search hit can point straight to the page it came from.
RAG and LLM prompts
Feed documents to a model page by page, and use the character counts to keep each chunk inside the context window.
Invoice and order intake
Pull the text out of supplier invoices and order PDFs, then parse the numbers and dates your workflow needs.
Archives and reviews
Keep a plain text copy next to every stored PDF, so contracts and reports stay searchable and quick to review.
Extract from anywhere.
Pull the text out wherever your PDFs 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/read
Pick the action in any Zap and map files from earlier steps. No code and no servers to run.
Extract PDF Text
Add the Apdf node to any workflow, on n8n Cloud or self-hosted, and chain it with your automation.
Read PDF content
Let Claude, ChatGPT, Gemini or your own agent run it through the MCP server, on any paid plan.
read-pdf-content
1,000 text extractions
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.
Extracting PDF text, answered
Extract text tutorials
Extract PDF Content into Markdown Notes with an Agent
Stop pasting PDFs into chat windows: the agent pulls clean, page-numbered text over MCP and writes the vault-ready note itself — front matter, the headline stat with its page citation, and a section map. Weeks later, search-pdf-content retrieves the exact quote without re-reading anything.
Extract PDF Text for RAG Pipelines & LLMs with Python
This tutorial explains how to extract clean text from PDFs for RAG pipelines using the Apdf API in Python. It demonstrates replacing messy local libraries with an API that returns structured JSON, allowing developers to easily feed high-quality document data into OpenAI or vector databases.
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