Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →To screenshot one DOM element with Splash, select it in a Lua script and return its PNG: local element = splash:select(args.css); return element:png(). The full script below navigates to a URL, waits briefly, checks that the selector matched, and returns the image. If you need explicit control over the crop or padding, use a region screenshot instead.
Capture an element directly with Splash
Splash’s element PNG helper is the shortest route to a screenshot of a selected node. Pass the page URL and a CSS selector to a Lua script sent to the execute endpoint. The script can return the PNG image directly.
function main(splash, args)
assert(splash:go(args.url))
assert(splash:wait(0.5))
local element = splash:select(args.css)
assert(element, "No element matched the CSS selector")
return element:png()
end
The 0.5-second wait is an example, not a universal readiness setting. A page that builds its target later may need a different wait strategy. The important sequence is to navigate, allow the page to render, select the element, check the result, and return its PNG.
Choose a selector that identifies the intended node
The args.css value is an ordinary CSS selector. For example, pass #product-card to select an element with that ID, or .price-summary to select an element with that class. These examples describe CSS selector syntax; use a selector that is unique and stable on the site you are capturing.
#1 Best Overall
- 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
splash:select(args.css) selects the matching element. If there is no match, the assertion stops the script with a clear message rather than attempting to capture a missing target. When several elements match, make the selector more specific so the capture targets the intended one.
Send the script to Splash
For a direct HTTP integration, submit the Lua source using the lua_source request argument together with the target URL and selector at Splash’s execute endpoint. The exact endpoint address and any authentication or network settings depend on how your Splash instance is deployed; use that instance’s configured address rather than assuming a public service URL.
In a Scrapy project using scrapy-splash, the documented integration uses SplashRequest with endpoint='execute' and places the Lua source in args={'lua_source': script}. A request can pass the selector as another script argument:
Rank #2
- 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
LUA_SCRIPT = """
function main(splash, args)
assert(splash:go(args.url))
assert(splash:wait(0.5))
local element = splash:select(args.css)
assert(element, "No element matched the CSS selector")
return element:png()
end
"""
def start_requests(self):
yield SplashRequest(
"https://example.com",
self.parse_screenshot,
endpoint="execute",
args={
"lua_source": LUA_SCRIPT,
"css": "#product-card",
},
)
def parse_screenshot(self, response):
# The response body contains the endpoint result. Handle it according
# to the response mode configured for your scrapy-splash integration.
with open("element.png", "wb") as image_file:
image_file.write(response.body)
"""
Replace the example URL and selector with your target. Check the response mode used by your application before treating response.body as image bytes: scrapy-splash examples also cover JSON results whose base64-encoded image data must be decoded. A script returning a binary PNG directly is a different response shape, so do not base64-decode it automatically.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use a region crop when you need padding or crop control
element:png() is simplest when the element itself defines the desired image. A region screenshot is more flexible when you want to enlarge the bounding box, such as adding space around the target. The following script reads the element’s bounding rectangle in JavaScript, expands it by a configurable padding amount, and passes the result to Splash’s PNG renderer.
function pad(r, amount)
return {r[1] - amount, r[2] - amount,
r[3] + amount, r[4] + amount}
end
function main(splash, args)
local get_bbox = splash:jsfunc([[
function(css) {
var el = document.querySelector(css);
if (!el) return null;
var r = el.getBoundingClientRect();
return [r.left, r.top, r.right, r.bottom];
}
]])
assert(splash:go(args.url))
assert(splash:wait(0.5))
splash:set_viewport_full()
local bbox = get_bbox(args.css)
assert(bbox, "No element matched the CSS selector")
return splash:png{region=pad(bbox, args.pad or 0)}
end
Understand the crop coordinates
The region is ordered {left, top, right, bottom}. Splash documents these coordinates relative to the current scroll position. The JavaScript helper uses getBoundingClientRect() to obtain that rectangle; pad subtracts the padding from the upper-left coordinates and adds it to the lower-right coordinates. With args.pad set to zero or omitted, the region follows the element’s rectangle; provide a positive padding value to expand it.
Rank #3
- 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.
The full-viewport call matters for this approach: Splash warns that content outside the viewport cannot currently be captured by a region, and recommends splash:set_viewport_full() before a region screenshot to avoid viewport cropping. This is a precaution for region rendering, not a requirement to use the element helper.
Choose between element and region capture
| Method | Best fit | Control |
|---|---|---|
element:png() |
A straightforward screenshot of a selected element | Uses the selected element as the capture target |
splash:png{region=...} |
A crop that needs explicit bounds or added padding | You provide the bounding box and can adjust it before rendering |
Make the capture match the page’s state
A successful selector lookup only tells you that the element was present when the script ran. It does not establish that every image, animation, or asynchronous update on the page has finished. The sample’s fixed wait is illustrative; choose a readiness approach appropriate to the page and validate the result in the Splash version you deploy.
For a region capture, the target’s rectangle is measured when the JavaScript helper runs. If the page layout changes after that measurement, the crop may no longer match the final layout. For the same reason, test pages where fonts, images, or client-side code can alter element dimensions after initial navigation.
Rank #4
- 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
Do not turn on whole-page rendering just because you need one element. Splash’s render.png endpoint is intended for PNG rendering, while custom Lua scripts support the selected-element and region workflows. The render_all=1 option extends the viewport to the whole page and requires a non-zero wait parameter; it is distinct from selecting a single node and is unnecessary for the basic element script.
If you change scaling behavior, Splash documents scale_method values of raster and vector. Its documentation describes vector scaling as potentially faster and sharper, but warns that it can cause rendering issues. Treat that as a setting to validate against your target pages, not a guaranteed improvement.
Troubleshoot common failures
- “No element matched the CSS selector.” The selector did not match when the script ran. Check the selector against the rendered page, confirm the target is not inserted later, and adjust the page-readiness wait or strategy if needed.
- The image is blank or the target is incomplete. The capture may have happened before the relevant content appeared. The sample’s short fixed delay is not sufficient for every page; test the target’s actual rendering behavior and choose a suitable wait.
- The region cuts off the target. Check the region order and coordinate calculations, then call
splash:set_viewport_full()before the region screenshot. Splash’s documented region coordinates are relative to the current scroll position, and content outside the viewport cannot currently be captured this way. - The Python or Scrapy result is not a valid PNG. Confirm which response mode your endpoint and scrapy-splash setup use. A binary PNG response should be handled as bytes; a JSON result containing base64 image data needs JSON parsing and decoding instead.
- The capture differs from the browser view. Verify the selector, page state, viewport, and Splash rendering settings on the deployed Splash version. The documented material does not guarantee identical behavior for every page or establish support guarantees for cross-origin iframe targets.
- Vector scaling introduces rendering problems. Switch to or test the raster scale method for the target. Splash’s documentation cautions that vector scaling may cause rendering issues.
Or skip the browser setup
If you need an API call rather than a Splash instance and Lua script, ScreenshotNeo accepts one GET request for a URL and returns an image or PDF. Its clean-shot workflow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallFor a WebP screenshot of a page, the cURL request is:
Best Value
- 【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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Replace YOUR_API_KEY with your access key and change the URL to the page you want to capture. See the ScreenshotNeo API documentation for request options, including element selection and other capture controls. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Create a free ScreenshotNeo account to get 1,000 screenshots a month without a credit card.
Frequently Asked Questions
Can Splash guarantee that a selected element inside a cross-origin iframe will be captured?
The reviewed Splash documentation does not establish a guarantee for cross-origin iframe targets. Test the specific page and Splash version you run rather than assuming the top-level page selector can reach that content.
Recommended Free Tools
Does the example’s 0.5-second wait guarantee that a dynamic page is ready?
No. It is an illustrative fixed delay only. Page readiness depends on the target’s behavior, so validate the capture timing for the pages you automate.
Quick Recap
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.

