# /screenshot
Take screenshot of URL, Authentication is required.
# How to use
curl -X POST https://api.browserlify.com/screenshot?token=YOUR_TOKEN \
-H 'Content-Type: application/json' \
--output example.org.png \
-d '{
"url": "https://example.org",
"waitLoad": 5000,
"fullPage": true,
"device": "hidpi",
"quality": 85,
"format": "png"
}'
# Response
The Content-Type
is application/png
, binary stream responsed.
If the asurl=true
, the Content-Type
is application/json
, the original result will be stored in the object storage, and a json including the url address of the result will be returned. You can directly access this url address to get your data. This url is private, please do not share it with others.
The url will expire after 48 hours, please download within this time.
Response example:
{
"size":41513,
"url":"https://brlify-us-1303181364.cos.na-siliconvalley.myqcloud.com/image/example.org.png"
}
# Request Options
Parameters for /screenshot:
Name | Type | Default | Required | Description |
---|---|---|---|---|
url | string | "" | YES | Target url. http/https are supported |
asurl | boolean | false | NO | Store result to s3/cos, got a url |
fullPage | boolean | false | NO | FullPage |
clip | Object | {} | NO | Clip |
fit | string | "" | NO | Fit |
flip | boolean | false | NO | Flip |
flop | boolean | false | NO | Flop |
clip | Object | {} | NO | Capture the screenshot of a given region only.
|
rotate | int | 0 | NO | Rotate |
quality | int | 0 | NO | Compression quality from range [0..100] (jpeg only). |
format | string | png | NO | Image compression format (defaults to png):png , jpeg , webp |
encoding | string | binary | NO | Encoding: binary , base64 |
filename | string | "" | NO | Attachment filename |