Get a capture job
curl --request GET \
--url https://api.screenshotapi.tech/v1/jobs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.screenshotapi.tech/v1/jobs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.screenshotapi.tech/v1/jobs/{id}', 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.screenshotapi.tech/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.screenshotapi.tech/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.screenshotapi.tech/v1/jobs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.screenshotapi.tech/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"data": {
"id": "<string>",
"state": "waiting",
"mode": "sync",
"request_id": "<string>",
"progress": 123,
"attempts_made": 123,
"attempt_budget": 123,
"enqueued_at": 123,
"webhook": {
"url": "<string>",
"event": "<string>"
},
"result": {
"request_id": "<string>",
"mode": "sync",
"ok": true,
"duration_ms": 123,
"attempts_made": 123,
"enqueued_at": 123,
"completed_at": 123,
"data": {
"url": "<string>",
"final_url": "<string>",
"format": "<string>",
"width": 123,
"height": 123,
"bytes": 123,
"duration_ms": 123,
"cached": false,
"blocked_requests": 0,
"data_url": "<string>",
"cdn_url": "<string>",
"region": "<string>",
"egress_country": "<string>",
"render_diagnostics": {
"version": 123,
"algorithm": "by_sections",
"sections": 1,
"device_scale_factor": 123,
"scroll_height": 1,
"stopped_reason": "<string>",
"truncated": true
},
"inspection": {
"markdown": "<string>",
"accessible_tree": "<string>",
"untrusted_content": true,
"character_limit": 12000
}
},
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
},
"worker_id": "<string>"
}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}Jobs
Get a capture job
Requires jobs:read and the submitting API key. Inspect data.state and data.result.ok; an outer ok=true means the lookup succeeded. An unknown state can be temporary during recovery.
GET
/
v1
/
jobs
/
{id}
Get a capture job
curl --request GET \
--url https://api.screenshotapi.tech/v1/jobs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.screenshotapi.tech/v1/jobs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.screenshotapi.tech/v1/jobs/{id}', 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.screenshotapi.tech/v1/jobs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.screenshotapi.tech/v1/jobs/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.screenshotapi.tech/v1/jobs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.screenshotapi.tech/v1/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"data": {
"id": "<string>",
"state": "waiting",
"mode": "sync",
"request_id": "<string>",
"progress": 123,
"attempts_made": 123,
"attempt_budget": 123,
"enqueued_at": 123,
"webhook": {
"url": "<string>",
"event": "<string>"
},
"result": {
"request_id": "<string>",
"mode": "sync",
"ok": true,
"duration_ms": 123,
"attempts_made": 123,
"enqueued_at": 123,
"completed_at": 123,
"data": {
"url": "<string>",
"final_url": "<string>",
"format": "<string>",
"width": 123,
"height": 123,
"bytes": 123,
"duration_ms": 123,
"cached": false,
"blocked_requests": 0,
"data_url": "<string>",
"cdn_url": "<string>",
"region": "<string>",
"egress_country": "<string>",
"render_diagnostics": {
"version": 123,
"algorithm": "by_sections",
"sections": 1,
"device_scale_factor": 123,
"scroll_height": 1,
"stopped_reason": "<string>",
"truncated": true
},
"inspection": {
"markdown": "<string>",
"accessible_tree": "<string>",
"untrusted_content": true,
"character_limit": 12000
}
},
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
},
"worker_id": "<string>"
}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retriable": true,
"request_id": "<string>",
"docs_url": "<string>",
"details": {}
}
}Authorizations
Active sf_live_ API key with endpoint-specific scopes. Keep this credential server-side.
Path Parameters
Job ID returned by submission. Use the original submitting API key.