How to Set a Custom Viewport Size in the URLbox Chrome Extension
The available Urlbox documentation describes API viewport settings, not a Chrome extension workflow. Here’s what is verified, how to set dimensions with the API, and an alternative for browser-free captures.
Short answer: The available official Urlbox documentation does not explain how to set a custom viewport size in a Chrome extension, or confirm that the extension in the title is a Urlbox product. It documents viewport settings for the Urlbox screenshot API instead. Don’t assume the API URL format works in an extension. If you mean the API, set the viewport with width and height, in pixels.
The official Urlbox quick start shows an API render URL using width=390&height=844. The API documentation gives default viewport dimensions of 1280 × 1024 pixels. These examples describe API behavior only; they are not verified Chrome-extension instructions.
1. Identify which tool you mean
Before changing settings, check the extension’s name, publisher, Chrome Web Store listing, or vendor help page. The research available for this article did not establish that a Chrome extension called “URLbox” is the Urlbox screenshot API, nor did it find extension-specific instructions for custom dimensions.
- Open the extension’s details in Chrome and note its exact name and publisher.
- Follow the listing’s support or documentation link to the vendor’s instructions.
- Look for settings named viewport, browser size, width, or height.
- If the extension provides a URL template, use only the parameters documented for that extension.
If you share the extension listing or its documentation, the steps can be made specific to that extension. Without that identification, there is no verified extension URL or settings path to provide.
2. Set a custom viewport with the Urlbox API
If you meant the Urlbox screenshot API, its documented width and height options set the browser viewport dimensions in pixels. For example, add width=390&height=844 to a render URL for a narrow, tall viewport:
https://api.urlbox.com/v1/api-key/png?url=github.com&width=390&height=844&thumb_width=200
Replace api-key with your Urlbox API key and set url to the page you want to render. The dimensions are an example configuration, not a required device size. The documented default viewport is 1280 pixels wide by 1024 pixels high.
| Parameter | Meaning | Example |
|---|---|---|
width |
Viewport width in pixels | 390 |
height |
Viewport height in pixels | 844 |
thumb_width |
Thumbnail width in the official quick-start example; it is separate from viewport width | 200 |
Width controls the horizontal viewport; height controls the vertical viewport. Choose dimensions that match the layout you want to inspect. The docs do not prescribe one correct size for every use case.
cURL example
curl --get 'https://api.urlbox.com/v1/api-key/png' \
--data-urlencode 'url=https://github.com' \
--data-urlencode 'width=390' \
--data-urlencode 'height=844' \
--data-urlencode 'thumb_width=200' \
--output screenshot.png
Python example
import requests
endpoint = "https://api.urlbox.com/v1/api-key/png"
params = {
"url": "https://github.com",
"width": 390,
"height": 844,
"thumb_width": 200,
}
response = requests.get(endpoint, params=params, timeout=90)
response.raise_for_status()
with open("screenshot.png", "wb") as image:
image.write(response.content)
Replace api-key in the endpoint with your key. The sample uses Python’s requests package; install it in your environment if needed.
Node.js example
const endpoint = new URL("https://api.urlbox.com/v1/api-key/png");
endpoint.search = new URLSearchParams({
url: "https://github.com",
width: "390",
height: "844",
thumb_width: "200",
}).toString();
const response = await fetch(endpoint);
if (!response.ok) {
throw new Error(`Screenshot request failed: ${response.status} ${response.statusText}`);
}
const image = Buffer.from(await response.arrayBuffer());
await import("node:fs/promises").then(({ writeFile }) =>
writeFile("screenshot.png", image)
);
Use a Node.js version with built-in fetch, or provide your own fetch implementation. Replace api-key with your Urlbox API key.
3. Choose and validate dimensions
- Decide the page width and height you need to capture, in pixels.
- Pass both values as
widthandheightto the API render URL. - Keep thumbnail sizing separate: the quick-start URL’s
thumb_widthis not the viewport width. - Render the page and inspect the result. If the layout is wrong, confirm that the requested URL and both dimensions reached the API.
A viewport is the browser’s page area used for rendering. Changing its width can change responsive breakpoints and the page layout. Changing its height changes the visible vertical area. The sources establish these dimensions and defaults, but do not specify extension controls, device emulation behavior, or a universal best size.
4. Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The extension has no width or height setting | The extension may not support custom dimensions, or its controls may be documented elsewhere. | Check the exact extension listing and vendor documentation. Do not assume Urlbox API parameters apply to it. |
| Changing the API URL does not change the viewport | The request may omit a parameter, use a misspelled parameter name, or target a different service. | Inspect the final request URL and verify that it includes width and height as query parameters on the Urlbox API endpoint. |
| The output dimensions seem unexpected | The viewport dimensions and output image dimensions are different concepts; thumbnail options can also affect output. | Check the requested viewport values separately from options such as thumb_width. |
| The API returns an error | The URL, API key, or request may be invalid. | Check the key and target URL, then consult Urlbox’s API documentation for the response and supported options. |
Python reports that requests is missing |
The package is not installed in the active Python environment. | Install requests in that environment or use another HTTP client. |
| Node.js reports a failed HTTP response | The request did not return a successful status. | Read the status code, verify the endpoint and credentials, and inspect the service’s error guidance. |
5. Performance, reliability, and cost considerations
The retrieved Urlbox sources establish the viewport controls and defaults, but do not provide performance benchmarks, reliability figures, or pricing details. Avoid inferring those from the viewport example. For repeatable captures, keep the target URL and requested dimensions explicit, handle unsuccessful HTTP responses, and save or log the parameters used for each render.
Or skip the browser setup
If your goal is to capture a page at a chosen viewport through an API, ScreenshotNeo provides a website screenshot API. Its width and height parameters set a custom viewport. See the ScreenshotNeo API documentation for the complete options and configuration.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
For a custom viewport, add the documented width and height parameters to the request. ScreenshotNeo removes cookie banners, popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Sign up free for 1,000 screenshots a month, with no card required.
FAQ
Does this explain the URLbox Chrome extension’s exact controls?
No. The available sources document Urlbox’s screenshot API, not a Chrome extension workflow. Identify the extension and consult its own documentation before following extension-specific steps.
What viewport size does Urlbox use by default?
The Urlbox render-options documentation lists 1280 × 1024 pixels as the default viewport.
Is 390 × 844 a required mobile viewport?
No. It is an example used in the official quick start for an API render URL. It is not stated as a device requirement or an extension setting.
Can I use the API example in the extension?
There is no evidence in the available sources that the extension accepts the API URL format. Use it only for the Urlbox API unless the extension vendor documents otherwise.
Sources
- Urlbox official quick start — includes the API render URL example with
width=390andheight=844. - Urlbox official render options — documents viewport width and height and the 1280 × 1024 defaults.
- Urlbox documentation — describes the service and its API.


