The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use Playwright’s async Python API to connect to BrowserCat’s cloud browser, navigate to a page, and save its screenshot. BrowserCat documents the Playwright connection endpoint and API-key header; the capture line below uses Playwright’s page.screenshot() API.
What you need
- Python and Playwright for Python.
- A BrowserCat API key. Keep it private; the example reads it from an environment variable.
- A target page that your browser session is permitted to access.
BrowserCat’s documentation recommends Playwright and gives the connection endpoint as wss://api.browsercat.com/connect. Its Python example demonstrates connecting and reading page information; its Quick Start illustrates the screenshot method in JavaScript. The Python capture below combines those documented pieces using Playwright’s Python API.
Install Playwright and set your API key
-
Install the Python package:
python -m pip install playwright -
Set your BrowserCat key in the shell before running the script. For macOS or Linux:
export BROWSERCAT_API_KEY="your_api_key"For PowerShell:
$env:BROWSERCAT_API_KEY="your_api_key"
Playwright’s Python package provides the async API used here. This connection uses secure WebSocket transport and sends the key in the Api-Key header, as in BrowserCat’s Playwright instructions. BrowserCat also documents query-parameter authentication, but advises using secure transport such as wss to protect private keys.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Capture a website screenshot with BrowserCat and Python
Save the following as capture.py. Replace the example URL with the page you want to capture.
import asyncio
import os
from playwright.async_api import async_playwright
async def main():
api_key = os.environ.get("BROWSERCAT_API_KEY")
if not api_key:
raise RuntimeError("Set the BROWSERCAT_API_KEY environment variable")
async with async_playwright() as p:
browser = await p.chromium.connect(
"wss://api.browsercat.com/connect",
headers={"Api-Key": api_key},
)
try:
page = await browser.new_page()
await page.goto(
"https://example.com",
wait_until="load",
timeout=60_000,
)
await page.screenshot(path="screenshot.png", full_page=True)
finally:
await browser.close()
asyncio.run(main())
Run it with python capture.py. If navigation and capture complete, the image is written to screenshot.png in the current working directory.
What the code does
async_playwright()starts Playwright’s asynchronous context.p.chromium.connect()connects to BrowserCat’s documented WebSocket endpoint and authenticates with the API key. Usep, the context variable defined byasync with.page.goto()navigates to the target and waits for the page’s load event. The 60-second timeout is an example setting, not a BrowserCat performance guarantee.page.screenshot(path="screenshot.png", full_page=True)saves a full-page image. Removefull_page=Trueto capture the current viewport instead.- The
finallyblock closes the connected browser even if navigation or screenshot capture raises an exception.
Choose the right wait and screenshot settings
Wait for the state your page needs
wait_until="load" waits for the page load event. Pages that render important content later with JavaScript may need a more specific wait. For example, wait for a known element before capturing:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
await page.goto("https://example.com", wait_until="domcontentloaded")
await page.locator("main h1").wait_for(state="visible", timeout=30_000)
await page.screenshot(path="screenshot.png", full_page=True)
Choose a selector that indicates the content you actually need. A fixed delay can help with a known animation or delayed widget, but it adds waiting time and does not prove that all page content has finished loading.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteViewport or full page
- Viewport: omit
full_pageor set it toFalse. The image covers the current viewport. - Full page: set
full_page=Trueto request an image extending over the page’s full scrollable content. Very long pages can produce large images and take longer to capture.
Playwright’s screenshot API also supports options such as image type, quality for JPEG, transparency for PNG, clipping, and animation handling. Check the Playwright Python screenshot API reference for the options available in the Playwright version installed in your project; not every option applies to every image format.
BrowserCat configuration and browser support
The first capture usually needs only the endpoint and API-key header. For additional configuration, BrowserCat documents query parameters and a BrowserCat-Opts JSON header; its configuration guide says header keys take precedence over query parameters. Consult BrowserCat’s browser configuration overview for the current supported settings, including proxy and browser or launch options.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
BrowserCat’s current overview says Chromium and Chrome run today, while Firefox and WebKit are on the roadmap; it also describes explicit region routing as on the roadmap. These availability statements can change, so check the current documentation before relying on a particular browser or routing option.
When to use a hosted browser instead of local Playwright
With a local launch, Playwright runs a browser in your own environment. With connect(), this example uses BrowserCat’s managed cloud browser session, so you do not have to host that browser infrastructure yourself. The trade-off is that execution depends on a remote service and network connection. BrowserCat recommends local development until browser automation becomes a bottleneck. Its service documentation is vendor information, not an independent performance test; this example makes no claim about capture speed or success rate.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshooting
Missing-key error
If the script raises Set the BROWSERCAT_API_KEY environment variable, set the variable in the same shell or process that runs Python. Check for a misspelled variable name, then rerun the script.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Authentication or connection failure
Confirm that the API key is valid, the endpoint is spelled wss://api.browsercat.com/connect, and the request sends the exact header name Api-Key. Keep the key out of source control and use the secure WebSocket endpoint.
Navigation timeout
A page may be slow, unreachable from the session, or waiting on resources that do not finish promptly. Confirm the URL, select the appropriate navigation event, and adjust timeout only if a longer wait is appropriate. Waiting for a specific content selector can be more useful than waiting for every page resource.
Screenshot is blank or missing late content
Verify that navigation reached the expected URL and that the content is present before capture. If the page renders asynchronously, wait for a visible selector tied to the content. A successful screenshot call alone does not establish that a site’s delayed content has appeared.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Browser is not closed after an error
Keep browser operations inside the try block and await browser.close() in finally, as shown. This ensures the cleanup path runs if navigation or capture fails.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo documentation for API options. ScreenshotNeo removes cookie banners, popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed; and its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000.
Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Can I capture only the visible browser area with Playwright?
Yes. Omit full_page=True or set it to False in page.screenshot().
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Does BrowserCat’s documented Python example itself take a screenshot?
No. BrowserCat’s Python guide demonstrates Playwright connection and page information; its Quick Start shows screenshot capture in JavaScript. The Python screenshot call here uses Playwright’s Python page API.
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.

