How to Capture Competitor Landing Page Screenshots with Cloudflare Enabled
Capture and document competitor landing pages responsibly, choose browser settings that preserve the page, and know when a Cloudflare challenge means you should stop.
To capture a competitor landing page with Cloudflare enabled, use a current browser or an authorized browser-rendering tool, set the viewport to match the comparison you need, and capture the rendered page. If Cloudflare presents a challenge, stop the automated attempt. Do not automate the challenge or try to work around it; ask the site owner for access, use a public alternative, or capture manually if you are permitted to view the page.
For an occasional screenshot, the browser’s built-in capture or your operating system’s screenshot tool is usually enough. For repeatable captures of pages you are authorized to access, Cloudflare Browser Run or Playwright can render a page and save an image. Rendering capability does not grant permission to bypass a challenge or other access control.
1. Confirm the page is appropriate to capture
Before automating a capture, review the target site’s terms and published crawler guidance. Limit work to pages you are allowed to view and use. Do not automate access to login-only areas, send bulk requests, or work around access controls without authorization.
Cloudflare describes robots.txt as advisory guidance, not an enforceable access control. Its presence or absence does not establish legal permission to capture, store, publish, or commercially reuse a page. Check the target’s own terms and get permission when needed. Cloudflare’s robots.txt guidance explains the protocol’s scope; its sample terms are illustrative, not legal advice.
2. Choose a capture method
| Method | Best for | Keep in mind |
|---|---|---|
| Browser or operating-system capture | A one-off page you can view normally | Simple, but repeated captures and exact viewport matching require manual care. |
| Cloudflare Browser Run | Configured, repeatable rendering and screenshots | Requires an appropriately authorized API token and access to the target page. Stop if a production challenge appears. |
| Playwright | Repeatable capture scripts for pages you are allowed to access | Browser automation is not supported as a way to solve production Cloudflare challenges. |
| ScreenshotNeo | A screenshot API or MCP workflow without setting up a browser | It does not grant access to restricted pages. Treat a challenge or failed load as a stop condition. |
Cloudflare Browser Run provides Quick Actions for simpler tasks and browser sessions for direct browser control through integrations including Playwright. Its screenshot endpoint renders HTML and JavaScript before capture. Cloudflare also documents a snapshot endpoint that can return rendered HTML and a screenshot together. See Browser Run, the screenshot endpoint, and the snapshot endpoint.
3. Capture a page with Cloudflare Browser Run
Cloudflare’s screenshot endpoint takes a URL and capture settings. Its documented default viewport is 1920×1080; set dimensions deliberately when matching a desktop or mobile comparison. Supply an API token with the required permission as described in Cloudflare’s documentation. The example below uses a placeholder URL and token: replace them with a page you are authorized to capture and your own token.
curl -X POST "https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/browser-rendering/screenshot" \
-H "Authorization: Bearer CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"url": "https://example.com/landing-page",
"screenshotOptions": {
"fullPage": true,
"type": "png"
},
"viewport": {
"width": 1440,
"height": 1000
}
}' \
--output landing-page.png
Check the current endpoint documentation for the precise request schema, required token permissions, and available options before using the request. Do not treat an error or challenge response as a cue to make the request more evasive.
Use Playwright for an authorized repeat workflow
Cloudflare documents Playwright integration for browser sessions. This standalone local example uses Playwright directly for a page you can access; it does not use Cloudflare credentials or attempt to solve a challenge. Install Playwright and its Chromium browser using the official installation guide.
import { chromium } from 'playwright';
const url = 'https://example.com/landing-page';
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({
viewport: { width: 1440, height: 1000 },
deviceScaleFactor: 1
});
try {
const response = await page.goto(url, {
waitUntil: 'networkidle',
timeout: 60000
});
console.log('HTTP status:', response?.status() ?? 'no response');
await page.screenshot({ path: 'landing-page.png', fullPage: true });
} finally {
await browser.close();
}
If navigation stops on a Cloudflare challenge, preserve that result as a challenge outcome and stop. Cloudflare states that automated browsers are not supported for solving production challenges, and names Playwright, Puppeteer, Selenium, and Cypress among the examples. See Cloudflare’s supported browsers guidance.
4. Set screenshot options for a fair comparison
Viewport and device scale
Use the same viewport width and height for every page in a comparison. A narrower viewport can change responsive layout, navigation, line wrapping, and which content is initially visible. Device scale affects image pixel density; record it if the capture tool exposes that setting. Cloudflare’s screenshot endpoint documents viewport settings and a default of 1920×1080.
Viewport capture or full page
A viewport capture records only what fits on screen. Full-page capture includes below-the-fold content and is useful for documenting the complete landing page, though very long pages can produce large images and may trigger lazy-loaded content differently. State which mode you used so viewers understand the image’s scope.
Wait for the actual content
Pages that depend on JavaScript need time to render before capture. Browser Run documents that it processes HTML and JavaScript. For other browser automation, wait for a meaningful page element or an appropriate navigation condition rather than assuming the first HTML response is the finished page. Network-idle waits can be unreliable on pages that keep analytics, chat, or streaming requests open; a specific element is often a better signal.
Inspect the result for unfinished loading, lazy-loaded sections, sticky headers, cookie prompts, and overlays. A capture is a record of what appeared in that browser session at that time, not a guarantee that every visitor sees the same page.
Capture a specific element
If the comparison concerns only a hero section or pricing block, capture a selected element rather than the entire page. Cloudflare’s screenshot endpoint documents selector capture. Check that the selector identifies the intended visible section at the chosen viewport; selectors can change as the site is updated.
5. Handle Cloudflare challenges as a stop condition
Cloudflare challenges are access checks that evaluate whether a visitor appears to be human or automated. An interstitial can hold navigation before the visitor reaches the destination. A screenshot showing a challenge is evidence that the page was not available to that automated session; it is not a failed invitation to defeat the check. Read how Cloudflare challenges work and its interstitial challenge documentation.
If a challenge appears:
- Stop automated retries and do not automate challenge interaction.
- Do not change browser fingerprints, rotate proxies, replay clearance cookies, or otherwise try to evade the check.
- Ask the site owner for an authorized route or permission, use another public source, or capture manually if you are permitted to view the page.
- Label and retain the result as a challenge page if that is useful for your records.
Cloudflare’s statement that automated browsers are unsupported applies specifically to solving production challenges. Browser Run remains a documented screenshot and browser automation product; the distinction is that screenshot automation is for permitted access, not for defeating a site’s challenge.
6. Keep useful capture records
For each comparison, record the page URL, date and time, viewport dimensions, capture mode (viewport or full page), and tool. Note relevant session or regional differences, such as whether a consent prompt appeared. These are documentation practices that make later comparisons easier to interpret; they do not make captures identical across sessions.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. Use it only for pages you are authorized to access; a screenshot API does not grant permission to bypass a Cloudflare challenge. The parameter names used by other screenshot APIs also work, which can make switching easier. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/landing-page -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://example.com/landing-page"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({
access_key: 'YOUR_API_KEY',
url: 'https://example.com/landing-page'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const bytes = new Uint8Array(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', bytes));
ScreenshotNeo accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers indicate the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is on every plan. Sign up for 1,000 free screenshots a month, with no card.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The image shows a Cloudflare challenge | The automated session was challenged or gated. | Stop automation. Request authorized access, choose a public alternative, or capture manually if permitted. |
| The screenshot is blank or mostly empty | Navigation may have failed, content may not have rendered, or the session may show an interstitial. | Inspect the response and visible page. For an authorized page, wait for a meaningful element and capture again once. If blocked, stop. |
| Hero image or lower sections are missing | Lazy loading or delayed JavaScript left content unfinished at capture time. | Use full-page capture where appropriate, wait for the relevant element, and inspect the resulting image. |
| Layout differs from the live page | Viewport, device scale, session, time, user agent, or regional rendering may differ. | Record and standardize capture settings; compare pages under the same conditions. |
| Cloudflare API returns an authorization or request error | Token permissions, account identifier, endpoint, or request schema may be wrong or out of date. | Check the current Browser Run API documentation and token requirements. Do not respond to a challenge by trying evasion techniques. |
| Full-page capture is unusually large or slow | The page is long or contains many images and dynamic sections. | Capture only the relevant element or viewport when that meets the research need; keep full-page capture for cases where below-the-fold content matters. |
Performance, reliability, and cost
Browser rendering takes longer than saving raw HTML because scripts, images, fonts, and layout need to load. Full-page capture can take more time and memory than a viewport image. Keep runs focused, use the smallest capture area that answers the comparison question, and avoid repeated retries against a challenged page.
Browser output can vary with time, viewport, session, user agent, consent state, and regional behavior. For comparisons, standardize and record the conditions. A screenshot is a useful visual record, but it does not establish that the page was served identically to every visitor.
Cloudflare Browser Run has its own account, API, and pricing terms; consult Cloudflare’s current documentation before estimating cost. ScreenshotNeo offers 1,000 free shots per month without a card; paid tiers are $5 for 3,000, $15 for 15,000, $39 for 60,000, $99 for 250,000, and $249 for 1,000,000. Yearly billing gives two months free. Only clean shots are billed by ScreenshotNeo, and each response reports verdict and billing headers. Check the documentation for request options and response details.
FAQ
Can Playwright take a screenshot of a Cloudflare-protected page?
It can capture pages the browser session is permitted to access. Cloudflare says automated browsers are not supported for solving production challenges, so stop if one appears.
Does robots.txt tell me that a screenshot is allowed?
No. Cloudflare describes robots.txt as advisory crawler guidance. Check the target’s terms and access controls and obtain permission when appropriate.
Should I save the challenge page?
You can document that the automated session encountered a challenge, if useful. Label it accurately; it is not a screenshot of the landing page.
Can I publish or reuse a competitor’s screenshot?
That depends on the target site’s terms and the context of use. The research sources do not settle those site-specific questions; review the terms and seek permission where appropriate.


