Metadatos de un PDF
Metadatos es una API que lee o cambia la información interna de un PDF: título, autor, asunto, palabras clave, quién lo creó y sus fechas. Perfecto para organizar documentos generados en masa desde n8n, Make o Zapier, sin montar servidores.
Cómo funciona
Le mandas un PDF. Si no le dices nada más, te devuelve sus metadatos actuales (modo lectura). Si le mandas algún campo (por ejemplo title), te devuelve el mismo PDF con ese campo actualizado (modo escritura) — solo toca los campos que le mandes, el resto se queda como estaba.
Lo único que necesitas
- Tu API key. La creas en tu panel con "+ Crear llave". Se muestra una sola vez, así que cópiala y guárdala.
- En tu plataforma de automatización, un paso de tipo "HTTP Request" / "Hacer una petición HTTP" (lo tienen n8n, Make, Zapier, Pipedream…).
Leer los metadatos de un PDF
Le envías tu PDF tal cual (como archivo binario), sin nada más, y te devuelve sus datos en JSON. En el nodo HTTP Request:
- Method:
POST - URL:
https://api.cofferdock.com/pdf-metadata - Send Headers: actívalo y añade dos:
x-api-key= tu llave, yContent-Type=application/pdf - Send Body: actívalo → elige la opción para mandar un archivo binario (en n8n: "n8n Binary File", con la propiedad binaria de tu PDF, normalmente
data)
La respuesta trae { "metadata": { "title": "...", "author": "...", ... } }.
Cambiar el título, autor u otros campos
Añade los campos que quieras cambiar como Query Parameters, por ejemplo title = Factura 2026. En Options → Response → Response Format elige File para recibir el PDF actualizado directamente.
En Make: mismo método y URL, los campos a cambiar en Query String, las dos cabeceras, y el PDF como dato binario en el cuerpo.
Campos disponibles
| Campo | Para qué sirve |
|---|---|
title | Título del documento. |
author | Autor. |
subject | Asunto/descripción. |
keywords | Palabras clave separadas por comas, ej. factura,2026,cliente. |
creator | Programa/persona que creó el documento original. |
producer | Quién generó este PDF en concreto. |
creation_date | Fecha de creación, formato 2026-08-02T10:00:00Z. |
modification_date | Fecha de última modificación, mismo formato. |
Resumen de la API
- Endpoint:
POST https://api.cofferdock.com/pdf-metadata - Auth: cabecera
x-api-key: TU_LLAVE. - Entrada: el PDF va en el cuerpo como
application/pdf(a pelo) o comoapplication/jsoncon{ "file": "<base64>", ... }. - Modo: sin ningún campo de metadatos → lectura, devuelve
metadata. Con al menos uno (incluso vacío, para borrar ese campo) → escritura. - Salida de la escritura: por defecto, con
application/pdfdevuelve el binario; con JSON devuelve base64 enpdf.output=pdf/output=jsonfuerza cualquiera. La lectura siempre es JSON. - Límites: PDF de entrada hasta 20 MB (50 MB en Business/Scale) en modo
application/pdf, o ~4 MB reales en JSON con base64. 30 peticiones/min por IP. 1 llamada = 1 crédito, lectura o escritura por igual.
Campos
| Campo | Tipo | Notas |
|---|---|---|
title, author, subject, creator, producer | string | — |
keywords | string (coma) o array | En la respuesta de lectura siempre llega como array. Internamente el PDF solo guarda un string, así que el array de lectura es una aproximación (se parte por espacios), no una conversión exacta. |
creation_date, modification_date | string ISO 8601 | Formato inválido → 400. |
file | string base64 | Solo en modo JSON. |
output | pdf/json | Solo aplica en modo escritura. |
Ejemplos
curl (leer metadatos):
curl -X POST "https://api.cofferdock.com/pdf-metadata" \
-H "x-api-key: TU_LLAVE" \
-H "Content-Type: application/pdf" \
--data-binary @documento.pdf
JavaScript (Node 18+, cambiar título y autor):
const fs = require('fs');
const r = await fetch('https://api.cofferdock.com/pdf-metadata?title=Factura%202026&author=Mi%20Empresa', {
method: 'POST',
headers: { 'x-api-key': 'TU_LLAVE', 'Content-Type': 'application/pdf' },
body: fs.readFileSync('documento.pdf'),
});
fs.writeFileSync('actualizado.pdf', Buffer.from(await r.arrayBuffer()));
Python:
import requests
r = requests.post(
'https://api.cofferdock.com/pdf-metadata',
params={'title': 'Factura 2026', 'keywords': 'factura,2026,cliente'},
headers={'x-api-key': 'TU_LLAVE', 'Content-Type': 'application/pdf'},
data=open('documento.pdf', 'rb').read(),
)
open('actualizado.pdf', 'wb').write(r.content)
Forma de la respuesta
Lectura:
{ "success": true, "mode": "read",
"metadata": { "title": "Factura 001", "author": "Mi Empresa", "subject": null,
"keywords": ["factura","2026"], "creator": null, "producer": "pdf-lib …",
"creation_date": "2026-07-01T12:00:00.000Z", "modification_date": null, "page_count": 3 },
"meta": { "used": 12, "remaining": 488 } }
Escritura (con output=json):
{ "success": true, "mode": "write", "pdf": "JVBERi0xLjQ…", "mime_type": "application/pdf",
"meta": { "fields_updated": 2, "used": 13, "remaining": 487 } }
Lo que recibes
En modo lectura: un JSON con los metadatos actuales. En modo escritura: el PDF actualizado directamente (o en base64 con output=json).
PDF metadata
Metadata is an API that reads or changes a PDF's internal info: title, author, subject, keywords, who created it, and its dates. Great for organizing documents generated in bulk from n8n, Make or Zapier, with no servers to maintain.
How it works
You send a PDF. If you don't send anything else, you get its current metadata back (read mode). If you send any field (say, title), you get back the same PDF with that field updated (write mode) — only the fields you send are touched, everything else stays as it was.
All you need
- Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
- In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).
Read a PDF's metadata
You send your PDF as is (as binary data), nothing else, and get its data back in JSON. In the HTTP Request node:
- Method:
POST - URL:
https://api.cofferdock.com/pdf-metadata - Send Headers: on → add two:
x-api-key= your key, andContent-Type=application/pdf - Send Body: on → choose the binary file option (in n8n: "n8n Binary File", with your PDF's binary property, usually
data)
The response carries { "metadata": { "title": "...", "author": "...", ... } }.
Change the title, author or other fields
Add whichever fields you want to change as Query Parameters, e.g. title = Invoice 2026. Under Options → Response → Response Format choose File to get the updated PDF directly.
In Make: same method and URL, the fields to change in Query String, the two headers, and the PDF as binary data in the body.
Available fields
| Field | What it does |
|---|---|
title | Document title. |
author | Author. |
subject | Subject/description. |
keywords | Comma-separated keywords, e.g. invoice,2026,client. |
creator | Program/person who created the original document. |
producer | Who generated this specific PDF. |
creation_date | Creation date, format 2026-08-02T10:00:00Z. |
modification_date | Last modified date, same format. |
API overview
- Endpoint:
POST https://api.cofferdock.com/pdf-metadata - Auth: header
x-api-key: YOUR_KEY. - Input: the PDF goes in the body as
application/pdf(raw) or asapplication/jsonwith{ "file": "<base64>", ... }. - Mode: no metadata fields → read, returns
metadata. At least one (even empty, to clear that field) → write. - Write output: by default, with
application/pdfit returns the binary; with JSON it returns base64 inpdf.output=pdf/output=jsonforces either. Read is always JSON. - Limits: input PDF up to 20 MB (50 MB on Business/Scale) in
application/pdfmode, or ~4 MB real in JSON with base64. 30 requests/min per IP. 1 call = 1 credit, read or write equally.
Fields
| Field | Type | Notes |
|---|---|---|
title, author, subject, creator, producer | string | — |
keywords | string (comma) or array | Read responses always return an array. The PDF itself only stores a single string internally, so the read array is an approximation (split on whitespace), not an exact round-trip. |
creation_date, modification_date | ISO 8601 string | Invalid format → 400. |
file | base64 string | JSON mode only. |
output | pdf/json | Write mode only. |
Examples
curl (read metadata):
curl -X POST "https://api.cofferdock.com/pdf-metadata" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/pdf" \
--data-binary @document.pdf
JavaScript (Node 18+, change title and author):
const fs = require('fs');
const r = await fetch('https://api.cofferdock.com/pdf-metadata?title=Invoice%202026&author=My%20Company', {
method: 'POST',
headers: { 'x-api-key': 'YOUR_KEY', 'Content-Type': 'application/pdf' },
body: fs.readFileSync('document.pdf'),
});
fs.writeFileSync('updated.pdf', Buffer.from(await r.arrayBuffer()));
Python:
import requests
r = requests.post(
'https://api.cofferdock.com/pdf-metadata',
params={'title': 'Invoice 2026', 'keywords': 'invoice,2026,client'},
headers={'x-api-key': 'YOUR_KEY', 'Content-Type': 'application/pdf'},
data=open('document.pdf', 'rb').read(),
)
open('updated.pdf', 'wb').write(r.content)
Response shape
Read:
{ "success": true, "mode": "read",
"metadata": { "title": "Invoice 001", "author": "My Company", "subject": null,
"keywords": ["invoice","2026"], "creator": null, "producer": "pdf-lib …",
"creation_date": "2026-07-01T12:00:00.000Z", "modification_date": null, "page_count": 3 },
"meta": { "used": 12, "remaining": 488 } }
Write (with output=json):
{ "success": true, "mode": "write", "pdf": "JVBERi0xLjQ…", "mime_type": "application/pdf",
"meta": { "fields_updated": 2, "used": 13, "remaining": 487 } }
What you get back
Read mode: a JSON object with the current metadata. Write mode: the updated PDF itself (or in base64 with output=json).