Reduce PDF file size by up to 90% while preserving visual quality, using an industry-grade Ghostscript-tiered compression engine. Choose basic, medium, or maximum compression to balance size and quality. Perfect for email attachments, web uploads, document archiving, and storage optimization. Upload a PDF and receive a downloadable compressed file with before/after size metrics. Fast, reliable, and production-ready for any document workflow.
{"success":true,"url":"https://pub-6db99bab215e44889f46c4b2a619f8c5.r2.dev/compressed/20260619/bb30c136-f449-4428-8aee-73a1765cde47.pdf","original_size":2526695,"compressed_size":2317882,"compression_ratio":0.9173572591864075,"space_saved_percent":8.264274081359247,"quality_score":0.95,"processing_time":"7149ms"}
curl --location 'https://zylalabs.com/api/12963/pdf+compression+and+optimizer+api/25880/compress+pdf?level=basic&preserve_quality=basic' \
--header 'Content-Type: application/json' \
--form 'image=@"FILE_PATH"'
Después de registrarte, a cada desarrollador se le asigna una clave de acceso a la API personal, una combinación única de letras y dígitos proporcionada para acceder a nuestro endpoint de la API. Para autenticarte con el PDF Compression and Optimizer API simplemente incluye tu token de portador en el encabezado de Autorización.
| Encabezado | Descripción |
|---|---|
Autorización
|
Requerido
Debería ser Bearer access_key. Consulta "Tu Clave de Acceso a la API" arriba cuando estés suscrito.
|
Sin compromiso a largo plazo. Mejora, reduce o cancela en cualquier momento. La Prueba Gratuita incluye hasta 50 solicitudes.
(Ahorra 2 meses pagando anualmente 🎉)
Empresas líderes confían en nosotros
The PDF Compression and Optimizer API reduces the file size of PDF documents while maintaining readability and visual appearance. The API accepts a PDF file as input, applies compression and optimization techniques, and returns a downloadable version of the compressed document along with file size statistics.
Users can select different compression levels to balance file size reduction and document quality. Available compression modes include basic, medium, and maximum, allowing developers to choose the most suitable option for their use case. The API can also preserve visual quality during compression to help maintain the appearance of text, images, graphics, and document layouts.
The API is designed for workflows that require smaller PDF files for storage, sharing, uploading, or distribution. Compressed files can reduce storage requirements, improve transfer speeds, decrease bandwidth usage, and help meet file size restrictions imposed by email systems, document portals, and cloud platforms.
Common use cases include:
Reducing PDF size for email attachments
Optimizing files before uploading to websites
Preparing documents for cloud storage
Compressing reports, invoices, and contracts
Reducing storage requirements for archived documents
Optimizing scanned PDF files
Processing large volumes of PDF documents
Automating document management workflows
Preparing files for document sharing platforms
Reducing bandwidth usage during file transfers
Features:
PDF file compression and optimization
Multiple compression levels
Basic, medium, and maximum compression modes
Optional visual quality preservation
File size reduction reporting
Original and compressed file size metrics
Compression ratio information
Downloadable compressed PDF output
JSON response format
HTTPS-based API access
The API returns structured JSON responses containing a download URL for the compressed file, along with information such as original file size, compressed file size, compression ratio, and processing details. It can be integrated into document management systems, cloud storage platforms, workflow automation tools, business applications, web services, and other systems that process PDF documents.