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.
El punto final de Comprimir PDF devuelve un objeto JSON que contiene una URL descargable para el PDF comprimido junto con métricas como el tamaño del archivo original el tamaño del archivo comprimido la relación de compresión el porcentaje de espacio ahorrado la puntuación de calidad y el tiempo de procesamiento
Key fields in the response include "success" (boolean), "url" (string), "original_size" (integer), "compressed_size" (integer), "compression_ratio" (float), "space_saved_percent" (float), "quality_score" (float), and "processing_time" (string).
Users can customize their requests by providing the PDF file in the file field and selecting a compression level, which can be basic, medium, or maximum, to balance file size and quality.
The response data is structured in a JSON format, with a top-level object containing fields for success status, download URL, size metrics, and processing details, making it easy to parse and utilize programmatically.
The endpoint provides information on the original and compressed file sizes, the compression ratio, the percentage of space saved, the quality score of the compressed file, and the time taken for processing.
Los usuarios pueden usar la URL devuelta para descargar el PDF comprimido analizar las métricas de tamaño para evaluar la efectividad de la compresión y monitorear la puntuación de calidad para asegurarse de que se mantenga la integridad visual del documento
Los casos de uso típicos incluyen la reducción del tamaño de los PDFs para archivos adjuntos de correo electrónico la optimización de archivos para cargas web la preparación de documentos para almacenamiento en la nube y la compresión de grandes volúmenes de PDFs para una gestión eficiente de documentos
Data accuracy is maintained through the use of an industry-grade Ghostscript-tiered compression engine, which applies advanced optimization techniques while preserving the visual quality of text, images, and layouts in the PDF.