Api Documentation.
Generate and display a screenshot of any web page with a single, secure and hosted URL. It takes only one line of code and can be done on the fly! 🤘
https://i.pagescreen.io/v1/1/2/?url=3
1 Public Key
A personal unique identifier assigned when activating the Image API.
2 Token
A security token to identify your account. It is the md5 hash of the entire query string and your Secret Key.
3 Query String
The URL to capture, and additional options.
Get Started: go to your account's integration to grab your keys, and play with our code samples.
Make your screenshot look exactly the way you want.
Parameter | Description | Default value |
---|---|---|
Url | The URL you want to capture / display example: https://pagescreen.io | - |
Viewport | Size of the viewport in pixels example: 1440x960 | 1280x768 |
Fullpage | Capture the full page in height possible values: 1, 0, true, false | FALSE |
Delay | Wait for a specific delay before capturing (seconds). maximum 60 seconds | 0 |
Format | Image format of the capture PNG or JPEG | PNG |
Tip: an extra parameter "size" will allow you to resize the image on the fly, at the display. Example: &size=500
<?php
function pagescreen_v1($url, $options = []) {
# Pagescreen.io Public and Secret Keys
$PUBLIC_KEY = "pk_screenshot_abc123";
$SECRET_KEY = "sk_screenshot_zyx987";
# Build Query String
$query_string = http_build_query(array_merge(["url" => $url], $options));
# Generate unique token
$TOKEN = md5($SECRET_KEY.$query_string);
return "https://i.pagescreen.io/v1/$PUBLIC_KEY/$TOKEN/?$query_string";
}
echo '<img src="'.pagescreen_v1("https://pagescreen.io/",["viewport"=>"1280x768", "size"=>"500"]).'">';
?>
Looking at deeper integration? Check out the Screenshot REST API.
Trusted by 4000+ Industry Leaders
Forward-thinking companies, from growing businesses to large enterprises use Pagescreen to power their business intelligence.
Try us now for Free
Play with Pagescreen for 14 days, access to all features.