Skip to main content
GET
/
shot
Get a screenshot
curl --request GET \
  --url https://api.example.com/shot
import requests

url = "https://api.example.com/shot"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/shot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/shot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/shot"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/shot")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/shot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
"File"
{
"error": "<string>",
"errorDescription": "<string>"
}
{
"error": "<string>",
"errorDescription": "<string>"
}
{
"error": "<string>",
"errorDescription": "<string>"
}
{
"type": "<string>",
"on": "<string>",
"property": "<string>",
"message": "<string>",
"summary": "<string>",
"found": {},
"errors": [
{
"data": {},
"path": [
"<string>"
],
"code": "<string>",
"missingValueDescription": "<string>",
"meta": {},
"expected": "<string>",
"actual": "<string>",
"problem": "<string>",
"message": "<string>"
}
]
}
{
"error": "<string>",
"errorDescription": "<string>",
"retryAfter": 123
}
{
"error": "<string>",
"errorDescription": "<string>"
}

Query Parameters

key
string
required

Your API key

url
string
required

The URL to take a screenshot of

cacheKey
string

Custom cache key. If not provided, defaults to hash of request method and URL

fresh
boolean
default:false
format
enum<string>
default:png
Available options:
png,
jpeg,
webp
quality
number
default:100
fullPage
boolean
default:false
viewportType
enum<string>
default:desktop
Available options:
mobile,
tablet,
desktop,
custom
width
number
default:1920

Only used when viewportType is custom

height
number
default:1080

Only used when viewportType is custom

deviceScaleFactor
number
default:1

Only used when viewportType is custom

blockAds
boolean
default:false
blockBanners
boolean
default:false
blockTracking
boolean
default:false
waitUntil
enum<string>
default:networkidle2
Available options:
load,
domcontentloaded,
networkidle0,
networkidle2
timeout
number
default:30000
customCookies
string
customHeaders
string
background
string
backgroundPadding
number
backgroundBorderRadius
number
customUserAgent
object

Response

Response for status 200

The response is of type file.