Browshot Screenshot Has the Wrong Page Size: Viewport and Full-Page Fixes
Fix Browshot screenshots that capture only the viewport, use the wrong desktop dimensions, or miss content that loads after scrolling.
If a Browshot screenshot has the wrong page size, first identify which size is wrong: the capture extent, the desktop browser viewport, or the amount of page content that was ready when the capture ran. Browshot captures the visible screen by default. Set size=page for a full-page image, and set screen_width and screen_height to choose desktop browser-window dimensions. For incomplete content, try a post-load delay or a scroll script, then use cache=0 to ensure you are looking at a fresh capture.
1. Identify which size is wrong
| What you see | Likely cause | First fix |
|---|---|---|
| Only the initially visible area appears | The request uses the default screen capture extent | Set size=page |
| The screenshot is too narrow, wide, short, or tall | The desktop browser window dimensions are not what you expect | Set screen_width and screen_height; check that the selected instance is desktop |
| The page is full height but sections or images are missing | Content may load after page load or only after scrolling | Try a delay or a scroll script, then compare with a fresh capture |
| The result ignores your latest parameter changes | A prior result may have been reused from cache | Set cache=0 |
These are separate controls: capture extent determines whether Browshot returns the screen or page, viewport dimensions set the desktop browser window, and timing or scrolling can affect what content is present at capture time.
2. Capture the full page
Browshot’s default capture is the screen. Add size=page when you need a full-page image. The command-line guide also shows a screen resolution such as 1024x768; in the full screenshot API, desktop window dimensions are exposed as screen_width and screen_height. Use the API parameter names for those dimensions in API requests.
curl -G "https://api.browshot.com/api/v1/screenshot/create" \
--data-urlencode "url=https://example.com" \
--data-urlencode "size=page" \
--data-urlencode "screen_width=1365" \
--data-urlencode "screen_height=900"
This illustrates the sizing parameters. Browshot API calls also require your account’s authentication parameters and may return a screenshot job or identifier that you retrieve according to the API documentation. Add those account-specific values as documented; do not publish an API key in client-side code.
Choose a desktop viewport
screen_width and screen_height set the browser-window dimensions for desktop browsers. The API reference documents width from 1 to 5,000 pixels and height from 1 to 10,000 pixels. Full-page screenshots can be up to 15,000 pixels high. These limits do not mean every site will render correctly at every dimension: the selected virtual browser instance and the site’s responsive layout also affect the result. Confirm the current limits and parameter behavior in the Browshot API documentation.
If you are using a mobile virtual device, its viewport behavior may differ from desktop dimension settings. Browshot provides desktop and mobile virtual devices and configurable screen resolutions. Select the browser context that matches the page you intend to capture instead of assuming desktop dimensions control a mobile instance.
3. Make content available before capture
A full-page setting changes the capture extent; it does not guarantee that every lazy-loaded image, script-rendered section, or scroll-triggered component is ready. Browshot documents a post-load delay and an example that scrolls down before taking a full-page screenshot.
curl -G "https://api.browshot.com/api/v1/screenshot/create" \
--data-urlencode "url=https://example.com" \
--data-urlencode "size=page" \
--data-urlencode "delay=5" \
--data-urlencode "script=window.scrollTo(0, document.body.scrollHeight)"
Treat the scroll script as a diagnostic technique, not a universal lazy-loading fix. A site may load content in a nested scroll container, require multiple scroll steps, or use a different trigger. Adjust the script to the page’s behavior and allow enough time after scrolling for requests and rendering to finish. Refer to Browshot’s JavaScript-before-screenshot guide for its script parameter syntax. Check the current API documentation for supported delay values rather than relying on a fixed maximum.
4. Request a fresh capture
Browshot can reuse a prior screenshot for the same URL and instance during its cache interval. If you have changed viewport, extent, or page timing and the output appears unchanged, add cache=0 to request a new screenshot.
curl -G "https://api.browshot.com/api/v1/screenshot/create" \
--data-urlencode "url=https://example.com" \
--data-urlencode "size=page" \
--data-urlencode "screen_width=1365" \
--data-urlencode "screen_height=900" \
--data-urlencode "cache=0"
5. Troubleshoot common page-size problems
| Problem | Cause to check | Fix |
|---|---|---|
| Image shows only the top viewport | size is omitted or set to the default screen mode |
Set size=page, then inspect the returned image dimensions |
| Width or height differs from the requested desktop size | The request may use the wrong parameter names, or the selected instance may not be desktop | Use screen_width and screen_height and verify the instance and current API docs |
| Full-page output cuts off near the bottom | The page may exceed the documented full-page height limit, or the site may not expose all content until scrolling | Check the 15,000-pixel full-page limit; try scrolling and delay, and consider capturing sections separately if the page is taller |
| Images or sections are blank | They may be lazy-loaded or rendered asynchronously | Try a post-load delay and a page-appropriate scroll script; confirm the content appears in the virtual browser context |
| Changed settings have no visible effect | A cached result may have been returned | Request with cache=0 |
| Resolution example works in CLI but not API code | The CLI’s screen=1024x768 example and API’s desktop dimension parameters are different surfaces |
For the full screenshot API, use screen_width and screen_height; consult the docs for the exact endpoint in use |
6. A repeatable check
- Capture the URL with
size=pageand inspect the returned image’s pixel dimensions. - If the viewport itself is wrong, specify desktop
screen_widthandscreen_height, and confirm the browser instance. - If content is missing, add a modest post-load delay. If the site loads on scroll, try a scroll script and allow more time afterward.
- Set
cache=0while diagnosing so a prior result does not mask changes. - Once the output is correct, remove diagnostic settings you do not need and retain the smallest delay that reliably captures the target page.
7. Performance, reliability, and cost considerations
A viewport capture generally has less page area to render and return than a full-page capture. Very tall pages can take longer to render and produce larger images; Browshot documents a full-page height limit of up to 15,000 pixels. Added delays and scrolling also extend the time before capture and can still miss content when a page has site-specific loading behavior.
For repeatable results, keep the browser instance, viewport, capture extent, and wait behavior explicit. During debugging, disable cache to verify changes; after that, caching can avoid repeating captures when its reuse behavior suits your workflow. The cited Browshot documentation does not establish a universal timing guarantee or benchmark, so validate the settings against the pages you need to capture. Check Browshot’s features and pricing for current service details and costs.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request returns a PNG, JPEG, WebP, or PDF. Its clean-shot options accept cookie banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. AI agents can use its MCP server tools: take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
See the ScreenshotNeo API documentation for options including full-page capture, viewport and device settings, waits, custom CSS and JavaScript, caching, async jobs, and bulk capture. Sign up free for 1,000 screenshots a month with no card.
FAQ
Does size=page change the browser viewport?
No. It selects the page capture extent. Set desktop viewport dimensions separately with screen_width and screen_height.
Will a delay always load lazy images?
No. A delay gives scripts more time, but some sites load content only after a particular scroll action or interaction.
Why does a full-page screenshot still have a height limit?
Full-page capture has a documented maximum height of 15,000 pixels. For longer content, capture relevant sections or adjust the page being captured.
When should I set cache=0?
Use it while checking whether a new request or setting changed the image, or whenever you need Browshot to make a fresh capture instead of reusing a cached result.


