Set the custom User-Agent in the browser automation session before navigating, then capture the page with that browser’s screenshot API. The AI model does not change browser headers by itself: the agent needs access to a browser tool or automation library such as Playwright or Puppeteer, and its integration must pass the resulting image to the model if visual analysis is the goal.
Use Playwright to set the User-Agent and capture a page
Playwright lets you set a User-Agent on a browser context. Create the context with the desired value, open a page in it, navigate, and call page.screenshot(). This example uses JavaScript and saves a full-page PNG:
import { chromium } from 'playwright';
const browser = await chromium.launch();
try {
const context = await browser.newContext({
userAgent: 'Example custom user agent string',
viewport: { width: 1280, height: 800 },
});
const page = await context.newPage();
await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
Replace the example string with the User-Agent you want to test and the URL with the target page. The User-Agent and viewport are separate context settings; set both when you need a particular layout. Playwright documents these options in its emulation guide and Page API. This is an illustrative composition of documented APIs, not a claim that the script has been run.
Choose a wait condition that fits the page
domcontentloaded waits for the initial document to be parsed, but it does not guarantee that client-rendered content, images, or later requests have finished. If the screenshot must include a specific element, wait for that selector before capturing. For pages with ongoing requests, a network-idle condition may never arrive; use a page-specific selector or a deliberate delay where appropriate. Playwright navigation and page methods are documented in the Page API.
Recommended Free Tools
#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
Choose the screenshot scope
- Viewport: Capture what is visible in the current browser window. Omit
fullPageor set it tofalse. - Full page: Set
fullPage: trueto include content beyond the viewport. This is useful for a whole-page visual review, but can produce a tall image. - One element: Locate the relevant element and capture it rather than the entire page, for example:
await page.locator('main').screenshot({ path: 'main.png' });.
Playwright’s screenshot methods and options are described in the Page API. Its screenshot tool documentation also describes target, full-page, output type, filename, and scale controls for its MCP integration.
Make the browser profile consistent with the User-Agent
A custom User-Agent changes one part of the browser’s reported identity; it does not make the browser indistinguishable from a physical device. A page’s responsive layout can also depend on viewport and screen dimensions, touch support, and other emulated properties. If you are checking mobile behavior, use a consistent device profile or configure the relevant emulation settings along with the User-Agent. Playwright treats these as distinct properties and documents device presets and emulation in its emulation guide.
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
Give the agent both visual and structural context
A screenshot helps an agent reason about appearance, spacing, charts, canvas content, and visual defects. Pixels alone are a poor source of reliable element targets or page structure. When the agent must identify controls, understand text relationships, or interact with a page, also provide a DOM-facing or accessibility representation. Playwright’s Page API documents accessibility snapshots with element references and iframe snapshots; its screenshot guidance distinguishes visual inspection from structured information useful for interaction.
The image handoff is separate from taking the screenshot. Your agent framework or browser tool must make the saved or returned image available to the model; the code above only captures it.
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 minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #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.
Use Puppeteer if it is already available in your agent runtime
Puppeteer applies the override to a page with setUserAgent(), rather than setting Playwright’s context option. This example captures a full-page image after navigation:
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setUserAgent('Example custom user agent string');
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
Use a real User-Agent string and target URL for your task. The example is based on documented APIs, not a claim that it has been executed. networkidle2 can be a poor fit for pages with persistent network activity; select a wait strategy suited to the page. Puppeteer documents the override in its User-Agent API reference and page and element capture in its screenshot guide.
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
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. A single request accepts a URL and can return a PNG, JPEG, WebP, or PDF. It accepts custom User-Agent settings as well as viewport and other capture parameters. See the ScreenshotNeo website and API documentation.
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://example.com
-d user_agent='Example custom user agent string'
-o shot.webp
The cookie-banner, popup, and chat-widget cleanup can be turned off when it is not wanted. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsSign up for 1,000 free screenshots a month, with no card required.
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.
Troubleshoot common capture problems
- The screenshot shows the wrong layout: Confirm that the override is applied before navigation, and that the viewport or device profile also matches the behavior you are testing.
- The page is blank or missing dynamic content: The selected navigation wait may have completed before the page rendered its content. Wait for a meaningful selector or use a suitable page-specific delay.
- The capture hangs while waiting: A network-idle condition may be unsuitable for pages with long-lived connections or ongoing requests. Wait for a specific element instead.
- The agent cannot inspect the saved image: Capturing a file and sending it to the model are distinct steps. Check that the browser integration returns or attaches the image in a form the agent can read.
- The page does not behave like a real phone: A User-Agent override alone does not reproduce a full device profile. Configure viewport and other needed emulation properties too.
Performance, reliability, and cost considerations
For browser automation, capture only the scope needed: a viewport or element screenshot avoids producing an unnecessarily tall full-page image. Waiting for a meaningful page element can be more dependable than waiting for all network activity to stop on pages that keep connections open. No universal performance or reliability winner between Playwright and Puppeteer is established by their API documentation; choose the library already supported by the agent runtime and the interface that fits your capture task.
Self-hosted automation entails running and managing the browser session in your own environment. A screenshot API instead accepts a request for a URL and returns a capture; compare the service’s options and billing behavior with your need to control the browser directly. For ScreenshotNeo, only clean shots are billed, and response headers expose verdict and billing information.
Frequently Asked Questions
Can changing the User-Agent guarantee that a website serves a particular version of a page?
No. It changes the browser’s reported User-Agent, but the site decides how to respond and may also use other signals.
Can I ask an AI agent to take the screenshot without giving it browser access?
Not through the model alone. The agent needs a browser-control integration or a screenshot service exposed as a tool.
Which should I use, Playwright or Puppeteer?
Use the one already supported in your agent runtime; the documented capabilities here do not establish a universal performance or reliability winner.
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.

