openapi: 3.2.0
info:
title: Apifreaks Api Hub For Developers PDF Operations APIs API
version: 1.0.0
contact:
name: APIFreaks Support
url: https://apifreaks.com/contact
email: support@apifreaks.com
description: 'Operations tagged PDF Operations APIs across 7 of this provider''s published API definitions: apifreaks-api-hub-for-developers-delete-pdf-page-openapi.json, apifreaks-api-hub-for-developers-linearize-pdf-openapi.json, apifreaks-api-hub-for-developers-merge-pdf-openapi.json, apifreaks-api-hub-for-developers-pdf-compress-openapi.json, apifreaks-api-hub-for-developers-pdf-extract-pages-openapi.json, apifreaks-api-hub-for-developers-pdf-split-pages-openapi.json, apifreaks-api-hub-for-developers-rotate-pdf-pages-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Remove Pages API Server
security:
- ApiKeyAuthHeader: []
- ApiKeyAuthQuery: []
tags:
- name: PDF Operations APIs
paths:
/pdf/remove-pages:
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Remove Pages API Server
post:
tags:
- PDF Operations APIs
summary: Delete specific pages from a PDF
description: This API removes a selection or range of pages from a PDF file.
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: string
description: The unique identifier of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
- name: output
in: query
required: false
schema:
type: string
description: The desired name for the output PDF file after pages have been removed. If not provided, a default name will be assigned.
- name: pages
in: query
required: true
schema:
type: string
description: 'Specifies which pages to remove from the PDF. Accepts individual page numbers (e.g., ''1,7'') and/or ascending page ranges (e.g., ''3-5''). Use commas to separate entries and hyphens for ranges. Reverse ranges (e.g., ''5-3'') are not allowed. Alternatively, you may provide only one of the following keywords: ''even'' (removes all even-numbered pages), ''odd'' (removes all odd-numbered pages), or ''last'' (removes only the last page). The keyword ''all'' is not supported for this operation. Examples: ''1,3-5'', ''even''. Mixing special keywords with specific pages/ranges is not allowed. Malformed values or page numbers exceeding the document''s page count are not rejected on this call — the resulting task fails asynchronously (check task status).'
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file to remove pages from. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfFileUploadRequest'
responses:
'200':
description: Remove task created successfully. Malformed or out-of-range page specifications are not rejected synchronously — the task is created, then fails asynchronously; poll the task status endpoint and check for status "failed" with an error/message pair.
content:
application/json:
schema:
$ref: '#/components/schemas/PDFResponse'
examples:
success:
summary: Task created
value:
taskId: 04a06cd5-158d-4191-a45b-6f58249c599d
inputIds:
- 7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f
'400':
description: Bad Request — Missing/invalid parameters or file ID
content:
application/json:
examples:
MissingPages:
summary: Missing required pages parameter
value:
error: Invalid Param Exception
message: please pass correct parameters
path: /v1.0/pdf/remove-pages
status: 400
timestamp: '2026-07-27T10:52:11.692Z'
InvalidID:
summary: file_id is malformed or does not exist
value:
timestamp: '2026-07-27T10:52:14.049Z'
path: /v1.0/pdf/remove-pages
status: 400
error: Invalid File ID Provided
message: Please provide a valid file ID
schema:
$ref: '#/components/schemas/ErrorResponse'
'415':
description: Unsupported Media Type — File type not supported
content:
application/json:
examples:
InvalidPDF:
summary: Uploaded file is not a supported type
value:
timestamp: '2026-07-27T10:52:14.649Z'
path: /v1.0/pdf/remove-pages
status: 415
error: Unsupported File Type
message: The provided file type is not supported. Refer to the documentation for valid file types.
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: deletePdfPage
/pdf/linearize:
servers:
- url: https://api.apifreaks.com/v1.0
description: Linearize PDF API Server
post:
tags:
- PDF Operations APIs
summary: Linearize a PDF
description: API endpoint that linearizes any given PDF, restructuring it for faster loading and page-by-page viewing in web browsers.
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: string
description: The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
- name: output
in: query
required: false
schema:
type: string
description: The desired name for the output PDF file after pages have been extracted. If not provided, a default name will be assigned.
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file to linearize. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfFileUploadRequest'
responses:
'200':
description: Linearize task created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PDFResponse'
examples:
success:
summary: Task created
value:
taskId: 8750f9bb-4cb9-45fd-80a6-e1adf6556618
inputIds:
- 5f214118-f848-41f8-809d-8c6058b4b74a
'400':
description: Bad Request — Missing/invalid file or file ID
content:
application/json:
examples:
MissingFileOrID:
summary: Neither a file nor a file ID was provided
value:
timestamp: '2026-07-27T10:55:07.695Z'
path: /v1.0/pdf/linearize
status: 400
message: Please provide either a file or a file ID.
error: Missing File or ID
InvalidID:
summary: file_id is malformed or does not exist
value:
error: Invalid File ID Provided
message: Please provide a valid file ID
path: /v1.0/pdf/linearize
status: 400
timestamp: '2026-07-27T10:55:08.238Z'
schema:
$ref: '#/components/schemas/ErrorResponse'
'415':
description: Unsupported Media Type — File type not supported
content:
application/json:
examples:
UnsupportedFileType:
summary: Uploaded file is not a supported type
value:
timestamp: '2026-07-27T10:55:08.869Z'
path: /v1.0/pdf/linearize
status: 415
error: Unsupported File Type
message: The provided file type is not supported. Refer to the documentation for valid file types.
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: linearizePdf
/pdf/merge:
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Merge API Server
post:
tags:
- PDF Operations APIs
summary: Combine multiple PDF files into one
description: This API merges multiple PDF files into a single PDF, in the order they are provided
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: array
items:
type: string
default: ''
default: []
description: An array of unique file IDs referencing PDF files previously uploaded to the API Freaks server. Use this parameter to merge existing files without re-uploading them. Provide multiple IDs to merge files in the specified order.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
- name: output
in: query
required: false
schema:
type: string
description: Specifies the desired name for the resulting merged PDF file. If not provided, a default name will be assigned.
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file(s) to merge. Alternatively, reference already-uploaded files via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfMergeUploadRequest'
responses:
'200':
description: Merge task created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PDFResponse_2'
examples:
success:
summary: Task created
value:
taskId: 04a06cd5-158d-4191-a45b-6f58249c599d
inputIds:
- 7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f
'400':
description: Bad Request
content:
application/json:
examples:
InvalidID:
summary: Invalid file ID provided
value:
error: Invalid File ID Provided
message: Please provide a valid file ID
path: /v1.0/pdf/merge
status: 400
timestamp: '2026-07-27T10:49:41.973Z'
MissingUploadOrId:
summary: Neither a file nor a file ID was provided
value:
timestamp: '2026-07-27T10:49:41.432Z'
path: /v1.0/pdf/merge-pdf
status: 400
error: Missing File or ID
message: Please provide either a file or a file ID.
schema:
$ref: '#/components/schemas/ErrorResponse'
'415':
description: Unsupported Media Type — File type not supported
content:
application/json:
examples:
UnsupportedFileType:
summary: Unsupported file type
value:
timestamp: '2026-07-27T10:49:42.554Z'
path: /v1.0/pdf/merge-pdf
status: 415
error: Unsupported File Type
message: The provided file type is not supported. Refer to the documentation for valid file types.
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: mergePdf
/pdf/compress:
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Compress API Server
post:
tags:
- PDF Operations APIs
summary: Compress a PDF file
description: This API compresses a given PDF file to reduce its file serize.
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: string
description: The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file.
- name: output
in: query
required: false
schema:
type: string
default: compressed_pdf
description: Name of the output PDF.
- name: compression_level
in: query
required: true
schema:
type: string
enum:
- low
- balanced
- high
- extreme
default: balanced
description: Controls how aggressively the PDF is compressed. Lower levels preserve more quality, while higher levels reduce file size more.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to true, the input file(s) will be deleted from the server immediately after the output is generated.
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file to compress. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfFileUploadRequest'
responses:
'200':
description: Compression task created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PdfTaskResponse'
examples:
success:
summary: Task created
value:
taskId: ce4b1a38-6cfc-4373-9bd7-ff186fbd8e7e
inputIds:
- f2ba4b50-6f8a-43ae-b42d-96937f50cd89
'400':
description: Bad Request — Missing/invalid parameters or file ID
content:
application/json:
examples:
MissingCompressionLevel:
summary: Missing required compression_level parameter
value:
error: Invalid Param Exception
message: please pass correct parameters
path: /v1.0/pdf/compress
status: 400
timestamp: '2026-07-27T10:50:09.307Z'
MissingFileOrID:
summary: Neither a file nor a file ID was provided
value:
timestamp: '2026-07-27T10:50:09.886Z'
path: /v1.0/pdf/compress
status: 400
error: Missing File or ID
message: Please provide either a file or a file ID.
InvalidID:
summary: file_id is malformed or does not exist
value:
error: Invalid File ID Provided
message: Please provide a valid file ID
path: /v1.0/pdf/compress
status: 400
timestamp: '2026-07-27T10:50:25.910Z'
schema:
$ref: '#/components/schemas/ErrorResponse'
'415':
description: Unsupported Media Type — File type not supported
content:
application/json:
examples:
InvalidPDF:
summary: Uploaded file is not a supported type
value:
timestamp: '2026-07-27T10:50:18.409Z'
path: /v1.0/pdf/compress
status: 415
error: Unsupported File Type
message: The provided file type is not supported. Refer to the documentation for valid file types.
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: compressPdf
/pdf/extract-pages:
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Extract Pages API Server
post:
tags:
- PDF Operations APIs
summary: Extract pages from a PDF
description: This API extracts specific pages or page ranges from a PDF file and returns them as a new PDF.
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: string
description: The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
- name: output
in: query
required: false
schema:
type: string
description: The desired name for the output PDF file after pages have been extracted. If not provided, a default name will be assigned.
- name: pages
in: query
required: true
schema:
type: string
description: 'Specifies which pages to extract from the PDF. You can provide individual page numbers (e.g., ''2'') and/or page ranges in any order, including descending (e.g., ''9-5'', ''16-last''). Use commas to separate entries and hyphens for ranges. You may alternatively pass only one of the special keywords: ''even'' (extracts all even-numbered pages), ''odd'' (extracts all odd-numbered pages), ''last'' (extracts only the last page), or ''all'' (extracts all pages into individual files). Examples: ''2,6-3'', ''even'', ''all''. Mixing special keywords with specific pages/ranges is not allowed. Malformed values or page numbers exceeding the document''s page count are not rejected on this call — the resulting task fails asynchronously (check task status).'
- name: separated
in: query
required: false
schema:
type: boolean
description: If set to `true`, each of the specified pages will be extracted and returned as a separate PDF file.
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file to extract pages from. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfFileUploadRequest'
responses:
'200':
description: Extract task created successfully. Malformed or out-of-range page specifications are not rejected synchronously — the task is created, then fails asynchronously; poll the task status endpoint and check for status "failed" with an error/message pair.
content:
application/json:
schema:
$ref: '#/components/schemas/PDFResponse'
examples:
success:
summary: Task created
value:
taskId: dabcbcf5-d4ba-4143-bc34-3a8db6c8476e
inputIds:
- 01a77122-c457-475d-a6f2-f88cd4ad8924
'400':
description: Bad Request — Missing/invalid parameters or file ID
content:
application/json:
examples:
MissingPages:
summary: Missing required pages parameter
value:
error: Invalid Param Exception
message: please pass correct parameters
path: /v1.0/pdf/extract-pages
status: 400
timestamp: '2026-07-27T10:53:18.573Z'
InvalidID:
summary: file_id is malformed or does not exist
value:
error: Invalid File ID Provided
message: Please provide a valid file ID
path: /v1.0/pdf/extract-pages
status: 400
timestamp: '2026-07-27T10:53:19.182Z'
schema:
$ref: '#/components/schemas/ErrorResponse'
'415':
description: Unsupported Media Type — File type not supported
content:
application/json:
examples:
UnsupportedFileType:
summary: Uploaded file is not a supported type
value:
timestamp: '2026-07-27T10:53:19.733Z'
path: /v1.0/pdf/extract-pages
status: 415
error: Unsupported File Type
message: The provided file type is not supported. Refer to the documentation for valid file types.
schema:
$ref: '#/components/schemas/ErrorResponse'
operationId: extractPdfPages
/pdf/split:
servers:
- url: https://api.apifreaks.com/v1.0
description: PDF Split API Server
post:
tags:
- PDF Operations APIs
summary: Split a PDF into smaller files
description: This API splits a PDF into multiple parts based on specified page numbers or ranges.
parameters:
- name: format
in: query
required: false
schema:
type: string
enum:
- json
- xml
default: json
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
- name: file_id
in: query
required: false
schema:
type: string
description: The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file directly.
- name: destroy
in: query
required: false
schema:
type: boolean
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
- name: output
in: query
required: false
schema:
type: string
description: The desired base name for the output PDF files after splitting. If not provided, a default naming convention will be used.
- name: pages
in: query
required: false
schema:
type: array
items:
type: string
default: ''
default: []
description: 'Defines the page numbers or ranges where the PDF should be split. Provide individual pages and/or ranges in any order (for example: "1-4,9-5,16-last"). Separate entries with commas and use hyphens for ranges.
Special keywords (use alone):
• `even` — split at every even-numbered page
• `odd` — split at every odd-numbered page
• `all` — split the PDF into single-page files
The keyword `last` can be used anywhere in the string, in combination with page numbers or ranges (for example: "5-last", "last-2", "1,last,9").
Examples:
- "1,4-2,last"
- "odd"
- "all"
- "last,2-5"
Invalid example: "1,odd" (mixing a keyword other than "last" with specific pages/ranges is not allowed). You can pass multiple pages entries to produce multiple output files.'
- name: webhook_url
in: query
required: false
schema:
type: string
description: The URL to which the webhook notification will be sent after the task is completed.
- name: webhook_failure_notification
in: query
required: false
schema:
type: boolean
description: If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one.
- name: X-Webhook-Authorization
in: header
required: false
schema:
type: string
description: 'Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call.'
requestBody:
description: Multipart form-data body carrying the PDF file to split. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.
required: false
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/PdfFileUploadRequest'
responses:
'200':
description: Split task created successfully. Malformed or out-of-range page specifications are not rejected synchronously — the task is created, then fails asynchronously; poll the task status endpoint and check for status "failed" with an error/message pair.
content:
application/json:
schema:
$ref: '#/components/schemas/PDFResponse'
examples:
success:
summary: Task created
value:
taskId: a533a95c-b3fb-49f0-abb1-bef2f3e805ef
inputIds:
- 62f910b6-69ce-4cbc-8285-eee5f16467be
'400':
description: Bad Request
# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/apifreaks-api-hub-for-developers/refs/heads/main/openapi/apifreaks-api-hub-for-developers-pdf-operations-apis-api-openapi.yml