October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Set Viewport Size and Device Scale Factor in Browserless Screenshots

Configure Browserless screenshot viewport size and device scale factor through REST, BAP, or BrowserQL, and understand how capture options differ from layout settings.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set width and height on the viewport configuration for the Browserless interface you are using, then set deviceScaleFactor there if you need a scale other than the default. Viewport dimensions determine the CSS-pixel area used for responsive layout; device scale factor sets the browser’s device-scaling context. They are not the same as a guaranteed final screenshot pixel size.

Choose the Browserless interface first

Browserless provides several ways to capture screenshots. The setting names may look similar, but the request or call shape differs by interface. Use the endpoint-specific documentation for the deployment you use rather than copying capture options between REST, BAP, and BrowserQL.

As an Amazon Associate I earn from qualifying purchases.

Interface How to set the viewport How capture is requested
REST Screenshot API Include a viewport object in the POST request. Include screenshot settings in options.
Browserless BAP Call page.setViewport() in the browser session. Call page.screenshot() with capture options.
BrowserQL Run the viewport mutation with the required dimensions. Run the separate screenshot mutation.

Set the viewport with the REST Screenshot API

Send a POST request to /screenshot with the target URL, a viewport object, and screenshot options. This example requests a 1280-by-720 CSS-pixel viewport and a device scale factor of 2, then asks for PNG output:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "url": "https://example.com/",
  "viewport": {
    "width": 1280,
    "height": 720,
    "deviceScaleFactor": 2
  },
  "options": {
    "type": "png"
  }
}

Use the exact request method, authentication, and supported fields documented for your Browserless deployment. The REST reference also describes formats including PNG, JPEG, and WebP, along with options such as full-page capture, clipping, and selectors. See the Browserless Screenshot API documentation.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Set the viewport in Browserless BAP

In BAP, set the viewport through the page before navigating when the page’s responsive layout must be evaluated at that size. Then navigate and capture:

await page.setViewport({
  width: 1280,
  height: 720,
  deviceScaleFactor: 2,
});
await page.goto("https://example.com/");
const image = await page.screenshot({ type: "png" });

The BAP TypeScript reference documents deviceScaleFactor with a default of 1. Specify it explicitly when you need a different scale. Browserless’s guide demonstrates setting the viewport before navigation and capture for responsive pages. See the BAP screenshots and PDFs guide and ViewportOptions reference.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Set the viewport in BrowserQL

BrowserQL uses a viewport mutation; width and height are required, and deviceScaleFactor defaults to 1:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mutation SetViewport {
  viewport(width: 1280, height: 720, deviceScaleFactor: 2) {
    width
    height
    deviceScaleFactor
  }
}

The mutation also exposes mobile (default false), hasTouch (default false), and landscape (default false). Changing width and height alone does not enable mobile emulation; choose those flags when the page behavior you need depends on them. Capture is a separate operation. Consult the viewport mutation reference and screenshot mutation reference.

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Understand viewport dimensions, scale factor, and screenshot pixels

Viewport width and height define the page’s CSS-pixel viewing area and influence responsive breakpoints and layout. The device scale factor configures the device scaling context, associated in Browserless’s Chromium content schema with devicePixelRatio. It does not directly specify a CSS layout width or height.

Do not assume that multiplying viewport width and height by the scale factor always predicts the final image dimensions. The reviewed Browserless references do not establish one output-pixel formula that applies across every endpoint, browser mode, and screenshot configuration. If an exact raster size is required, verify the result for the specific interface and options you run.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Keep capture options separate from the viewport

Viewport settings shape how the page lays out; screenshot settings determine what area is captured and how it is encoded. Depending on the Browserless surface, capture options include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • fullPage to capture beyond the initial viewport.
  • selector or clip to capture a specific element or region.
  • type to choose an image format, and quality for supported lossy formats. Quality does not apply to PNG.
  • omitBackground or waitForImages where available.

BrowserQL documents captureBeyondViewport as defaulting to false when there is no clip and true otherwise. Do not assume these option names or defaults are identical across REST, BAP, and BrowserQL; check the corresponding reference.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.

Lazy-loaded and image-heavy pages

For image-heavy pages, use the applicable wait-for-images setting if available. For long pages captured with the REST Screenshot API, its guide describes scrollPage: true to scroll before capture and trigger lazy loading; use it with fullPage: true when you need a complete page screenshot.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot unexpected screenshots

  • The page has the wrong responsive layout: Confirm that the viewport width is set on the interface you are actually calling. In BAP, set it before navigation and capture so the page renders at the intended width.
  • The screenshot’s dimensions differ from your expectation: Viewport dimensions are CSS pixels, not a universal promise of output raster dimensions. Inspect the actual image from your endpoint and configuration, and consult that endpoint’s documentation.
  • The page looks like a desktop site despite a narrow viewport: A narrow width alone is not equivalent to mobile emulation. In BrowserQL, consider whether mobile, hasTouch, or landscape should be enabled.
  • Images or lower-page content are missing: Use the available image-waiting option; for REST full-page captures with lazy content, consider scrollPage: true.
  • The screenshot differs from the site as seen in a normal browser: Automation may be blocked or treated differently by the target. Browserless notes this possibility in its troubleshooting guidance; check the target’s response and the relevant Browserless guidance rather than assuming viewport settings are the cause.
  • A copied option is rejected or ignored: Verify that the option belongs to the selected surface. REST request fields, BAP page methods, and BrowserQL mutations are not interchangeable merely because they control similar behavior.

Or skip the browser setup

ScreenshotNeo can return an image or PDF from one GET request. Its API supports viewport and device presets as well as 63 capture options; consult the ScreenshotNeo API documentation for parameters and formats.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o shot.webp

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server gives AI agents screenshot tools. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.