📄

PDF Metadata Reader/Writer

Read or update PDF metadata fields like title, author, and subject

POST 1 credit /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
Response 200 OK
{
  "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

Read or update PDF metadata fields like title, author, and subject

How to Use

1

1. Provide the PDF via `pdf` (base64) or `url` (public URL).

2

2. To read metadata only, omit the `update` field. The response will contain all available metadata fields.

3

3. To update metadata, pass an `update` object with the fields you want to change. Valid keys: `title`, `author`, `subject`, `creator`, `producer`, `keywords`.

4

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

Frequently Asked Questions

Which metadata fields can I update?
You can set `title`, `author`, `subject`, `creator`, `producer`, and `keywords`. Other PDF info dict entries are preserved but not directly editable through this endpoint.
Does reading metadata modify the file?
No. When you omit the `update` parameter, the endpoint is read-only and the `pdf` field in the response will be `null`.
Can I remove a metadata field?
Set the field to an empty string in the `update` object (e.g. `"author": ""`). This effectively clears the value.

Start using PDF Metadata Reader/Writer now

Get your free API key and make your first request in under a minute.