@apifreaks/openapi-specs 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +133 -2
- package/dist/index.d.cts +140 -3
- package/dist/index.d.ts +140 -3
- package/dist/index.js +131 -2
- package/dist/specs/commodity/commodity-fluctuation.yaml +225 -0
- package/dist/specs/commodity/commodity-prices.yaml +236 -0
- package/dist/specs/commodity/commodity-symbols.yaml +159 -0
- package/dist/specs/commodity/commodity-time-series.yaml +238 -0
- package/dist/specs/commodity/historical-commodity-prices.yaml +208 -0
- package/dist/specs/currency/currency-converter.yaml +193 -0
- package/dist/specs/currency/currency-fluctuation.yaml +211 -0
- package/dist/specs/currency/currency-historical-data-limit.yaml +112 -0
- package/dist/specs/currency/currency-rate.yaml +173 -0
- package/dist/specs/currency/currency-supported.yaml +176 -0
- package/dist/specs/currency/currency-symbols.yaml +115 -0
- package/dist/specs/currency/currency-time-series.yaml +232 -0
- package/dist/specs/currency/geolocalized-currency-conversion.yaml +214 -0
- package/dist/specs/currency/historical-currency-converter.yaml +195 -0
- package/dist/specs/currency/historical-currency-rate.yaml +180 -0
- package/dist/specs/dns/bulk-dns-lookup.yaml +484 -0
- package/dist/specs/dns/dns-history-lookup.yaml +451 -0
- package/dist/specs/dns/dns-lookup.yaml +360 -0
- package/dist/specs/dns/reverse-dns-lookup.yaml +338 -0
- package/dist/specs/domain/bulk-domain-checker.yaml +198 -0
- package/dist/specs/domain/domain-search-with-suggestions.yaml +196 -0
- package/dist/specs/domain/domain-search.yaml +149 -0
- package/dist/specs/domain/subdomain-lookup.yaml +251 -0
- package/dist/specs/email-validation/bulk-email-validation.yaml +403 -0
- package/dist/specs/email-validation/email-checker.yaml +451 -0
- package/dist/specs/financial/bulk-vat-rates-country.yaml +250 -0
- package/dist/specs/financial/financial-apis-supported-countries.yaml +152 -0
- package/dist/specs/financial/iban-validation.yaml +270 -0
- package/dist/specs/financial/swift-code-finder.yaml +146 -0
- package/dist/specs/financial/swift-code-lookup.yaml +156 -0
- package/dist/specs/financial/vat-number-validation.yaml +205 -0
- package/dist/specs/financial/vat-rates-by-ip.yaml +200 -0
- package/dist/specs/financial/vat-rates-country.yaml +212 -0
- package/dist/specs/general/usage-credits.yaml +188 -0
- package/dist/specs/geocoding/forward-geocoding.yaml +292 -0
- package/dist/specs/geocoding/reverse-geocoding.yaml +237 -0
- package/dist/specs/geodb/administrative-units-details.yaml +180 -0
- package/dist/specs/geodb/administrative-units-levels.yaml +140 -0
- package/dist/specs/geodb/administrative-units.yaml +168 -0
- package/dist/specs/geodb/cities.yaml +209 -0
- package/dist/specs/geodb/countries-details.yaml +207 -0
- package/dist/specs/geodb/countries.yaml +199 -0
- package/dist/specs/geodb/flags-supported.yaml +119 -0
- package/dist/specs/geodb/flags.yaml +170 -0
- package/dist/specs/geodb/regions.yaml +76 -0
- package/dist/specs/geodb/subregions.yaml +158 -0
- package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +895 -0
- package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +310 -0
- package/dist/specs/ip-intelligence/ip-locator.yaml +708 -0
- package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +230 -0
- package/dist/specs/other/astronomy-data.yaml +632 -0
- package/dist/specs/pdf/delete-pdf-page.yaml +193 -0
- package/dist/specs/pdf/linearize-pdf.yaml +187 -0
- package/dist/specs/pdf/merge-pdf.yaml +193 -0
- package/dist/specs/pdf/pdf-compress.yaml +208 -0
- package/dist/specs/pdf/pdf-decrypt.yaml +202 -0
- package/dist/specs/pdf/pdf-encrypt.yaml +213 -0
- package/dist/specs/pdf/pdf-extract-pages.yaml +199 -0
- package/dist/specs/pdf/pdf-file-status.yaml +148 -0
- package/dist/specs/pdf/pdf-file.yaml +136 -0
- package/dist/specs/pdf/pdf-files.yaml +85 -0
- package/dist/specs/pdf/pdf-resource-download.yaml +117 -0
- package/dist/specs/pdf/pdf-resource-upload-binary.yaml +152 -0
- package/dist/specs/pdf/pdf-resource-upload.yaml +163 -0
- package/dist/specs/pdf/pdf-restrict.yaml +246 -0
- package/dist/specs/pdf/pdf-split-pages.yaml +208 -0
- package/dist/specs/pdf/pdf-task-status.yaml +187 -0
- package/dist/specs/pdf/pdf-to-image.yaml +844 -0
- package/dist/specs/pdf/pdf-unrestrict.yaml +221 -0
- package/dist/specs/pdf/rotate-pdf-pages.yaml +207 -0
- package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +374 -0
- package/dist/specs/phone-validation/phone-number-validation.yaml +344 -0
- package/dist/specs/scraper/web-scraper.yaml +479 -0
- package/dist/specs/screenshot/bulk-screenshot.yaml +728 -0
- package/dist/specs/screenshot/website-screenshot.yaml +822 -0
- package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +593 -0
- package/dist/specs/ssl/ssl-certificate-lookup.yaml +478 -0
- package/dist/specs/timezone/timezone-converter.yaml +249 -0
- package/dist/specs/timezone/timezone-lookup.yaml +712 -0
- package/dist/specs/user-agent/bulk-user-agent-parser.yaml +340 -0
- package/dist/specs/user-agent/user-agent-parser.yaml +271 -0
- package/dist/specs/weather/air-quality.yaml +590 -0
- package/dist/specs/weather/bulk-live-weather.yaml +654 -0
- package/dist/specs/weather/flood-forecast.yaml +519 -0
- package/dist/specs/weather/historical-weather.yaml +842 -0
- package/dist/specs/weather/live-weather.yaml +633 -0
- package/dist/specs/weather/marine-weather.yaml +806 -0
- package/dist/specs/weather/time-series-weather.yaml +821 -0
- package/dist/specs/weather/weather-forecast.yaml +935 -0
- package/dist/specs/whois/asn-lookup.yaml +618 -0
- package/dist/specs/whois/bulk-whois-lookup.yaml +827 -0
- package/dist/specs/whois/domain-whois-history-lookup.yaml +445 -0
- package/dist/specs/whois/reverse-whois.yaml +566 -0
- package/dist/specs/whois/whois-domain-lookup.yaml +537 -0
- package/dist/specs/whois/whois-ip-lookup.yaml +1123 -0
- package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +232 -0
- package/dist/specs/zip-code/zip-code-api.yaml +216 -0
- package/dist/specs/zip-code/zip-code-distance-match.yaml +239 -0
- package/dist/specs/zip-code/zip-code-distance.yaml +233 -0
- package/dist/specs/zip-code/zip-codes-by-city.yaml +201 -0
- package/dist/specs/zip-code/zip-codes-by-region.yaml +200 -0
- package/dist/specs/zip-code/zip-codes-radius-search.yaml +262 -0
- package/package.json +6 -2
- package/specs/pdf/merge-pdf.json +2 -2
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: PDF Remove Pages API - Delete PDF Pages and Clean Up Documents Instantly
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Remove specific pages from a PDF file. Specify page numbers to delete. Returns a task ID for tracking the deletion progress.
|
|
6
|
+
contact:
|
|
7
|
+
name: APIFreaks Support
|
|
8
|
+
url: https://apifreaks.com/contact
|
|
9
|
+
email: support@apifreaks.com
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://api.apifreaks.com/v1.0
|
|
12
|
+
description: PDF Remove Pages API Server
|
|
13
|
+
paths:
|
|
14
|
+
/pdf/remove-pages:
|
|
15
|
+
post:
|
|
16
|
+
tags:
|
|
17
|
+
- PDF Operations APIs
|
|
18
|
+
summary: Delete specific pages from a PDF
|
|
19
|
+
description: This API removes a selection or range of pages from a PDF file.
|
|
20
|
+
parameters:
|
|
21
|
+
- name: format
|
|
22
|
+
in: query
|
|
23
|
+
required: false
|
|
24
|
+
schema:
|
|
25
|
+
type: string
|
|
26
|
+
enum:
|
|
27
|
+
- json
|
|
28
|
+
- xml
|
|
29
|
+
default: json
|
|
30
|
+
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
|
|
31
|
+
- name: file_id
|
|
32
|
+
in: query
|
|
33
|
+
required: false
|
|
34
|
+
schema:
|
|
35
|
+
type: string
|
|
36
|
+
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.
|
|
37
|
+
- name: destroy
|
|
38
|
+
in: query
|
|
39
|
+
required: false
|
|
40
|
+
schema:
|
|
41
|
+
type: boolean
|
|
42
|
+
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
|
|
43
|
+
- name: output
|
|
44
|
+
in: query
|
|
45
|
+
required: false
|
|
46
|
+
schema:
|
|
47
|
+
type: string
|
|
48
|
+
description: The desired name for the output PDF file after pages have been removed. If not provided, a default name will be assigned.
|
|
49
|
+
- name: pages
|
|
50
|
+
in: query
|
|
51
|
+
required: true
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
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).'
|
|
55
|
+
- name: webhook_url
|
|
56
|
+
in: query
|
|
57
|
+
required: false
|
|
58
|
+
schema:
|
|
59
|
+
type: string
|
|
60
|
+
description: The URL to which the webhook notification will be sent after the task is completed.
|
|
61
|
+
- name: webhook_failure_notification
|
|
62
|
+
in: query
|
|
63
|
+
required: false
|
|
64
|
+
schema:
|
|
65
|
+
type: boolean
|
|
66
|
+
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.
|
|
67
|
+
- name: X-Webhook-Authorization
|
|
68
|
+
in: header
|
|
69
|
+
required: false
|
|
70
|
+
schema:
|
|
71
|
+
type: string
|
|
72
|
+
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.'
|
|
73
|
+
requestBody:
|
|
74
|
+
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.
|
|
75
|
+
required: false
|
|
76
|
+
content:
|
|
77
|
+
multipart/form-data:
|
|
78
|
+
schema:
|
|
79
|
+
$ref: '#/components/schemas/PdfFileUploadRequest'
|
|
80
|
+
responses:
|
|
81
|
+
'200':
|
|
82
|
+
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.
|
|
83
|
+
content:
|
|
84
|
+
application/json:
|
|
85
|
+
schema:
|
|
86
|
+
$ref: '#/components/schemas/PDFResponse'
|
|
87
|
+
examples:
|
|
88
|
+
success:
|
|
89
|
+
summary: Task created
|
|
90
|
+
value:
|
|
91
|
+
taskId: 04a06cd5-158d-4191-a45b-6f58249c599d
|
|
92
|
+
inputIds:
|
|
93
|
+
- 7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f
|
|
94
|
+
'400':
|
|
95
|
+
description: Bad Request — Missing/invalid parameters or file ID
|
|
96
|
+
content:
|
|
97
|
+
application/json:
|
|
98
|
+
examples:
|
|
99
|
+
MissingPages:
|
|
100
|
+
summary: Missing required pages parameter
|
|
101
|
+
value:
|
|
102
|
+
error: Invalid Param Exception
|
|
103
|
+
message: please pass correct parameters
|
|
104
|
+
path: /v1.0/pdf/remove-pages
|
|
105
|
+
status: 400
|
|
106
|
+
timestamp: '2026-07-27T10:52:11.692Z'
|
|
107
|
+
InvalidID:
|
|
108
|
+
summary: file_id is malformed or does not exist
|
|
109
|
+
value:
|
|
110
|
+
timestamp: '2026-07-27T10:52:14.049Z'
|
|
111
|
+
path: /v1.0/pdf/remove-pages
|
|
112
|
+
status: 400
|
|
113
|
+
error: Invalid File ID Provided
|
|
114
|
+
message: Please provide a valid file ID
|
|
115
|
+
schema:
|
|
116
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
117
|
+
'415':
|
|
118
|
+
description: Unsupported Media Type — File type not supported
|
|
119
|
+
content:
|
|
120
|
+
application/json:
|
|
121
|
+
examples:
|
|
122
|
+
InvalidPDF:
|
|
123
|
+
summary: Uploaded file is not a supported type
|
|
124
|
+
value:
|
|
125
|
+
timestamp: '2026-07-27T10:52:14.649Z'
|
|
126
|
+
path: /v1.0/pdf/remove-pages
|
|
127
|
+
status: 415
|
|
128
|
+
error: Unsupported File Type
|
|
129
|
+
message: The provided file type is not supported. Refer to the documentation for valid file types.
|
|
130
|
+
schema:
|
|
131
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
132
|
+
operationId: deletePdfPage
|
|
133
|
+
components:
|
|
134
|
+
securitySchemes:
|
|
135
|
+
ApiKeyAuthHeader:
|
|
136
|
+
type: apiKey
|
|
137
|
+
in: header
|
|
138
|
+
name: X-apiKey
|
|
139
|
+
description: Pass your API key via the X-apiKey request header.
|
|
140
|
+
ApiKeyAuthQuery:
|
|
141
|
+
type: apiKey
|
|
142
|
+
in: query
|
|
143
|
+
name: apiKey
|
|
144
|
+
description: Pass your API key via the apiKey query parameter.
|
|
145
|
+
schemas:
|
|
146
|
+
PDFResponse:
|
|
147
|
+
type: object
|
|
148
|
+
description: Response containing the task ID and input file IDs for a PDF processing task.
|
|
149
|
+
required:
|
|
150
|
+
- taskId
|
|
151
|
+
properties:
|
|
152
|
+
taskId:
|
|
153
|
+
type: string
|
|
154
|
+
description: Task ID of the requested task, used to check the task status.
|
|
155
|
+
inputIds:
|
|
156
|
+
type: array
|
|
157
|
+
items:
|
|
158
|
+
type: string
|
|
159
|
+
description: File IDs for the input files provided for the task. Not returned when destroy parameter is true.
|
|
160
|
+
PdfFileUploadRequest:
|
|
161
|
+
type: object
|
|
162
|
+
description: Multipart form-data request body containing the PDF file to process.
|
|
163
|
+
required: []
|
|
164
|
+
properties:
|
|
165
|
+
file:
|
|
166
|
+
type: string
|
|
167
|
+
format: binary
|
|
168
|
+
description: Raw PDF file bytes sent as a multipart/form-data field named 'file'. Omit this field entirely and pass file_id in the query string instead to use an already-uploaded file.
|
|
169
|
+
ErrorResponse:
|
|
170
|
+
type: object
|
|
171
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
172
|
+
required:
|
|
173
|
+
- message
|
|
174
|
+
properties:
|
|
175
|
+
error:
|
|
176
|
+
type: string
|
|
177
|
+
description: Short error category or exception type.
|
|
178
|
+
message:
|
|
179
|
+
type: string
|
|
180
|
+
description: Human-readable error message describing the failure.
|
|
181
|
+
path:
|
|
182
|
+
type: string
|
|
183
|
+
description: API endpoint path that produced the error.
|
|
184
|
+
status:
|
|
185
|
+
type: integer
|
|
186
|
+
description: HTTP status code returned with the error.
|
|
187
|
+
timestamp:
|
|
188
|
+
type: string
|
|
189
|
+
format: date-time
|
|
190
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
191
|
+
security:
|
|
192
|
+
- ApiKeyAuthHeader: []
|
|
193
|
+
- ApiKeyAuthQuery: []
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: PDF Linearize API - Optimize PDFs for Fast Web Viewing
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: Linearize (web-optimize) a PDF file for faster viewing in web browsers. Optimized PDFs load page-by-page without downloading the entire file.
|
|
6
|
+
contact:
|
|
7
|
+
name: APIFreaks Support
|
|
8
|
+
url: https://apifreaks.com/contact
|
|
9
|
+
email: support@apifreaks.com
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://api.apifreaks.com/v1.0
|
|
12
|
+
description: Linearize PDF API Server
|
|
13
|
+
paths:
|
|
14
|
+
/pdf/linearize:
|
|
15
|
+
post:
|
|
16
|
+
tags:
|
|
17
|
+
- PDF Operations APIs
|
|
18
|
+
summary: Linearize a PDF
|
|
19
|
+
description: API endpoint that linearizes any given PDF, restructuring it for faster loading and page-by-page viewing in web browsers.
|
|
20
|
+
parameters:
|
|
21
|
+
- name: format
|
|
22
|
+
in: query
|
|
23
|
+
required: false
|
|
24
|
+
schema:
|
|
25
|
+
type: string
|
|
26
|
+
enum:
|
|
27
|
+
- json
|
|
28
|
+
- xml
|
|
29
|
+
default: json
|
|
30
|
+
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
|
|
31
|
+
- name: file_id
|
|
32
|
+
in: query
|
|
33
|
+
required: false
|
|
34
|
+
schema:
|
|
35
|
+
type: string
|
|
36
|
+
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.
|
|
37
|
+
- name: destroy
|
|
38
|
+
in: query
|
|
39
|
+
required: false
|
|
40
|
+
schema:
|
|
41
|
+
type: boolean
|
|
42
|
+
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
|
|
43
|
+
- name: output
|
|
44
|
+
in: query
|
|
45
|
+
required: false
|
|
46
|
+
schema:
|
|
47
|
+
type: string
|
|
48
|
+
description: The desired name for the output PDF file after pages have been extracted. If not provided, a default name will be assigned.
|
|
49
|
+
- name: webhook_url
|
|
50
|
+
in: query
|
|
51
|
+
required: false
|
|
52
|
+
schema:
|
|
53
|
+
type: string
|
|
54
|
+
description: The URL to which the webhook notification will be sent after the task is completed.
|
|
55
|
+
- name: webhook_failure_notification
|
|
56
|
+
in: query
|
|
57
|
+
required: false
|
|
58
|
+
schema:
|
|
59
|
+
type: boolean
|
|
60
|
+
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.
|
|
61
|
+
- name: X-Webhook-Authorization
|
|
62
|
+
in: header
|
|
63
|
+
required: false
|
|
64
|
+
schema:
|
|
65
|
+
type: string
|
|
66
|
+
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.'
|
|
67
|
+
requestBody:
|
|
68
|
+
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.
|
|
69
|
+
required: false
|
|
70
|
+
content:
|
|
71
|
+
multipart/form-data:
|
|
72
|
+
schema:
|
|
73
|
+
$ref: '#/components/schemas/PdfFileUploadRequest'
|
|
74
|
+
responses:
|
|
75
|
+
'200':
|
|
76
|
+
description: Linearize task created successfully
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
$ref: '#/components/schemas/PDFResponse'
|
|
81
|
+
examples:
|
|
82
|
+
success:
|
|
83
|
+
summary: Task created
|
|
84
|
+
value:
|
|
85
|
+
taskId: 8750f9bb-4cb9-45fd-80a6-e1adf6556618
|
|
86
|
+
inputIds:
|
|
87
|
+
- 5f214118-f848-41f8-809d-8c6058b4b74a
|
|
88
|
+
'400':
|
|
89
|
+
description: Bad Request — Missing/invalid file or file ID
|
|
90
|
+
content:
|
|
91
|
+
application/json:
|
|
92
|
+
examples:
|
|
93
|
+
MissingFileOrID:
|
|
94
|
+
summary: Neither a file nor a file ID was provided
|
|
95
|
+
value:
|
|
96
|
+
timestamp: '2026-07-27T10:55:07.695Z'
|
|
97
|
+
path: /v1.0/pdf/linearize
|
|
98
|
+
status: 400
|
|
99
|
+
message: Please provide either a file or a file ID.
|
|
100
|
+
error: Missing File or ID
|
|
101
|
+
InvalidID:
|
|
102
|
+
summary: file_id is malformed or does not exist
|
|
103
|
+
value:
|
|
104
|
+
error: Invalid File ID Provided
|
|
105
|
+
message: Please provide a valid file ID
|
|
106
|
+
path: /v1.0/pdf/linearize
|
|
107
|
+
status: 400
|
|
108
|
+
timestamp: '2026-07-27T10:55:08.238Z'
|
|
109
|
+
schema:
|
|
110
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
111
|
+
'415':
|
|
112
|
+
description: Unsupported Media Type — File type not supported
|
|
113
|
+
content:
|
|
114
|
+
application/json:
|
|
115
|
+
examples:
|
|
116
|
+
UnsupportedFileType:
|
|
117
|
+
summary: Uploaded file is not a supported type
|
|
118
|
+
value:
|
|
119
|
+
timestamp: '2026-07-27T10:55:08.869Z'
|
|
120
|
+
path: /v1.0/pdf/linearize
|
|
121
|
+
status: 415
|
|
122
|
+
error: Unsupported File Type
|
|
123
|
+
message: The provided file type is not supported. Refer to the documentation for valid file types.
|
|
124
|
+
schema:
|
|
125
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
126
|
+
operationId: linearizePdf
|
|
127
|
+
components:
|
|
128
|
+
securitySchemes:
|
|
129
|
+
ApiKeyAuthHeader:
|
|
130
|
+
type: apiKey
|
|
131
|
+
in: header
|
|
132
|
+
name: X-apiKey
|
|
133
|
+
description: Pass your API key via the X-apiKey request header.
|
|
134
|
+
ApiKeyAuthQuery:
|
|
135
|
+
type: apiKey
|
|
136
|
+
in: query
|
|
137
|
+
name: apiKey
|
|
138
|
+
description: Pass your API key via the apiKey query parameter.
|
|
139
|
+
schemas:
|
|
140
|
+
PDFResponse:
|
|
141
|
+
type: object
|
|
142
|
+
description: Response containing the task ID and input file IDs for a PDF processing task.
|
|
143
|
+
required:
|
|
144
|
+
- taskId
|
|
145
|
+
properties:
|
|
146
|
+
taskId:
|
|
147
|
+
type: string
|
|
148
|
+
description: Task ID of the requested task, used to check the task status.
|
|
149
|
+
inputIds:
|
|
150
|
+
type: array
|
|
151
|
+
items:
|
|
152
|
+
type: string
|
|
153
|
+
description: File IDs for the input files provided for the task. Not returned when destroy parameter is true.
|
|
154
|
+
PdfFileUploadRequest:
|
|
155
|
+
type: object
|
|
156
|
+
description: Multipart form-data request body containing the PDF file to process.
|
|
157
|
+
required: []
|
|
158
|
+
properties:
|
|
159
|
+
file:
|
|
160
|
+
type: string
|
|
161
|
+
format: binary
|
|
162
|
+
description: Raw PDF file bytes sent as a multipart/form-data field named 'file'. Omit this field entirely and pass file_id in the query string instead to use an already-uploaded file.
|
|
163
|
+
ErrorResponse:
|
|
164
|
+
type: object
|
|
165
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
166
|
+
required:
|
|
167
|
+
- message
|
|
168
|
+
properties:
|
|
169
|
+
error:
|
|
170
|
+
type: string
|
|
171
|
+
description: Short error category or exception type.
|
|
172
|
+
message:
|
|
173
|
+
type: string
|
|
174
|
+
description: Human-readable error message describing the failure.
|
|
175
|
+
path:
|
|
176
|
+
type: string
|
|
177
|
+
description: API endpoint path that produced the error.
|
|
178
|
+
status:
|
|
179
|
+
type: integer
|
|
180
|
+
description: HTTP status code returned with the error.
|
|
181
|
+
timestamp:
|
|
182
|
+
type: string
|
|
183
|
+
format: date-time
|
|
184
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
185
|
+
security:
|
|
186
|
+
- ApiKeyAuthHeader: []
|
|
187
|
+
- ApiKeyAuthQuery: []
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
openapi: 3.1.1
|
|
2
|
+
info:
|
|
3
|
+
title: Merge PDF API - Instantly Combine PDFs at Scale
|
|
4
|
+
version: 1.0.1
|
|
5
|
+
description: Merge multiple PDF files into a single PDF document in the order they are provided. Accepts input files up to 1GB in size via file upload or existing file IDs. Returns a task ID for tracking the merge progress.
|
|
6
|
+
contact:
|
|
7
|
+
name: APIFreaks Support
|
|
8
|
+
url: https://apifreaks.com/contact
|
|
9
|
+
email: support@apifreaks.com
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://api.apifreaks.com/v1.0
|
|
12
|
+
description: PDF Merge API Server
|
|
13
|
+
paths:
|
|
14
|
+
/pdf/merge:
|
|
15
|
+
post:
|
|
16
|
+
tags:
|
|
17
|
+
- PDF Operations APIs
|
|
18
|
+
summary: Combine multiple PDF files into one
|
|
19
|
+
description: This API merges multiple PDF files into a single PDF, in the order they are provided
|
|
20
|
+
parameters:
|
|
21
|
+
- name: format
|
|
22
|
+
in: query
|
|
23
|
+
required: false
|
|
24
|
+
schema:
|
|
25
|
+
type: string
|
|
26
|
+
enum:
|
|
27
|
+
- json
|
|
28
|
+
- xml
|
|
29
|
+
default: json
|
|
30
|
+
description: Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure.
|
|
31
|
+
- name: file_id
|
|
32
|
+
in: query
|
|
33
|
+
required: false
|
|
34
|
+
schema:
|
|
35
|
+
type: array
|
|
36
|
+
items:
|
|
37
|
+
type: string
|
|
38
|
+
default: ''
|
|
39
|
+
default: []
|
|
40
|
+
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.
|
|
41
|
+
- name: destroy
|
|
42
|
+
in: query
|
|
43
|
+
required: false
|
|
44
|
+
schema:
|
|
45
|
+
type: boolean
|
|
46
|
+
description: If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated.
|
|
47
|
+
- name: output
|
|
48
|
+
in: query
|
|
49
|
+
required: false
|
|
50
|
+
schema:
|
|
51
|
+
type: string
|
|
52
|
+
description: Specifies the desired name for the resulting merged PDF file. If not provided, a default name will be assigned.
|
|
53
|
+
- name: webhook_url
|
|
54
|
+
in: query
|
|
55
|
+
required: false
|
|
56
|
+
schema:
|
|
57
|
+
type: string
|
|
58
|
+
description: The URL to which the webhook notification will be sent after the task is completed.
|
|
59
|
+
- name: webhook_failure_notification
|
|
60
|
+
in: query
|
|
61
|
+
required: false
|
|
62
|
+
schema:
|
|
63
|
+
type: boolean
|
|
64
|
+
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.
|
|
65
|
+
- name: X-Webhook-Authorization
|
|
66
|
+
in: header
|
|
67
|
+
required: false
|
|
68
|
+
schema:
|
|
69
|
+
type: string
|
|
70
|
+
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.'
|
|
71
|
+
requestBody:
|
|
72
|
+
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.
|
|
73
|
+
required: false
|
|
74
|
+
content:
|
|
75
|
+
multipart/form-data:
|
|
76
|
+
schema:
|
|
77
|
+
$ref: '#/components/schemas/PdfMergeUploadRequest'
|
|
78
|
+
responses:
|
|
79
|
+
'200':
|
|
80
|
+
description: Merge task created successfully
|
|
81
|
+
content:
|
|
82
|
+
application/json:
|
|
83
|
+
schema:
|
|
84
|
+
$ref: '#/components/schemas/PDFResponse'
|
|
85
|
+
examples:
|
|
86
|
+
success:
|
|
87
|
+
summary: Task created
|
|
88
|
+
value:
|
|
89
|
+
taskId: 04a06cd5-158d-4191-a45b-6f58249c599d
|
|
90
|
+
inputIds:
|
|
91
|
+
- 7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f
|
|
92
|
+
'400':
|
|
93
|
+
description: Bad Request
|
|
94
|
+
content:
|
|
95
|
+
application/json:
|
|
96
|
+
examples:
|
|
97
|
+
InvalidID:
|
|
98
|
+
summary: Invalid file ID provided
|
|
99
|
+
value:
|
|
100
|
+
error: Invalid File ID Provided
|
|
101
|
+
message: Please provide a valid file ID
|
|
102
|
+
path: /v1.0/pdf/merge
|
|
103
|
+
status: 400
|
|
104
|
+
timestamp: '2026-07-27T10:49:41.973Z'
|
|
105
|
+
MissingUploadOrId:
|
|
106
|
+
summary: Neither a file nor a file ID was provided
|
|
107
|
+
value:
|
|
108
|
+
timestamp: '2026-07-27T10:49:41.432Z'
|
|
109
|
+
path: /v1.0/pdf/merge-pdf
|
|
110
|
+
status: 400
|
|
111
|
+
error: Missing File or ID
|
|
112
|
+
message: Please provide either a file or a file ID.
|
|
113
|
+
schema:
|
|
114
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
115
|
+
'415':
|
|
116
|
+
description: Unsupported Media Type — File type not supported
|
|
117
|
+
content:
|
|
118
|
+
application/json:
|
|
119
|
+
examples:
|
|
120
|
+
UnsupportedFileType:
|
|
121
|
+
summary: Unsupported file type
|
|
122
|
+
value:
|
|
123
|
+
timestamp: '2026-07-27T10:49:42.554Z'
|
|
124
|
+
path: /v1.0/pdf/merge-pdf
|
|
125
|
+
status: 415
|
|
126
|
+
error: Unsupported File Type
|
|
127
|
+
message: The provided file type is not supported. Refer to the documentation for valid file types.
|
|
128
|
+
schema:
|
|
129
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
130
|
+
operationId: mergePdf
|
|
131
|
+
components:
|
|
132
|
+
securitySchemes:
|
|
133
|
+
ApiKeyAuthHeader:
|
|
134
|
+
type: apiKey
|
|
135
|
+
in: header
|
|
136
|
+
name: X-apiKey
|
|
137
|
+
description: Pass your API key via the X-apiKey request header.
|
|
138
|
+
ApiKeyAuthQuery:
|
|
139
|
+
type: apiKey
|
|
140
|
+
in: query
|
|
141
|
+
name: apiKey
|
|
142
|
+
description: Pass your API key via the apiKey query parameter.
|
|
143
|
+
schemas:
|
|
144
|
+
PDFResponse:
|
|
145
|
+
type: object
|
|
146
|
+
required:
|
|
147
|
+
- taskId
|
|
148
|
+
properties:
|
|
149
|
+
taskId:
|
|
150
|
+
type: string
|
|
151
|
+
description: Task ID of the requested task, used to check the task status.
|
|
152
|
+
inputIds:
|
|
153
|
+
type: array
|
|
154
|
+
items:
|
|
155
|
+
type: string
|
|
156
|
+
description: File IDs for the input files provided for the task.
|
|
157
|
+
description: Response containing the task ID and input file IDs for a PDF processing task.
|
|
158
|
+
PdfMergeUploadRequest:
|
|
159
|
+
type: object
|
|
160
|
+
description: Multipart form-data request body containing multiple PDF files to merge.
|
|
161
|
+
required: []
|
|
162
|
+
properties:
|
|
163
|
+
file:
|
|
164
|
+
type: array
|
|
165
|
+
items:
|
|
166
|
+
type: string
|
|
167
|
+
format: binary
|
|
168
|
+
description: One or more raw PDF file byte streams, each sent as a separate multipart/form-data field named 'file'. Omit this field entirely and pass one or more file_id query parameters instead to merge already-uploaded files.
|
|
169
|
+
ErrorResponse:
|
|
170
|
+
type: object
|
|
171
|
+
description: Standard error envelope returned by the API on failed requests.
|
|
172
|
+
required:
|
|
173
|
+
- message
|
|
174
|
+
properties:
|
|
175
|
+
error:
|
|
176
|
+
type: string
|
|
177
|
+
description: Short error category or exception type.
|
|
178
|
+
message:
|
|
179
|
+
type: string
|
|
180
|
+
description: Human-readable error message describing the failure.
|
|
181
|
+
path:
|
|
182
|
+
type: string
|
|
183
|
+
description: API endpoint path that produced the error.
|
|
184
|
+
status:
|
|
185
|
+
type: integer
|
|
186
|
+
description: HTTP status code returned with the error.
|
|
187
|
+
timestamp:
|
|
188
|
+
type: string
|
|
189
|
+
format: date-time
|
|
190
|
+
description: Timestamp when the error occurred (ISO 8601).
|
|
191
|
+
security:
|
|
192
|
+
- ApiKeyAuthHeader: []
|
|
193
|
+
- ApiKeyAuthQuery: []
|