Skip to content

Commit b66c30b

Browse files
committed
improvements
1 parent 8b9b5e7 commit b66c30b

File tree

1 file changed

+141
-148
lines changed

1 file changed

+141
-148
lines changed

getting-started/using-the-api.md

Lines changed: 141 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ The create image endpoint accepts the following parameters. Accepted as either `
4444

4545
| Name | Type | Description |
4646
|:-------------|:------------------|:------|
47-
| **html**<span class="text-red-200">*</span> | `String` | This is the HTML you want to render. You can send an HTML snippet \(`<div>Your content</div>`\) or an entire webpage. |
47+
| **html** | `String` | This is the HTML you want to render. You can send an HTML snippet \(`<div>Your content</div>`\) or an entire webpage. |
4848
| **css** | `String` | The CSS for your image. When using with `url` it will be injected into the page. |
49-
| **url**<span class="text-red-200">*</span> | `String` | The fully qualified URL to a public webpage. Such as `https://htmlcsstoimage.com`. When passed this will override the html param and will generate a screenshot of the url. |
49+
| **url** | `String` | The fully qualified URL to a public webpage. Such as `https://htmlcsstoimage.com`. When passed this will override the html param and will generate a screenshot of the url. |
5050

51-
{% include hint.md title="Required params" text="For creating an image, either `url` or `html` are required. `css` is optional." %}
51+
{% include hint.md title="Required params" text="† Either `url` OR `html` is required, but not both. `css` is optional." %}
5252

5353
<hr>
5454

@@ -61,7 +61,7 @@ Optional parameters for greater control over your image.
6161
| **google_fonts** | `String` | [Google fonts](/guides/using-google-fonts/) to be loaded. Example: `Roboto`. Multiple fonts can be loaded like this: `Roboto|Open Sans` |
6262
| **selector** | `String` | A [CSS selector](/guides/selector/) for an element on the webpage. We'll crop the image to this specific element. For example: `section#complete-toolkit.container-lg` |
6363
| **ms_delay** | `Integer` | The number of milliseconds the API should delay before generating the image. This is useful when waiting for JavaScript. We recommend starting with `500`. Large values slow down the initial render time. [Learn more](/parameters/ms_delay/). |
64-
| **device_scale** | `Double` | This adjusts the pixel ratio for the screenshot. Minimum: `1`, Maximum: `3`. [Learn more](/parameters/device_scale/). |
64+
| **device_scale** | `Double` | Controls the image resolution by adjusting the pixel ratio. Minimum: `1`, Maximum: `3`. Higher values increase image quality and file size. For example, `2` will double the resolution. [Learn more](/parameters/device_scale/). |
6565
| **render_when_ready** | `Boolean` | Set to true to control when the image is generated. Call `ScreenshotReady()` from JavaScript to generate the image. [Learn more](/parameters/render_when_ready/). |
6666
| **full_screen** | `Boolean` | When set to true, the API will generate an image of the entire height of the page. |
6767
| **viewport_width** | `Integer` | Set the width of Chrome's viewport. This will disable automatic cropping. Both height and width parameters must be set if using either. |
@@ -178,154 +178,147 @@ STATUS: 200 OK
178178
{
179179
"data": {
180180
"hour": {
181-
"2021-11-14T14:00:00Z": 54,
182-
"2021-11-14T15:00:00Z": 56,
183-
"2021-11-14T16:00:00Z": 56,
184-
"2021-11-14T17:00:00Z": 57,
185-
"2021-11-14T18:00:00Z": 59,
186-
"2021-11-14T19:00:00Z": 55,
187-
"2021-11-14T20:00:00Z": 58,
188-
"2021-11-14T21:00:00Z": 54,
189-
"2021-11-14T22:00:00Z": 57,
190-
"2021-11-14T23:00:00Z": 57,
191-
"2021-11-15T00:00:00Z": 60,
192-
"2021-11-15T01:00:00Z": 56,
193-
"2021-11-15T02:00:00Z": 56,
194-
"2021-11-15T03:00:00Z": 55,
195-
"2021-11-15T04:00:00Z": 57,
196-
"2021-11-15T05:00:00Z": 55,
197-
"2021-11-15T06:00:00Z": 55,
198-
"2021-11-15T07:00:00Z": 56,
199-
"2021-11-15T08:00:00Z": 55,
200-
"2021-11-15T09:00:00Z": 60,
201-
"2021-11-15T10:00:00Z": 62,
202-
"2021-11-15T11:00:00Z": 60,
203-
"2021-11-15T12:00:00Z": 62,
204-
"2021-11-15T13:00:00Z": 62,
205-
"2021-11-15T14:00:00Z": 62,
206-
"2021-11-15T15:00:00Z": 61,
207-
"2021-11-15T16:00:00Z": 61,
208-
"2021-11-15T17:00:00Z": 60,
209-
"2021-11-15T18:00:00Z": 61,
210-
"2021-11-15T19:00:00Z": 64,
211-
"2021-11-15T20:00:00Z": 61,
212-
"2021-11-15T21:00:00Z": 61,
213-
"2021-11-15T22:00:00Z": 62,
214-
"2021-11-15T23:00:00Z": 63,
215-
"2021-11-16T00:00:00Z": 62,
216-
"2021-11-16T01:00:00Z": 62,
217-
"2021-11-16T02:00:00Z": 60,
218-
"2021-11-16T03:00:00Z": 60,
219-
"2021-11-16T04:00:00Z": 62,
220-
"2021-11-16T05:00:00Z": 53,
221-
"2021-11-16T06:00:00Z": 60,
222-
"2021-11-16T07:00:00Z": 60,
223-
"2021-11-16T08:00:00Z": 60,
224-
"2021-11-16T09:00:00Z": 60,
225-
"2021-11-16T10:00:00Z": 60,
226-
"2021-11-16T11:00:00Z": 60,
227-
"2021-11-16T12:00:00Z": 68,
228-
"2021-11-16T13:00:00Z": 62,
229-
"2021-11-16T14:00:00Z": 61,
230-
"2021-11-16T15:00:00Z": 60,
231-
"2021-11-16T16:00:00Z": 60,
232-
"2021-11-16T17:00:00Z": 65,
233-
"2021-11-16T18:00:00Z": 63,
234-
"2021-11-16T19:00:00Z": 60,
235-
"2021-11-16T20:00:00Z": 60,
236-
"2021-11-16T21:00:00Z": 60,
237-
"2021-11-16T22:00:00Z": 62,
238-
"2021-11-16T23:00:00Z": 61,
239-
"2021-11-17T00:00:00Z": 60,
240-
"2021-11-17T01:00:00Z": 60,
241-
"2021-11-17T02:00:00Z": 65,
242-
"2021-11-17T03:00:00Z": 63,
243-
"2021-11-17T04:00:00Z": 62,
244-
"2021-11-17T05:00:00Z": 63,
245-
"2021-11-17T06:00:00Z": 63,
246-
"2021-11-17T07:00:00Z": 64,
247-
"2021-11-17T08:00:00Z": 63,
248-
"2021-11-17T09:00:00Z": 64,
249-
"2021-11-17T10:00:00Z": 60,
250-
"2021-11-17T11:00:00Z": 61,
251-
"2021-11-17T12:00:00Z": 61,
252-
"2021-11-17T13:00:00Z": 29
181+
"2024-03-14T14:00:00Z": 54,
182+
"2024-03-14T15:00:00Z": 56,
183+
"2024-03-14T16:00:00Z": 56,
184+
"2024-03-14T17:00:00Z": 57,
185+
"2024-03-14T18:00:00Z": 59,
186+
"2024-03-14T19:00:00Z": 55,
187+
"2024-03-14T20:00:00Z": 58,
188+
"2024-03-14T21:00:00Z": 54,
189+
"2024-03-14T22:00:00Z": 57,
190+
"2024-03-14T23:00:00Z": 57,
191+
"2024-03-15T00:00:00Z": 60,
192+
"2024-03-15T01:00:00Z": 56,
193+
"2024-03-15T02:00:00Z": 56,
194+
"2024-03-15T03:00:00Z": 55,
195+
"2024-03-15T04:00:00Z": 57,
196+
"2024-03-15T05:00:00Z": 55,
197+
"2024-03-15T06:00:00Z": 55,
198+
"2024-03-15T07:00:00Z": 56,
199+
"2024-03-15T08:00:00Z": 55,
200+
"2024-03-15T09:00:00Z": 60,
201+
"2024-03-15T10:00:00Z": 62,
202+
"2024-03-15T11:00:00Z": 60,
203+
"2024-03-15T12:00:00Z": 62,
204+
"2024-03-15T13:00:00Z": 62,
205+
"2024-03-15T14:00:00Z": 62,
206+
"2024-03-15T15:00:00Z": 61,
207+
"2024-03-15T16:00:00Z": 61,
208+
"2024-03-15T17:00:00Z": 60,
209+
"2024-03-15T18:00:00Z": 61,
210+
"2024-03-15T19:00:00Z": 64,
211+
"2024-03-15T20:00:00Z": 61,
212+
"2024-03-15T21:00:00Z": 61,
213+
"2024-03-15T22:00:00Z": 62,
214+
"2024-03-15T23:00:00Z": 63,
215+
"2024-03-16T00:00:00Z": 62,
216+
"2024-03-16T01:00:00Z": 62,
217+
"2024-03-16T02:00:00Z": 60,
218+
"2024-03-16T03:00:00Z": 60,
219+
"2024-03-16T04:00:00Z": 62,
220+
"2024-03-16T05:00:00Z": 53,
221+
"2024-03-16T06:00:00Z": 60,
222+
"2024-03-16T07:00:00Z": 60,
223+
"2024-03-16T08:00:00Z": 60,
224+
"2024-03-16T09:00:00Z": 60,
225+
"2024-03-16T10:00:00Z": 60,
226+
"2024-03-16T11:00:00Z": 60,
227+
"2024-03-16T12:00:00Z": 68,
228+
"2024-03-16T13:00:00Z": 62,
229+
"2024-03-16T14:00:00Z": 61,
230+
"2024-03-16T15:00:00Z": 60,
231+
"2024-03-16T16:00:00Z": 60,
232+
"2024-03-16T17:00:00Z": 65,
233+
"2024-03-16T18:00:00Z": 63,
234+
"2024-03-16T19:00:00Z": 60,
235+
"2024-03-16T20:00:00Z": 60,
236+
"2024-03-16T21:00:00Z": 60,
237+
"2024-03-16T22:00:00Z": 62,
238+
"2024-03-16T23:00:00Z": 61,
239+
"2024-03-17T00:00:00Z": 60,
240+
"2024-03-17T01:00:00Z": 60,
241+
"2024-03-17T02:00:00Z": 65,
242+
"2024-03-17T03:00:00Z": 63,
243+
"2024-03-17T04:00:00Z": 62,
244+
"2024-03-17T05:00:00Z": 63,
245+
"2024-03-17T06:00:00Z": 63,
246+
"2024-03-17T07:00:00Z": 64,
247+
"2024-03-17T08:00:00Z": 63,
248+
"2024-03-17T09:00:00Z": 64,
249+
"2024-03-17T10:00:00Z": 60,
250+
"2024-03-17T11:00:00Z": 61,
251+
"2024-03-17T12:00:00Z": 61,
252+
"2024-03-17T13:00:00Z": 29
253253
},
254254
"day": {
255-
"2021-09-19T00:00:00Z": 1569,
256-
"2021-09-20T00:00:00Z": 1722,
257-
"2021-09-21T00:00:00Z": 1604,
258-
"2021-09-22T00:00:00Z": 1560,
259-
"2021-09-23T00:00:00Z": 1571,
260-
"2021-09-24T00:00:00Z": 1627,
261-
"2021-09-25T00:00:00Z": 1660,
262-
"2021-09-26T00:00:00Z": 1527,
263-
"2021-09-27T00:00:00Z": 1588,
264-
"2021-09-28T00:00:00Z": 1549,
265-
"2021-09-29T00:00:00Z": 1523,
266-
"2021-09-30T00:00:00Z": 1662,
267-
"2021-10-01T00:00:00Z": 1556,
268-
"2021-10-02T00:00:00Z": 1585,
269-
"2021-10-03T00:00:00Z": 1539,
270-
"2021-10-04T00:00:00Z": 1556,
271-
"2021-10-05T00:00:00Z": 1487,
272-
"2021-10-06T00:00:00Z": 1580,
273-
"2021-10-07T00:00:00Z": 1498,
274-
"2021-10-08T00:00:00Z": 1485,
275-
"2021-10-09T00:00:00Z": 1474,
276-
"2021-10-10T00:00:00Z": 1487,
277-
"2021-10-11T00:00:00Z": 1513,
278-
"2021-10-12T00:00:00Z": 1477,
279-
"2021-10-13T00:00:00Z": 1464,
280-
"2021-10-14T00:00:00Z": 1458,
281-
"2021-10-15T00:00:00Z": 1452,
282-
"2021-10-16T00:00:00Z": 1477,
283-
"2021-10-17T00:00:00Z": 1471,
284-
"2021-10-18T00:00:00Z": 1482,
285-
"2021-10-19T00:00:00Z": 1499,
286-
"2021-10-20T00:00:00Z": 1504,
287-
"2021-10-21T00:00:00Z": 1530,
288-
"2021-10-22T00:00:00Z": 1502,
289-
"2021-10-23T00:00:00Z": 1501,
290-
"2021-10-24T00:00:00Z": 1486,
291-
"2021-10-25T00:00:00Z": 1475,
292-
"2021-10-26T00:00:00Z": 1469,
293-
"2021-10-27T00:00:00Z": 1460,
294-
"2021-10-28T00:00:00Z": 1451,
295-
"2021-10-29T00:00:00Z": 1443,
296-
"2021-10-30T00:00:00Z": 1447,
297-
"2021-10-31T00:00:00Z": 1443,
298-
"2021-11-01T00:00:00Z": 1455,
299-
"2021-11-02T00:00:00Z": 1473,
300-
"2021-11-03T00:00:00Z": 1482,
301-
"2021-11-04T00:00:00Z": 1463,
302-
"2021-11-05T00:00:00Z": 1472,
303-
"2021-11-06T00:00:00Z": 1452,
304-
"2021-11-07T00:00:00Z": 1469,
305-
"2021-11-08T00:00:00Z": 1478,
306-
"2021-11-09T00:00:00Z": 1494,
307-
"2021-11-10T00:00:00Z": 1469,
308-
"2021-11-11T00:00:00Z": 1471,
309-
"2021-11-12T00:00:00Z": 1465,
310-
"2021-11-13T00:00:00Z": 1462,
311-
"2021-11-14T00:00:00Z": 1336,
312-
"2021-11-15T00:00:00Z": 1427,
313-
"2021-11-16T00:00:00Z": 1461,
314-
"2021-11-17T00:00:00Z": 838
255+
"2024-01-19T00:00:00Z": 1569,
256+
"2024-01-20T00:00:00Z": 1722,
257+
"2024-01-21T00:00:00Z": 1604,
258+
"2024-01-22T00:00:00Z": 1560,
259+
"2024-01-23T00:00:00Z": 1571,
260+
"2024-01-24T00:00:00Z": 1627,
261+
"2024-01-25T00:00:00Z": 1660,
262+
"2024-01-26T00:00:00Z": 1527,
263+
"2024-01-27T00:00:00Z": 1588,
264+
"2024-01-28T00:00:00Z": 1549,
265+
"2024-01-29T00:00:00Z": 1523,
266+
"2024-01-30T00:00:00Z": 1662,
267+
"2024-01-31T00:00:00Z": 1556,
268+
"2024-02-01T00:00:00Z": 1585,
269+
"2024-02-02T00:00:00Z": 1539,
270+
"2024-02-03T00:00:00Z": 1556,
271+
"2024-02-04T00:00:00Z": 1487,
272+
"2024-02-05T00:00:00Z": 1580,
273+
"2024-02-06T00:00:00Z": 1498,
274+
"2024-02-07T00:00:00Z": 1485,
275+
"2024-02-08T00:00:00Z": 1474,
276+
"2024-02-09T00:00:00Z": 1487,
277+
"2024-02-10T00:00:00Z": 1513,
278+
"2024-02-11T00:00:00Z": 1477,
279+
"2024-02-12T00:00:00Z": 1464,
280+
"2024-02-13T00:00:00Z": 1458,
281+
"2024-02-14T00:00:00Z": 1452,
282+
"2024-02-15T00:00:00Z": 1477,
283+
"2024-02-16T00:00:00Z": 1471,
284+
"2024-02-17T00:00:00Z": 1482,
285+
"2024-02-18T00:00:00Z": 1499,
286+
"2024-02-19T00:00:00Z": 1504,
287+
"2024-02-20T00:00:00Z": 1530,
288+
"2024-02-21T00:00:00Z": 1502,
289+
"2024-02-22T00:00:00Z": 1501,
290+
"2024-02-23T00:00:00Z": 1486,
291+
"2024-02-24T00:00:00Z": 1475,
292+
"2024-02-25T00:00:00Z": 1469,
293+
"2024-02-26T00:00:00Z": 1460,
294+
"2024-02-27T00:00:00Z": 1451,
295+
"2024-02-28T00:00:00Z": 1443,
296+
"2024-02-29T00:00:00Z": 1447,
297+
"2024-03-01T00:00:00Z": 1443,
298+
"2024-03-02T00:00:00Z": 1455,
299+
"2024-03-03T00:00:00Z": 1473,
300+
"2024-03-04T00:00:00Z": 1482,
301+
"2024-03-05T00:00:00Z": 1463,
302+
"2024-03-06T00:00:00Z": 1472,
303+
"2024-03-07T00:00:00Z": 1452,
304+
"2024-03-08T00:00:00Z": 1469,
305+
"2024-03-09T00:00:00Z": 1478,
306+
"2024-03-10T00:00:00Z": 1494,
307+
"2024-03-11T00:00:00Z": 1469,
308+
"2024-03-12T00:00:00Z": 1471,
309+
"2024-03-13T00:00:00Z": 1465,
310+
"2024-03-14T00:00:00Z": 1462,
311+
"2024-03-15T00:00:00Z": 1336,
312+
"2024-03-16T00:00:00Z": 1427,
313+
"2024-03-17T00:00:00Z": 838
315314
},
316315
"month": {
317-
"2020-12-01T00:00:00Z": 44847,
318-
"2021-01-01T00:00:00Z": 44973,
319-
"2021-02-01T00:00:00Z": 43263,
320-
"2021-03-01T00:00:00Z": 59095,
321-
"2021-04-01T00:00:00Z": 56422,
322-
"2021-05-01T00:00:00Z": 50747,
323-
"2021-06-01T00:00:00Z": 46309,
324-
"2021-07-01T00:00:00Z": 46777,
325-
"2021-08-01T00:00:00Z": 48160,
326-
"2021-09-01T00:00:00Z": 47341,
327-
"2021-10-01T00:00:00Z": 46251,
328-
"2021-11-01T00:00:00Z": 24167
316+
"2023-10-01T00:00:00Z": 44847,
317+
"2023-11-01T00:00:00Z": 44973,
318+
"2023-12-01T00:00:00Z": 43263,
319+
"2024-01-01T00:00:00Z": 59095,
320+
"2024-02-01T00:00:00Z": 56422,
321+
"2024-03-01T00:00:00Z": 50747
329322
}
330323
},
331324
"per_billing_period": [

0 commit comments

Comments
 (0)