introduce

Web screenshot masters use the real Chrome browser to capture screen shots with perfect pixels. Our core services are hosted on Ali Cloud and Tencent Cloud, and our API is naturally distributed and highly available.

start

You can use GET or POST to make a screen shot request to the entry below.

https://www.screenshotmaster.com/api/v1/screenshot
Copy the code

example

If you want to get the picture of Baidu home page, you can add baidu.com to the URL parameter to initiate a request.

https://www.screenshotmaster.com/api/v1/screenshot?url=baidu.com
Copy the code

certification

Add the token parameter to your API request for authentication.

https://www.screenshotmaster.com/api/v1/screenshot? url=baidu.com & token=YOUR_API_TOKENCopy the code

parameter

Here are all the parameters you can add to the request.

It is important to note in the initiationGETYou must urL-encode all parameters when requesting

parameter type The default value describe
token string ‘ ‘ Your API token
url string ‘ ‘ The URL for the screenshot
width int 1280 The browser width is in pixels
height int 800 The browser height is in pixels
full_page integer 0 If you upload 1, a long screenshot of the page will be taken
browser_border integer 0 If you pass 1, the image will be rendered using the built-in browser border
color string E9D460 Background colors can be specified for image rendering using built-in browser borders
fresh integer 0 If you pass 1, the screenshot will be retaken (instead of using the cached screenshot)
output string ‘image’ You can choose to usejsonAs an output format, or as an optionimageThe native image format is output
delay int 500 How many milliseconds to wait before taking a screenshot.
device string ‘pc’ Device In use PC: desktop device Mobile: mobile device Table: tablet device
cookies string ‘ ‘ Cookie to set in the browser. If multiple cookies are sent, use;To divide them. Example:cookie1=myValue; cookie2=myOtherValue
zone string ‘ ‘ The area is a domestic line by default. You are advised to take screenshots of domestic websites. If you want to take screenshots of international sites, you can pass them inhkIt works even better

error

If the HTTP status code of the request returns 4xx or 5xx, the returned data will have a MSG field indicating the cause of the error. The following is an example of what is returned when the wrong token is used.

{"code": 422, "data": [], "MSG ": "token incorrect"}Copy the code

The resources

1. Screenshot master API document