
Page Printer
No credit card required

Page Printer
No credit card required
Performs screenshots or print web pages in PDF format.
You can access the Page Printer programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1{
2 "openapi": "3.0.1",
3 "info": {
4 "version": "0.0",
5 "x-build-id": "kpqXnPJ5lZZj0Q8DD"
6 },
7 "servers": [
8 {
9 "url": "https://api.apify.com/v2"
10 }
11 ],
12 "paths": {
13 "/acts/marco.gullo~page-printer/run-sync-get-dataset-items": {
14 "post": {
15 "operationId": "run-sync-get-dataset-items-marco.gullo-page-printer",
16 "x-openai-isConsequential": false,
17 "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18 "tags": [
19 "Run Actor"
20 ],
21 "requestBody": {
22 "required": true,
23 "content": {
24 "application/json": {
25 "schema": {
26 "$ref": "#/components/schemas/inputSchema"
27 }
28 }
29 }
30 },
31 "parameters": [
32 {
33 "name": "token",
34 "in": "query",
35 "required": true,
36 "schema": {
37 "type": "string"
38 },
39 "description": "Enter your Apify token here"
40 }
41 ],
42 "responses": {
43 "200": {
44 "description": "OK"
45 }
46 }
47 }
48 },
49 "/acts/marco.gullo~page-printer/runs": {
50 "post": {
51 "operationId": "runs-sync-marco.gullo-page-printer",
52 "x-openai-isConsequential": false,
53 "summary": "Executes an Actor and returns information about the initiated run in response.",
54 "tags": [
55 "Run Actor"
56 ],
57 "requestBody": {
58 "required": true,
59 "content": {
60 "application/json": {
61 "schema": {
62 "$ref": "#/components/schemas/inputSchema"
63 }
64 }
65 }
66 },
67 "parameters": [
68 {
69 "name": "token",
70 "in": "query",
71 "required": true,
72 "schema": {
73 "type": "string"
74 },
75 "description": "Enter your Apify token here"
76 }
77 ],
78 "responses": {
79 "200": {
80 "description": "OK",
81 "content": {
82 "application/json": {
83 "schema": {
84 "$ref": "#/components/schemas/runsResponseSchema"
85 }
86 }
87 }
88 }
89 }
90 }
91 },
92 "/acts/marco.gullo~page-printer/run-sync": {
93 "post": {
94 "operationId": "run-sync-marco.gullo-page-printer",
95 "x-openai-isConsequential": false,
96 "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97 "tags": [
98 "Run Actor"
99 ],
100 "requestBody": {
101 "required": true,
102 "content": {
103 "application/json": {
104 "schema": {
105 "$ref": "#/components/schemas/inputSchema"
106 }
107 }
108 }
109 },
110 "parameters": [
111 {
112 "name": "token",
113 "in": "query",
114 "required": true,
115 "schema": {
116 "type": "string"
117 },
118 "description": "Enter your Apify token here"
119 }
120 ],
121 "responses": {
122 "200": {
123 "description": "OK"
124 }
125 }
126 }
127 }
128 },
129 "components": {
130 "schemas": {
131 "inputSchema": {
132 "type": "object",
133 "required": [
134 "startUrls",
135 "method"
136 ],
137 "properties": {
138 "startUrls": {
139 "title": "Start URLs",
140 "type": "array",
141 "description": "URLs to start with.",
142 "items": {
143 "type": "object",
144 "required": [
145 "url"
146 ],
147 "properties": {
148 "url": {
149 "type": "string",
150 "title": "URL of a web page",
151 "format": "uri"
152 }
153 }
154 }
155 },
156 "method": {
157 "title": "Method",
158 "enum": [
159 "screenshot",
160 "pdf"
161 ],
162 "type": "string",
163 "description": "Method for generating the page print.",
164 "default": "screenshot"
165 },
166 "waitForLoadState": {
167 "title": "Wait for load state",
168 "enum": [
169 "load",
170 "domcontentloaded",
171 "networkidle"
172 ],
173 "type": "string",
174 "description": "The state to load for before processing the page."
175 },
176 "preFunction": {
177 "title": "Pre-function",
178 "type": "string",
179 "description": "Function to evaluate before printing the page. Can accept Playwright's 'page' object as input."
180 },
181 "alwaysScreenshot": {
182 "title": "Always take a screenshot",
183 "type": "boolean",
184 "description": "Try to take a screenshot even if the pre-function crashed"
185 },
186 "pdfMedia": {
187 "title": "Media",
188 "enum": [
189 "print",
190 "screen"
191 ],
192 "type": "string",
193 "description": "Media for printing PDF. See: https://playwright.dev/docs/api/class-page#page-pdf.",
194 "default": "print"
195 },
196 "maxRequestRetries": {
197 "title": "Max request retries",
198 "type": "integer",
199 "description": "Max number of retries before declaring a screenshot job failed."
200 },
201 "waitForLoadStateTimeout": {
202 "title": "wait For Load State Timeout (milliseconds)",
203 "type": "integer",
204 "description": " timeout for waitForLoadState event, in milliseconds"
205 },
206 "requestHandlerTimeoutSecs": {
207 "title": "request Handler Timeout Secs",
208 "type": "integer",
209 "description": "Timeout in which the requestHandler function needs to finish, in seconds."
210 },
211 "navigationTimeoutSecs": {
212 "title": "Navigation Timeout Secs",
213 "type": "integer",
214 "description": "Timeout in which page navigation needs to finish, in seconds."
215 },
216 "proxyOptions": {
217 "title": "Proxy configuration",
218 "type": "object",
219 "description": "Select proxies to be used by your crawler."
220 }
221 }
222 },
223 "runsResponseSchema": {
224 "type": "object",
225 "properties": {
226 "data": {
227 "type": "object",
228 "properties": {
229 "id": {
230 "type": "string"
231 },
232 "actId": {
233 "type": "string"
234 },
235 "userId": {
236 "type": "string"
237 },
238 "startedAt": {
239 "type": "string",
240 "format": "date-time",
241 "example": "2025-01-08T00:00:00.000Z"
242 },
243 "finishedAt": {
244 "type": "string",
245 "format": "date-time",
246 "example": "2025-01-08T00:00:00.000Z"
247 },
248 "status": {
249 "type": "string",
250 "example": "READY"
251 },
252 "meta": {
253 "type": "object",
254 "properties": {
255 "origin": {
256 "type": "string",
257 "example": "API"
258 },
259 "userAgent": {
260 "type": "string"
261 }
262 }
263 },
264 "stats": {
265 "type": "object",
266 "properties": {
267 "inputBodyLen": {
268 "type": "integer",
269 "example": 2000
270 },
271 "rebootCount": {
272 "type": "integer",
273 "example": 0
274 },
275 "restartCount": {
276 "type": "integer",
277 "example": 0
278 },
279 "resurrectCount": {
280 "type": "integer",
281 "example": 0
282 },
283 "computeUnits": {
284 "type": "integer",
285 "example": 0
286 }
287 }
288 },
289 "options": {
290 "type": "object",
291 "properties": {
292 "build": {
293 "type": "string",
294 "example": "latest"
295 },
296 "timeoutSecs": {
297 "type": "integer",
298 "example": 300
299 },
300 "memoryMbytes": {
301 "type": "integer",
302 "example": 1024
303 },
304 "diskMbytes": {
305 "type": "integer",
306 "example": 2048
307 }
308 }
309 },
310 "buildId": {
311 "type": "string"
312 },
313 "defaultKeyValueStoreId": {
314 "type": "string"
315 },
316 "defaultDatasetId": {
317 "type": "string"
318 },
319 "defaultRequestQueueId": {
320 "type": "string"
321 },
322 "buildNumber": {
323 "type": "string",
324 "example": "1.0.0"
325 },
326 "containerUrl": {
327 "type": "string"
328 },
329 "usage": {
330 "type": "object",
331 "properties": {
332 "ACTOR_COMPUTE_UNITS": {
333 "type": "integer",
334 "example": 0
335 },
336 "DATASET_READS": {
337 "type": "integer",
338 "example": 0
339 },
340 "DATASET_WRITES": {
341 "type": "integer",
342 "example": 0
343 },
344 "KEY_VALUE_STORE_READS": {
345 "type": "integer",
346 "example": 0
347 },
348 "KEY_VALUE_STORE_WRITES": {
349 "type": "integer",
350 "example": 1
351 },
352 "KEY_VALUE_STORE_LISTS": {
353 "type": "integer",
354 "example": 0
355 },
356 "REQUEST_QUEUE_READS": {
357 "type": "integer",
358 "example": 0
359 },
360 "REQUEST_QUEUE_WRITES": {
361 "type": "integer",
362 "example": 0
363 },
364 "DATA_TRANSFER_INTERNAL_GBYTES": {
365 "type": "integer",
366 "example": 0
367 },
368 "DATA_TRANSFER_EXTERNAL_GBYTES": {
369 "type": "integer",
370 "example": 0
371 },
372 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
373 "type": "integer",
374 "example": 0
375 },
376 "PROXY_SERPS": {
377 "type": "integer",
378 "example": 0
379 }
380 }
381 },
382 "usageTotalUsd": {
383 "type": "number",
384 "example": 0.00005
385 },
386 "usageUsd": {
387 "type": "object",
388 "properties": {
389 "ACTOR_COMPUTE_UNITS": {
390 "type": "integer",
391 "example": 0
392 },
393 "DATASET_READS": {
394 "type": "integer",
395 "example": 0
396 },
397 "DATASET_WRITES": {
398 "type": "integer",
399 "example": 0
400 },
401 "KEY_VALUE_STORE_READS": {
402 "type": "integer",
403 "example": 0
404 },
405 "KEY_VALUE_STORE_WRITES": {
406 "type": "number",
407 "example": 0.00005
408 },
409 "KEY_VALUE_STORE_LISTS": {
410 "type": "integer",
411 "example": 0
412 },
413 "REQUEST_QUEUE_READS": {
414 "type": "integer",
415 "example": 0
416 },
417 "REQUEST_QUEUE_WRITES": {
418 "type": "integer",
419 "example": 0
420 },
421 "DATA_TRANSFER_INTERNAL_GBYTES": {
422 "type": "integer",
423 "example": 0
424 },
425 "DATA_TRANSFER_EXTERNAL_GBYTES": {
426 "type": "integer",
427 "example": 0
428 },
429 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
430 "type": "integer",
431 "example": 0
432 },
433 "PROXY_SERPS": {
434 "type": "integer",
435 "example": 0
436 }
437 }
438 }
439 }
440 }
441 }
442 }
443 }
444 }
445}
Page Printer OpenAPI definition
OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Page Printer from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients:
Actor Metrics
9 monthly users
-
2 bookmarks
>99% runs succeeded
Created in Jul 2024
Modified 7 months ago