Website screenshot API with proxy: One-call setup
Need a website screenshot API with proxy? Send one call with proxy auto: it starts on datacenter and retries on residential. Learn costs and failure checks.
- screenshot api
- residential proxy
- playwright
- web data api
- sticky session
On this page
- How does a website screenshot API with proxy work, and when do you need one?
- Datacenter or residential exit, rotating or sticky: which one fits a screenshot?
- How do you take a website screenshot with a proxy in one API call?
- How do you screenshot through a residential exit with Playwright over CDP?
- What does a website screenshot API with proxy cost per capture?
- How to tell exit failures from render failures in a website screenshot API with proxy
- When is another website screenshot API a better fit than Wayfern?
- Frequently asked questions
- Do you need a proxy to take a website screenshot?
- What is the difference between proxy auto and a residential exit?
- Can I use my own proxy for screenshots?
- Does a failed proxied screenshot cost credits?
- Can I capture a mobile viewport through the proxy?
- Next steps for proxied screenshots
- Sources
For a website screenshot api with proxy, make one call to Wayfern’s Web Data API with proxy: "auto" for a single page: it starts on a datacenter exit and retries on residential when blocked. For scripted flows, drive Playwright or Puppeteer on a hosted browser over CDP, setting country, region, city, isp and a sticky session. Failed Web Data calls aren’t billed.
A screenshot of a regional price page can come back showing the wrong country, a block page or a blank frame. The exit, the target or the render timing could be at fault, and the image doesn’t say which.
The work here is public-data work: regional content checks, ad and layout verification, compliance archiving and visual QA. Terms of service and the law apply to every capture. You will be able to choose an exit, send a working request, read a failure and estimate its cost.
Key Takeaways
- Page weight costs money only on residential exits, which bill per GB; datacenter egress is free.
- Use a sticky session id across navigations, because a cookie replayed from a different IP is a visible mismatch.
- An unknown location is refused with close code 4007, not served as the wrong country.
- The browser presents a desktop device, so phone-size capture isn’t offered.
How does a website screenshot API with proxy work, and when do you need one?
A website screenshot API with proxy loads the target URL from an exit IP you choose, renders the page in a real browser and returns an image. The exit IP decides which version of the page the server sends, so a German exit can capture German content.

The server sees the exit IP first and picks a response. The browser renders that response, and the screenshot is the last step. ScraperFly’s screenshot API page names more variables than location: “Some public pages look different by country, routing quality, cookie state, viewport, JavaScript timing, or delivery path.”
In a website screenshot API with proxy, the proxy doesn’t change how the browser captures the image. It only changes what the page loaded.
Chrome for Developers documents the new headless mode and chrome-headless-shell as separate things.
Pick the exit for your website screenshot API with proxy by how the page behaves:
- A page that looks the same everywhere renders fine from a datacenter exit, and datacenter egress is free.
- A page whose content varies by country, city or ISP needs a residential exit in that location.
- A blocked datacenter range calls for a retry on residential.
proxy: "auto"starts on a datacenter exit and retries on residential when blocked.
Datacenter or residential exit, rotating or sticky: which one fits a screenshot?
A one-page capture can take a datacenter exit with a fresh IP, while any multi-step flow needs a residential exit with a sticky session that holds one IP. A datacenter exit sends traffic from a cloud-hosted IP, and a residential exit sends it from an address on a consumer connection. A rotating IP changes between requests; a sticky session keeps the same IP for the whole flow.
| Datacenter exit (default) | Residential, no session id | Residential, sticky session | |
|---|---|---|---|
| IP behavior | Not pinned by you | May differ per connection | One IP for the flow |
| Cookies and consistency | Fine for one page | Cookie can meet a new IP | Cookie and IP stay paired |
| Location targeting | Default exit | Country, region, city, isp | Same, plus session id |
| Bandwidth | Egress free | Metered per GB | Metered per GB |
Wayfern’s API reference sets the default exit to datacenter, and its egress is free. Residential exits are selected by country (ISO-3166), region, city and isp, and every code is checked against a live catalog.
An unknown location is refused with close code 4007 instead of falling back to the wrong place.
A sticky session id holds one residential IP for a flow.
The pairing matters to the target: as Wayfern’s page on anti-detect browser sessions puts it, a cookie issued to one IP and replayed from another is an easy signal for a site to read.
Residential bandwidth is metered per GB, so page weight costs money on that path. The current rates are on the pricing page.
A capture of one public page, such as a single local price, can take a fresh IP. A flow with a login, a consent banner or several navigations needs one IP held from the first request to the last, as our authenticated scraping guide describes.
How do you take a website screenshot with a proxy in one API call?
You take a proxied website screenshot with one POST to the Web Data API screenshot endpoint, with proxy set to "auto".
- Store your token by running
export WF_TOKEN=your_wf_tokenin the shell. Use awf_token from your dashboard and keep it out of source control. - Send the auto request. In this mode the call starts on a datacenter exit and retries on residential when the target blocks it.
curl -X POST https://api.wayfern.com/api/v1/screenshot \
-H "Authorization: Bearer $WF_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/pricing", "proxy": "auto"}' - To force a residential exit in one country, change
proxyto"residential"and addcountryas an ISO-3166 code. Use this when the page itself changes by region, because auto mode may finish on a datacenter exit.
curl -X POST https://api.wayfern.com/api/v1/screenshot \
-H "Authorization: Bearer $WF_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/pricing", "proxy": "residential", "country": "DE"}' - Set viewport, full page and output format with the field names the API reference lists. Use a desktop width.
- Read the response, which returns the capture and the exact credits charged. Wayfern doesn’t bill failed Web Data work, so a blocked attempt that never produced an image costs nothing. Check the credits value against your plan before you schedule the call.
The Wayfern limits page sets retention: Wayfern keeps screenshots for 7 days, so download any capture you need to archive.
The documented rate limit for the scrape endpoint is 60 requests a minute, and the default API limit is 120 requests a minute per client IP.
This path suits single URLs, scheduled checks and any job with no steps before capture. If you must log in, dismiss a banner, scroll or hold one IP across several pages, use the CDP path with a sticky session id in Playwright or Puppeteer instead.
Try the screenshot endpoint with your own token and compare the auto and residential captures of one regional page.
How do you screenshot through a residential exit with Playwright over CDP?
You screenshot through a residential exit by connecting Playwright to the hosted browser with chromium.connectOverCDP() and putting the exit in the connect URL. Use this path when you need to log in, dismiss a banner or scroll before the capture. For a single page, the one-call API is simpler.
- Build the connect URL. Add
country, and optionallyregion,cityandisp, towss://api.wayfern.com/ws?token=LINK_TOKEN. Addsession=run42to hold one IP across navigations, andwidthandheightfor the window. Per Wayfern’s API reference, opening the socket starts the session, so there is no create-session call. - Connect once and reuse the connection.
- Wait for the element you came for, not the network. Playwright’s documentation marks
networkidleas “DISCOURAGED” and says to rely on web assertions to assess readiness. - Capture. Playwright’s
page.screenshottakesfullPage,typeandclip, and Puppeteer’spage.screenshotis the equivalent.
import { chromium } from "playwright";
const url = "wss://api.wayfern.com/ws?token=LINK_TOKEN" +
"&country=DE&session=run42&width=1440&height=900";
const browser = await chromium.connectOverCDP(url);
const page = await browser.contexts()[0].newPage();
await page.goto("https://example.com/prices", { waitUntil: "domcontentloaded" });
await page.locator("#price-table").waitFor();
await page.screenshot({ path: "prices-de.png", fullPage: true, type: "png" });
await browser.close(); That URL holds one German residential IP for the whole run and captures at a 1440 by 900 desktop window. Wayfern’s docs say the real window is resized and nothing is emulated, with width and height accepted from 500 to 3600 by 400 to 1900 CSS pixels.
Bring-your-own proxy works too. Save an http, https or socks5 proxy on the link with proxyMode set to own, then pick it per connection with proxy=own, proxy=residential or proxy=none.
Credentials never go in the URL, the password is encrypted at rest, and own-proxy traffic isn’t metered as residential bandwidth.
There are no persistent profiles, so save and restore cookies in your own code between runs. For longer flows, see our guide to anti-detect browser sessions.
What does a website screenshot API with proxy cost per capture?
A proxied screenshot through the Web Data API costs 5 credits, which is $0.0625 at the $0.0125 list rate (5 × $0.0125), and a failed capture isn’t billed. Wayfern’s pricing states that every Web Data API response returns the exact credits charged, and failed Web Data work isn’t billed, so you can check the cost of each call instead of estimating it.
The balance has a hard stop at zero. Calls are refused and open sessions are closed, and nothing is charged beyond your credits unless you turn on auto top-up, which is off by default.
The CDP path, where your Playwright or Puppeteer script drives a hosted browser, bills two meters. Browser time is 8 credits per open-page hour, metered per second with a 60-second minimum per page.
The second meter is residential bandwidth at 320 credits per GB, or $4.00 per GB at list rate. Datacenter egress is free.
That split is why page weight matters only on the residential path of a website screenshot API with proxy.
On the CDP path the default exit is also a datacenter, so add a residential country only for pages that serve different content by region. Check the current rates on the Wayfern pricing page before you budget a large run.
How to tell exit failures from render failures in a website screenshot API with proxy
You tell a proxy failure from a rendering problem by checking four proxy-side outcomes in order, then the render timing, before you trust any image.
- Read the connection result first, which catches an unknown location. Wayfern’s API reference says an unknown location is refused with close code 4007 instead of falling back to another country. If you connect with
country=ZZ, which isn’t a valid ISO-3166 code, the socket closes with 4007 and no capture is saved, so there is no wrong-country image to misread. - Check the catalog for an unavailable location. A code can be valid and still have no exit behind it. Query
GET /api/proxy/locationsand pick a country, region or city it lists. - Read the response status before capturing, which catches a blocked target. In Playwright, keep the result of
page.goto()and logresponse.status(). A 403, a 429 or a block-page title means the target refused the exit. Withproxy: "auto"on the Web Data API, a blocked datacenter attempt retries on residential. On the CDP path, reconnect with a residential exit yourself. - Compare a locale signal, which catches a wrong-region page. A 200 response can still serve the wrong market. Look for a currency, a language or a store selector in the capture, and compare it to the country you requested. Log
country,regionandsessionbeside each saved image so a mismatch is traceable. - Wait on an element if the capture is empty or half-loaded. When the status is 200 and the locale is right but the frame is blank, the problem is render timing. Wait on the element you came for with
page.locator("#price").waitFor(), then capture.
If steps 1 to 4 pass and the capture is still empty, the exit isn’t at fault.
When is another website screenshot API a better fit than Wayfern?
Another screenshot API fits better when you need a phone-sized capture or a free start, and Wayfern fits when the exit or the steps before the capture matter.
| Need | Better fit | Why |
|---|---|---|
| Free captures to start | Site-Shot | Free plan |
| Scheduled captures | ScreenshotAPI.net | Listed feature |
| Exit by country, region, city or ISP | Wayfern | Residential exits |
| Scripted steps before capture | Wayfern | CDP connection |
Wayfern has limits a buyer should weigh. Wayfern’s API reference states that the Wayfern browser presents a desktop device, so phone sizes aren’t offered.
ScreenshotAPI.net lists scheduled captures next to full-page or viewport screenshots and PDF export, which suits recurring monitoring.
Site-Shot states that a confirmed account’s key comes with the free plan, 100 captures a month, no card needed, which suits a first test.
Wayfern offers residential exits by country, region, city and ISP, plus a sticky session id. It also shares one balance with its search, captcha and MCP tools, and our buyer’s guide to web scraping tools covers the wider field.
Frequently asked questions
Do you need a proxy to take a website screenshot?
Only sometimes. A plain public page that looks the same everywhere renders fine from a datacenter exit. You need a proxy when the page changes by country, city or ISP, or when a datacenter range is blocked.
What is the difference between proxy auto and a residential exit?
With proxy: "auto", the Web Data API starts on a datacenter exit and retries on residential only when the first attempt is blocked. Forcing residential skips that first step, so every capture runs on a residential IP. Pick auto unless you know the target needs residential from the first request.
Can I use my own proxy for screenshots?
You can, on the CDP browser path. Save an http, https or socks5 proxy on a link, then pick it per connection with proxy=own. Credentials stay out of the URL. The API reference covers the setup.
Does a failed proxied screenshot cost credits?
Failed Web Data work isn’t billed. A successful screenshot costs 5 credits, and each response returns the exact credits charged. Current rates are on the pricing page.
Can I capture a mobile viewport through the proxy?
Not with Wayfern. The browser presents a desktop device, so phone sizes aren’t offered. On the CDP path you can still set desktop width and height values on the connect URL.
Next steps for proxied screenshots
Today, send one screenshot request with proxy: "auto" and read the credits charged in the response, which gives your real cost per capture.
This week, add a country and check a visible locale signal in the image, such as currency or language. If a flow spans several navigations, move it to Playwright over CDP with a sticky session id.
This month, decide the exit for each target, then compare your cost per capture with the published rates on Wayfern pricing. Check each target’s terms of service and the law before you schedule recurring captures.
Credit packs work without a plan, and one balance pays for screenshots, hosted browser sessions, search, captcha solving and the MCP server. Create a Wayfern account and buy a credit pack to run your first proxied capture.
Sources
API Reference - CDP, Web Data & Search | Wayfern · Pricing - Credits for Browsers & the Web Data API | Wayfern · Anti-detect browser sessions | Wayfern · Screenshot API with Proxies for Harder Targets - ScraperFly · Chrome Headless mode | Chrome for Developers · Limits | Wayfern · Page | Playwright · Website Screenshot API for Developers | ScreenshotAPI.net. Every other source is linked where the article cites it.
See us more often in Google
One click marks Wayfern as a preferred source in Google, so our posts can show up more often in your Top Stories, AI Mode and AI Overviews.