PDF Metadata Reader/Writer
Read or update PDF metadata fields like title, author, and subject
/v1/pdf/metadata
curl -X POST "https://pdf.toolkitapi.io/v1/pdf/metadata" \
-H "Content-Type: application/json" \
-d '{
"url": "https://toolkitapi.io/report.pdf",
"update": {
"title": "Q4 Financial Report",
"author": "Finance Team"
}
}'
import httpx
resp = httpx.post(
"https://pdf.toolkitapi.io/v1/pdf/metadata",
json={
"url": "https://toolkitapi.io/report.pdf",
"update": {
"title": "Q4 Financial Report",
"author": "Finance Team"
}
},
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/v1/pdf/metadata", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://toolkitapi.io/report.pdf",
"update": {
"title": "Q4 Financial Report",
"author": "Finance Team"
}
}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"metadata": {
"title": "Q4 Financial Report",
"author": "Finance Team",
"subject": null,
"creator": "Microsoft Word",
"producer": "macOS Quartz PDFContext",
"creation_date": "2024-12-15 10:30:00"
},
"page_count": 12,
"pdf_version": "%PDF-1.7",
"pdf": "JVBERi0xLjcKMSAwIG9iago8...",
"file_size": 245780
}
Description
How to Use
1. Provide the PDF via `pdf` (base64) or `url` (public URL).
2. To read metadata only, omit the `update` field. The response will contain all available metadata fields.
3. To update metadata, pass an `update` object with the fields you want to change. Valid keys: `title`, `author`, `subject`, `creator`, `producer`, `keywords`.
4. When updating, the response includes the modified PDF as base64 in the `pdf` field.
About This Tool
PDF Metadata Reader/Writer lets you inspect and modify the metadata properties embedded in a PDF document — title, author, subject, creator, producer, and keywords. These fields are stored in the PDF's info dictionary and are displayed by most PDF viewers in their document properties panel.
When called without the `update` parameter, it reads and returns the current metadata. When `update` is provided, it applies your changes and returns both the updated metadata and the modified PDF.
This is useful for cleaning up document properties before distribution, adding authorship info to generated PDFs, or auditing metadata across a document library.
Why Use This Tool
- Document cataloging — Read metadata from a batch of PDFs to build a searchable index
- Pre-distribution cleanup — Strip or update author names and creator info before sharing documents
- Automated tagging — Set title and keywords programmatically after generating PDFs
- Compliance auditing — Verify that required metadata fields are present across a document library
Frequently Asked Questions
Which metadata fields can I update?
Does reading metadata modify the file?
Can I remove a metadata field?
Start using PDF Metadata Reader/Writer now
Get your free API key and make your first request in under a minute.