Skip to main content
POST
/
api
/
capture-screenshot
Take Screenshot
curl --request POST \
  --url https://staging.screenshotbee.com/api/capture-screenshot/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "url": "<string>",
  "viewport_width": 123,
  "viewport_height": 123,
  "device_scale_factor": 1,
  "user_agent": "<string>",
  "pre_defined_device": true,
  "device_name": "Blackberry PlayBook",
  "fullsize_screenshot": true,
  "is_selector": true,
  "selector": "<string>",
  "has_screenshot_wait_time": true,
  "screenshot_wait_time": 123,
  "image_quality": 123,
  "format": "png",
  "has_scroll_options": true,
  "scroll_delay": 123,
  "one_scroll_duration": 123,
  "scroll_by_pixes": 123,
  "one_scroll_duration_wait_time": 123,
  "stop_scrolling_after": 123,
  "scroll_back_after": 123,
  "scroll_immediately": true,
  "scroll_back": true,
  "stop_when_full_scroll_completed": true,
  "scroll_easing": "linear",
  "is_record_video": true,
  "authorization_header": "<string>",
  "headers": {
    "Custom-Header": "<string>"
  },
  "attach_cookies": true,
  "cookies": [
    {
      "name": "<string>",
      "value": "<string>",
      "domain": "<string>"
    }
  ],
  "request_time_zone": "UTC",
  "block_ads": true,
  "solve_captcha": true,
  "hide_cookie_banner": true,
  "block_cookies": true,
  "disable_js": true
}
'
{
  "success": true,
  "result": {
    "success": true,
    "screenshotUrl": "<string>",
    "statusCode": 123,
    "taskDurationSec": 123,
    "pageResourceSizeinKB": 123,
    "videoURL": "<string>"
  }
}

Headers

x-api-key
string
required

This is the API key associated with the company.

Body

application/json
url
string<uri>
required

URL of the website you want to take a screenshot

viewport_width
number | null

Set the width of the browser viewport in pixels.

viewport_height
number | null

Set the height of the browser viewport in pixels.

device_scale_factor
enum<number> | null

Set the device scale factor to simulate different screen densities.

Available options:
1,
2,
3
user_agent
string | null

Set a custom user agent string to mimic a specific browser or device.

pre_defined_device
boolean | null

Use a pre-defined device profile for the request.

device_name
enum<string> | null

Set a custom device name for the request.

Available options:
Blackberry PlayBook,
Blackberry PlayBook landscape,
BlackBerry Z30,
BlackBerry Z30 landscape,
Galaxy Note 3,
Galaxy Note 3 landscape,
Galaxy Note II,
Galaxy Note II landscape,
Galaxy S III,
Galaxy S III landscape,
Galaxy S5,
Galaxy S5 landscape,
Galaxy S8,
Galaxy S8 landscape,
Galaxy S9+,
Galaxy S9+ landscape,
Galaxy Tab S4,
Galaxy Tab S4 landscape,
iPad,
iPad landscape,
iPad (gen 6),
iPad (gen 6) landscape,
iPad (gen 7),
iPad (gen 7) landscape,
iPad Mini,
iPad Mini landscape,
iPad Pro,
iPad Pro landscape,
iPad Pro 11,
iPad Pro 11 landscape,
iPhone 4,
iPhone 4 landscape,
iPhone 5,
iPhone 5 landscape,
iPhone 6,
iPhone 6 landscape,
iPhone 6 Plus,
iPhone 6 Plus landscape,
iPhone 7,
iPhone 7 landscape,
iPhone 7 Plus,
iPhone 7 Plus landscape,
iPhone 8,
iPhone 8 landscape,
iPhone 8 Plus,
iPhone 8 Plus landscape,
iPhone SE,
iPhone SE landscape,
iPhone X,
iPhone X landscape,
iPhone XR,
iPhone XR landscape,
iPhone 11,
iPhone 11 landscape,
iPhone 11 Pro,
iPhone 11 Pro landscape,
iPhone 11 Pro Max,
iPhone 11 Pro Max landscape,
iPhone 12,
iPhone 12 landscape,
iPhone 12 Pro,
iPhone 12 Pro landscape,
iPhone 12 Pro Max,
iPhone 12 Pro Max landscape,
iPhone 12 Mini,
iPhone 12 Mini landscape,
iPhone 13,
iPhone 13 landscape,
iPhone 13 Pro,
iPhone 13 Pro landscape,
iPhone 13 Pro Max,
iPhone 13 Pro Max landscape,
iPhone 13 Mini,
iPhone 13 Mini landscape,
JioPhone 2,
JioPhone 2 landscape,
Kindle Fire HDX,
Kindle Fire HDX landscape,
LG Optimus L70,
LG Optimus L70 landscape,
Microsoft Lumia 550,
Microsoft Lumia 950,
Microsoft Lumia 950 landscape,
Nexus 10,
Nexus 10 landscape,
Nexus 4,
Nexus 4 landscape,
Nexus 5,
Nexus 5 landscape,
Nexus 5X,
Nexus 5X landscape,
Nexus 6,
Nexus 6 landscape,
Nexus 6P,
Nexus 6P landscape,
Nexus 7,
Nexus 7 landscape,
Nokia Lumia 520,
Nokia Lumia 520 landscape,
Nokia N9,
Nokia N9 landscape,
Pixel 2,
Pixel 2 landscape,
Pixel 2 XL,
Pixel 2 XL landscape,
Pixel 3,
Pixel 3 landscape,
Pixel 4,
Pixel 4 landscape,
Pixel 4a (5G),
Pixel 4a (5G) landscape,
Pixel 5,
Pixel 5 landscape,
Moto G4,
Moto G4 landscape
fullsize_screenshot
boolean | null

Capture a full-page screenshot instead of a cropped one.

is_selector
boolean | null

Screenshot of the element.

selector
string | null

Take a screenshot of the element specified by this selector.

has_screenshot_wait_time
boolean | null

Enable waiting time before taking screenshot.

screenshot_wait_time
number | null

Set the wait time before taking screenshot event in seconds.

image_quality
number | null

Set the quality of the screenshot image (1-100).

format
enum<string> | null

Choose the format of the screenshot (e.g., PNG, JPEG, PDF).

Available options:
png,
jpeg,
pdf
has_scroll_options
boolean | null

By enabling we can control scroll options.

scroll_delay
number | null

Set the delay between scroll events in milliseconds..

one_scroll_duration
number | null

Set the duration of a single scroll event in milliseconds.

scroll_by_pixes
number | null

Set the number of pixels to scroll by in each event.

one_scroll_duration_wait_time
number | null

Set the wait time after a scroll event in milliseconds.

stop_scrolling_after
number | null

Set the number of scrolls before stopping.

scroll_back_after
number | null

Set the number of milliseconds to wait before scrolling back.

scroll_immediately
boolean | null

Scroll immediately without waiting for the previous event to complete.

scroll_back
boolean | null

Scroll back to the top of the page after reaching the end.

stop_when_full_scroll_completed
boolean | null

Stop scrolling when the full page is scrolled.

scroll_easing
enum<string> | null

Choose an easing function for the scroll animation (e.g., linear, ease-in, ease-out).

Available options:
linear,
ease,
ease-in,
ease-out,
ease-in-out,
step-start,
step-end,
initial,
inherit
is_record_video
boolean | null

Record the scrolling process as a video before taking a screenshot.

authorization_header
string | null

Set a custom authorization header for the request.

headers
object

Set a custom header with a user-defined value.

attach_cookies
boolean | null

Attach Cookies with Request.

cookies
object[] | null

Set cookies for the request.

request_time_zone
enum<string> | null

Set the time zone for the request.

Available options:
UTC,
GMT,
ECT,
EET,
ART,
EAT,
MET,
NET,
PLT,
IST,
BST,
VST,
CTT,
JST,
ACT,
AET,
SST,
NST,
MIT,
HST,
AST,
PST,
PNT,
MST,
CST,
EST,
IET,
PRT,
CNT,
AGT,
BET,
CAT
block_ads
boolean | null

Block ads from loading during the request.

solve_captcha
boolean | null

Attempt to solve captchas during the request.

Hide the cookie banner during the request.

block_cookies
boolean | null

Block cookies from being set during the request.

disable_js
boolean | null

Disable JavaScript execution during the request.

Response

Screenshot captured successfully

success
boolean

Indicates whether the call was successful. True if successful, false if not.

result
object