L'API PDF creata per gli sviluppatori
Un semplice endpoint REST per ogni attività. Unisci, converti, comprimi e proteggi PDF da qualsiasi linguaggio — senza SDK, senza server, senza librerie PDF.
Avvio rapido
1. Ottieni una chiave
Accedi e crea una chiave nel tuo pannello.
2. Chiama un endpoint
Invia il tuo file come multipart/form-data.
3. Ottieni il risultato
Il file elaborato viene restituito istantaneamente.
curl -X POST https://smallpdf.us/api/v1/merge \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@image1.pdf" \
-F "files=@image2.pdf" \
-o merged.pdfAutenticazione
Ogni richiesta deve includere la tua chiave segreta nell'intestazione X-API-Key . Crea e gestisci le chiavi nel tuo pannello. Tieni le chiavi lato server — non esporle mai nel codice client.
X-API-Key: sk_live_xxxxxxxxxxxxxxxxxxxxxxxxURL di base e risposte
Tutti gli endpoint sono POST sotto:
- In caso di successo, il file elaborato viene restituito direttamente nel corpo.
- In caso di errore, viene restituito un corpo JSON:
{ "error": "...", "code": "..." } - Ogni risposta include
X-RateLimit-Limit/X-RateLimit-Remaining - I file caricati vengono scansionati per malware ed eliminati dai nostri server subito dopo l'elaborazione.
Endpoint
Organizzare
/v1/mergeMerge PDFCombine two or more PDFs into a single document, in the order provided.
Parametri
filesfile[]obbligatorioTwo or more PDF files.
Restituisce: PDF file · merged.pdf
curl -X POST https://smallpdf.us/api/v1/merge \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@image1.pdf" \
-F "files=@image2.pdf" \
-o merged.pdf/v1/splitSplit PDFSplit a PDF. Without `pages` you receive a ZIP with one PDF per page; with `pages` you receive a single PDF of just those pages.
Parametri
filefileobbligatorioThe PDF to split.
pagesstringopzionaleOptional range, e.g. "1,3,5-7".
Restituisce: PDF file · split.pdf
curl -X POST https://smallpdf.us/api/v1/split \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-F "pages=1-3" \
-o split.pdf/v1/rotateRotate PDFRotate every page by a multiple of 90 degrees.
Parametri
filefileobbligatorioThe PDF to rotate.
angleintopzionale90, 180 or 270. Default 90.
Restituisce: PDF file · rotated.pdf
curl -X POST https://smallpdf.us/api/v1/rotate \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-F "angle=90" \
-o rotated.pdfConvertire
/v1/pdf-to-wordPDF to WordConvert a PDF into an editable Word (.docx) document with layout preserved.
Parametri
filefileobbligatorioThe PDF to convert.
Restituisce: Word .docx file · converted.docx
curl -X POST https://smallpdf.us/api/v1/pdf-to-word \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-o converted.docx/v1/word-to-pdfWord to PDFConvert a Word document (.doc, .docx, .odt, .rtf) into a PDF.
Parametri
filefileobbligatorioThe document to convert.
Restituisce: PDF file · converted.pdf
curl -X POST https://smallpdf.us/api/v1/word-to-pdf \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.docx" \
-o converted.pdf/v1/pdf-to-jpgPDF to JPGRender each PDF page to a JPG image. Returns a ZIP archive.
Parametri
filefileobbligatorioThe PDF to convert.
qualitystringopzionalestandard (150dpi) · high (300) · maximum (600).
Restituisce: ZIP archive of images · pages.zip
curl -X POST https://smallpdf.us/api/v1/pdf-to-jpg \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-F "quality=high" \
-o pages.zip/v1/pdf-to-pngPDF to PNGRender each PDF page to a PNG image. Returns a ZIP archive.
Parametri
filefileobbligatorioThe PDF to convert.
qualitystringopzionalestandard · high · maximum.
Restituisce: ZIP archive of images · pages.zip
curl -X POST https://smallpdf.us/api/v1/pdf-to-png \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-F "quality=high" \
-o pages.zip/v1/jpg-to-pdfJPG to PDFCombine one or more JPG images into a single PDF (one image per page).
Parametri
filesfile[]obbligatorioOne or more JPG images.
Restituisce: PDF file · images.pdf
curl -X POST https://smallpdf.us/api/v1/jpg-to-pdf \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@image1.jpg" \
-F "files=@image2.jpg" \
-o images.pdf/v1/png-to-pdfPNG to PDFCombine one or more PNG images into a single PDF (one image per page).
Parametri
filesfile[]obbligatorioOne or more PNG images.
Restituisce: PDF file · images.pdf
curl -X POST https://smallpdf.us/api/v1/png-to-pdf \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@image1.png" \
-F "files=@image2.png" \
-o images.pdfOttimizzare
/v1/compressCompress PDFReduce a PDF's file size with lossless stream compression.
Parametri
filefileobbligatorioThe PDF to compress.
Restituisce: PDF file · compressed.pdf
curl -X POST https://smallpdf.us/api/v1/compress \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-o compressed.pdfProteggere
/v1/protectProtect PDFEncrypt a PDF with AES-256 so it can only be opened with the password.
Parametri
filefileobbligatorioThe PDF to protect.
passwordstringobbligatorioPassword required to open the file.
Restituisce: PDF file · protected.pdf
curl -X POST https://smallpdf.us/api/v1/protect \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@input.pdf" \
-F "password=secret123" \
-o protected.pdfPiani e quota
| Piano | Chiamate API | Prezzo |
|---|---|---|
| Free | 50 / month | $0 |
| Starter | 1,000 / month | $9/mo |
| Pro | 10,000 / month | $19/mo |
| Max | 100,000 / month | Contact sales |
La quota viene ripristinata il 1° di ogni mese (UTC). Vengono conteggiate solo le chiamate riuscite. Vedi i prezzi completi →
Codici di stato ed errore
| HTTP | Codice | Significato |
|---|---|---|
| 200 | — | Success. The processed file is returned in the body. |
| 400 | BAD_INPUT | Missing or invalid file / parameters. |
| 401 | NO_API_KEY · BAD_API_KEY | Missing, invalid or revoked key. |
| 429 | QUOTA_EXCEEDED | Monthly quota used up — upgrade your plan. |
| 500 | PROCESSING_ERROR | The file could not be processed. |
Inizia a sviluppare oggi
Crea una chiave API gratuita ed effettua la prima chiamata in meno di un minuto.
Ottieni la tua chiave API