DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober 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 Scan×
Skip to content
World desk5 min

How to Set a Custom Viewport Width and Height in a Screenshot API

Set explicit viewport width and height in the screenshot API’s documented format, and treat full-page capture and output scaling as separate settings.

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.

Set both dimensions explicitly in the request format your screenshot API documents. For Screenshot API, a POST request places them inside viewport; a GET request uses width and height query parameters. These values describe the browser’s layout viewport, not necessarily the final image’s pixel density or the full page’s height. [Screenshot API documentation]

How do I set a custom viewport width and height in a screenshot API? Use the provider’s exact field names, confirm its units and limits, then separately choose full-page capture or output scaling if needed.

As an Amazon Associate I earn from qualifying purchases.

Set the viewport dimensions explicitly

A viewport is the browser area used to lay out and render a page. Width and height are commonly given in pixels, but request field names and accepted ranges vary by service. Do not assume that one provider’s schema, defaults, or limits apply to another.

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

Screenshot API: POST with a viewport object

Screenshot API documents a JSON POST request with the two dimensions nested under viewport. This example requests a 1280 × 720 viewport and a PNG response:

#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
curl -X POST "https://api.screenshot-api.org/api/v1/screenshot" 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"url":"https://example.com","viewport":{"width":1280,"height":720},"format":"png"}'

Use your own API key in place of YOUR_API_KEY. Screenshot API recommends sending the key in an authorization header; query-string key passing is described as a convenience, not the preferred method. Its documentation also describes deviceScaleFactor and a fullPage option. [Screenshot API documentation]

Screenshot API: GET with width and height parameters

The same service also accepts GET requests using width and height query parameters. Check its reference for the complete GET URL and authentication requirements; the POST object above should not be copied unchanged into a GET request. The service’s GET and POST shapes differ. [Screenshot API documentation]

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

Provider schemas are not interchangeable

Before implementing the request, confirm the method, field names, units, limits, defaults and full-page behavior in that provider’s current reference. These documented examples illustrate why:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Provider Documented dimension fields Relevant distinction
Screenshot API POST: viewport.width and viewport.height; GET: width and height Documents fullPage and deviceScaleFactor. [Documentation]
ScreenshotAPI viewportWidth and viewportHeight Documents defaults of 1280 × 720, a fullPage flag, and output scaling options. [Documentation]
ScreenshotEngine width and height in GET or POST; optional viewportDevice Its GET documentation gives width 100–3840 and height 100–10000, or full. Its presets do not emulate every physical-device behavior. [Documentation]
Cloudflare Browser Rendering A viewport object with width and height Lists device scale and mobile-oriented flags separately from viewport dimensions. [Documentation]

Ranges, defaults and option names above are provider-specific documentation, not universal browser rules. Recheck the relevant reference if a request is rejected or the rendered layout differs from expectations.

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.

Viewport size, full-page capture and pixel density

Viewport dimensions control layout

Setting a width such as 1280 and a height such as 720 tells the service what browser viewport to use for rendering, subject to the provider’s units and validation. Responsive pages can choose different layouts based on that viewport width.

Full-page capture is a separate request

A normal viewport screenshot captures the visible browser area. A full-page option asks the service to capture the scrollable page; it is not implied by setting a particularly large viewport height. Screenshot API and ScreenshotAPI document a fullPage flag, while other services may use another field or a special height value. Consult the service reference rather than treating a tall viewport as a portable substitute. [Screenshot API] [ScreenshotAPI] [ScreenshotEngine]

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

Output scale changes image pixels, not responsive width

Device scale or output scale affects the density of pixels in the resulting image. It is distinct from the CSS viewport dimensions that determine layout. Screenshot API documents deviceScaleFactor; ScreenshotAPI documents a device scale factor and css or device output scale. Choose viewport width for the layout you need, then set output scaling separately if the provider supports it. [Screenshot API] [ScreenshotAPI]

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

Dimensions alone do not emulate a physical device

A custom width and height do not necessarily change user agent, touch input, orientation behavior, or pixel density. ScreenshotEngine explicitly says its viewport presets do not emulate browser, touch input, user agent, or pixel density. Cloudflare exposes mobile, touch, landscape and device-scale settings separately from viewport dimensions. If the page depends on those signals, configure them independently where available. [ScreenshotEngine] [Cloudflare Browser Rendering]

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choosing and checking dimensions

  1. Pick the intended layout width. Use the CSS viewport width that should trigger the target responsive layout; do not substitute output image width or a device-scale value.
  2. Set both dimensions. Send numeric width and height in the exact shape required by the selected method and provider.
  3. Verify limits and units. Check whether values are pixels, what range is accepted, and whether the service applies defaults when a value is omitted.
  4. Choose capture behavior separately. Enable the provider’s full-page setting if the entire scrollable page is required.
  5. Configure emulation and scale if needed. Set mobile, touch, landscape, user-agent, or device-scale controls independently when supported.
  6. Inspect the returned image. Confirm both the responsive layout and the output image dimensions; they answer different questions.

Troubleshooting custom viewport requests

  • The API rejects the request: Check the provider’s schema for nesting and exact case. For Screenshot API POST, dimensions belong under viewport; its GET method instead uses width and height. Also verify accepted ranges and JSON formatting. [Screenshot API documentation]
  • The page uses a different responsive layout than expected: Confirm the actual viewport width sent to the service. Increasing output scale does not increase the layout viewport.
  • The image is only the visible screen: Enable the provider’s full-page option. A viewport height value alone does not request a scrollable-page capture.
  • The output image has more pixels than expected: Check device scale or output scale settings; these can change image density without changing layout width.
  • A mobile preset still behaves like desktop: Check whether the preset changes only viewport dimensions or also configures mobile, touch, browser identity and scale. Preset behavior is provider-specific.
  • The request works on one service but not another: Translate the dimensions into the second service’s documented fields rather than reusing the first service’s parameter names.

Or skip the browser setup

With ScreenshotNeo, request a specific viewport using the API’s documented width and height parameters. For example, this cURL request saves a WebP screenshot of a 1280 × 720 viewport:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -d width=1280 -d height=720 -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets; those steps can be turned off. Bot checks, blank pages and failed loads are not billed, and responses identify the page verdict and billing status. An MCP server lets AI agents use tools to take screenshots, inspect page information and capture PDFs. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up free and try ScreenshotNeo.

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.

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

Leave a Reply

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

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.