---
title: Compress PDF File API
slug: compress-pdf-file
url: https://apyhub.com/freedailypro/service/compress-pdf-file
provider: FreeDailyPro
auth: api_key
version: v1
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Compress PDF File API

Compress PDF files to reduce file size for easier sharing, uploading, and storage. Optimize your PDF documents while maintaining readability.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/compress-pdf-file/compress` | What it does Compresses a PDF file that you upload and returns the compressed PDF as a binary file… | 10 |

## Endpoint reference

### Compress a PDF

`POST https://api.eu.apyhub.com/freedailypro/compress-pdf-file/compress` · 10 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | The PDF. Up to 20 MB. |

#### Quickstart

Upload a PDF to compress it.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/compress-pdf-file/compress" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.pdf"
```

#### What you'll get back

Returns a binary file (`string` with `format: "binary"`), which is the compressed PDF content.

## About

## What it does
PDF Compressor reduces the size of a PDF by taking a binary PDF upload and returning a compressed binary PDF file. Send a PDF up to 20 MB, get a smaller PDF back.

Use PDF Compressor when you need to cut download time, reduce email attachment size, or store documents more efficiently without changing your workflow around PDFs. The endpoint is straightforward: POST the file to `/compress`, and the response is the compressed PDF as binary content.

Because the service accepts only a PDF file in the request body and returns binary output, it fits cleanly into document pipelines, upload services, and backend jobs that need to shrink files before sharing or archiving. It is useful anywhere PDF size matters more than converting the document into another format.

If you are building a document management flow, a support portal, or an internal archive tool, PDF Compressor gives you a direct way to reduce PDF file size before delivery or retention.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/compress-pdf-file
