Screenshots from HTML avatar

Screenshots from HTML

Try for free

No credit card required

Go to Store
Screenshots from HTML

Screenshots from HTML

vojtam/screenshots-from-html
Try for free

No credit card required

Actor creates screenshots from a saved HTML structure.

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • No reviews yet

  • 2 bookmarks

  • >99% runs succeeded

  • Created in Oct 2022

  • Modified a year ago

You can access the Screenshots from HTML programmatically from your own applications by using the Apify API. You can also 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": "oaEnkh94jljMgChYs"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/vojtam~screenshots-from-html/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-vojtam-screenshots-from-html",
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/vojtam~screenshots-from-html/runs": {
50      "post": {
51        "operationId": "runs-sync-vojtam-screenshots-from-html",
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/vojtam~screenshots-from-html/run-sync": {
93      "post": {
94        "operationId": "run-sync-vojtam-screenshots-from-html",
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        "properties": {
134          "html": {
135            "title": "HTML Input",
136            "type": "string",
137            "description": "HTML that will be rendered"
138          },
139          "kvStoreId": {
140            "title": "Key-value store ID",
141            "type": "string",
142            "description": "ID of KV store with input data"
143          },
144          "kvStorePrefix": {
145            "title": "Key-value store prefix",
146            "type": "string",
147            "description": "If provided, only key-value pairs with given key prefix will be used"
148          },
149          "datasetId": {
150            "title": "Dataset ID",
151            "type": "string",
152            "description": "ID of dataset with input data"
153          },
154          "datasetHtmlField": {
155            "title": "Dataset HTML field",
156            "type": "string",
157            "description": "Name of field, that contains HTML of a site"
158          },
159          "datasetKeyFields": {
160            "title": "Dataset key fields",
161            "type": "array",
162            "description": "Fields of dataset items, to create an unique key",
163            "items": {
164              "type": "string"
165            }
166          },
167          "datasetSaveToDataset": {
168            "title": "Store to dataset",
169            "type": "boolean",
170            "description": "If true, actor will create new dataset with new field screenshotUrl for each item",
171            "default": true
172          },
173          "imageQuality": {
174            "title": "JPEG quality",
175            "minimum": 1,
176            "maximum": 100,
177            "type": "integer",
178            "description": "Quality of output image. Has to be in range 1-100.",
179            "default": 80
180          },
181          "viewportWidth": {
182            "title": "Viewport width",
183            "minimum": 1,
184            "type": "integer",
185            "description": "Viewport width",
186            "default": 1920
187          },
188          "viewportHeight": {
189            "title": "Viewport height",
190            "minimum": 1,
191            "type": "integer",
192            "description": "Viewport height",
193            "default": 1080
194          }
195        }
196      },
197      "runsResponseSchema": {
198        "type": "object",
199        "properties": {
200          "data": {
201            "type": "object",
202            "properties": {
203              "id": {
204                "type": "string"
205              },
206              "actId": {
207                "type": "string"
208              },
209              "userId": {
210                "type": "string"
211              },
212              "startedAt": {
213                "type": "string",
214                "format": "date-time",
215                "example": "2025-01-08T00:00:00.000Z"
216              },
217              "finishedAt": {
218                "type": "string",
219                "format": "date-time",
220                "example": "2025-01-08T00:00:00.000Z"
221              },
222              "status": {
223                "type": "string",
224                "example": "READY"
225              },
226              "meta": {
227                "type": "object",
228                "properties": {
229                  "origin": {
230                    "type": "string",
231                    "example": "API"
232                  },
233                  "userAgent": {
234                    "type": "string"
235                  }
236                }
237              },
238              "stats": {
239                "type": "object",
240                "properties": {
241                  "inputBodyLen": {
242                    "type": "integer",
243                    "example": 2000
244                  },
245                  "rebootCount": {
246                    "type": "integer",
247                    "example": 0
248                  },
249                  "restartCount": {
250                    "type": "integer",
251                    "example": 0
252                  },
253                  "resurrectCount": {
254                    "type": "integer",
255                    "example": 0
256                  },
257                  "computeUnits": {
258                    "type": "integer",
259                    "example": 0
260                  }
261                }
262              },
263              "options": {
264                "type": "object",
265                "properties": {
266                  "build": {
267                    "type": "string",
268                    "example": "latest"
269                  },
270                  "timeoutSecs": {
271                    "type": "integer",
272                    "example": 300
273                  },
274                  "memoryMbytes": {
275                    "type": "integer",
276                    "example": 1024
277                  },
278                  "diskMbytes": {
279                    "type": "integer",
280                    "example": 2048
281                  }
282                }
283              },
284              "buildId": {
285                "type": "string"
286              },
287              "defaultKeyValueStoreId": {
288                "type": "string"
289              },
290              "defaultDatasetId": {
291                "type": "string"
292              },
293              "defaultRequestQueueId": {
294                "type": "string"
295              },
296              "buildNumber": {
297                "type": "string",
298                "example": "1.0.0"
299              },
300              "containerUrl": {
301                "type": "string"
302              },
303              "usage": {
304                "type": "object",
305                "properties": {
306                  "ACTOR_COMPUTE_UNITS": {
307                    "type": "integer",
308                    "example": 0
309                  },
310                  "DATASET_READS": {
311                    "type": "integer",
312                    "example": 0
313                  },
314                  "DATASET_WRITES": {
315                    "type": "integer",
316                    "example": 0
317                  },
318                  "KEY_VALUE_STORE_READS": {
319                    "type": "integer",
320                    "example": 0
321                  },
322                  "KEY_VALUE_STORE_WRITES": {
323                    "type": "integer",
324                    "example": 1
325                  },
326                  "KEY_VALUE_STORE_LISTS": {
327                    "type": "integer",
328                    "example": 0
329                  },
330                  "REQUEST_QUEUE_READS": {
331                    "type": "integer",
332                    "example": 0
333                  },
334                  "REQUEST_QUEUE_WRITES": {
335                    "type": "integer",
336                    "example": 0
337                  },
338                  "DATA_TRANSFER_INTERNAL_GBYTES": {
339                    "type": "integer",
340                    "example": 0
341                  },
342                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
343                    "type": "integer",
344                    "example": 0
345                  },
346                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
347                    "type": "integer",
348                    "example": 0
349                  },
350                  "PROXY_SERPS": {
351                    "type": "integer",
352                    "example": 0
353                  }
354                }
355              },
356              "usageTotalUsd": {
357                "type": "number",
358                "example": 0.00005
359              },
360              "usageUsd": {
361                "type": "object",
362                "properties": {
363                  "ACTOR_COMPUTE_UNITS": {
364                    "type": "integer",
365                    "example": 0
366                  },
367                  "DATASET_READS": {
368                    "type": "integer",
369                    "example": 0
370                  },
371                  "DATASET_WRITES": {
372                    "type": "integer",
373                    "example": 0
374                  },
375                  "KEY_VALUE_STORE_READS": {
376                    "type": "integer",
377                    "example": 0
378                  },
379                  "KEY_VALUE_STORE_WRITES": {
380                    "type": "number",
381                    "example": 0.00005
382                  },
383                  "KEY_VALUE_STORE_LISTS": {
384                    "type": "integer",
385                    "example": 0
386                  },
387                  "REQUEST_QUEUE_READS": {
388                    "type": "integer",
389                    "example": 0
390                  },
391                  "REQUEST_QUEUE_WRITES": {
392                    "type": "integer",
393                    "example": 0
394                  },
395                  "DATA_TRANSFER_INTERNAL_GBYTES": {
396                    "type": "integer",
397                    "example": 0
398                  },
399                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
400                    "type": "integer",
401                    "example": 0
402                  },
403                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
404                    "type": "integer",
405                    "example": 0
406                  },
407                  "PROXY_SERPS": {
408                    "type": "integer",
409                    "example": 0
410                  }
411                }
412              }
413            }
414          }
415        }
416      }
417    }
418  }
419}

Screenshots from HTML 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 Screenshots from HTML 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: