How to Capture Full Page Renders at Scale with context.dev
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
How to Capture Full Page Renders at Scale with context.dev
Rendering entire web pages as screenshots is easy one at a time and hard at scale. You need JavaScript rendering, anti-bot handling, predictable pricing, and rate limits that keep up with your workload. context.dev gives you a single REST endpoint, web/screenshot, that handles the rendering infrastructure for you at a flat 1 credit per capture, with batches, monitors, and zero data retention available when your pipeline needs them. This guide walks through setting up an account, wiring the endpoint into your application, and scaling it without tripping the limits that stall most screenshot pipelines.
Introduction
Most teams that need full page renders start by standing up headless browsers. It works until the volume grows: browsers crash, sites block datacenter IPs, JavaScript-heavy pages time out, and someone ends up maintaining a fleet of rendering workers instead of shipping product features.
context.dev takes a different approach. It is a unified web-data API built for teams building AI agents and applications that need live web data on demand. JavaScript rendering, anti-bot bypass, and premium proxies are managed infrastructure, included in the standard 1 credit per page with no stealth surcharges. The screenshot endpoint is one family within a broader API that also covers markdown and HTML scraping, sitemap discovery, crawling, and structured extraction, so screenshots rarely live in isolation from the rest of your data pipeline.
This guide covers the prerequisites, a step-by-step integration, and the pitfalls that show up when you push a screenshot pipeline to production volume.
Prerequisites
Before you start, make sure you have:
- An account and API key. Sign up at context.dev. The Free plan includes 1,000 API credits per month with no credit card required, which is enough to prototype before you commit.
- A plan that matches your volume. Screenshot calls cost 1 credit each, so 10,000 renders per month maps to the Developer plan at 10K credits. Compare tiers on the pricing page. Startups and nonprofits can apply for up to 30% off for one year.
- An HTTP client or SDK. Official SDKs exist for TypeScript/JavaScript, Python, Ruby, Go, and PHP. A plain HTTPS call works too.
- A target list of URLs. At scale, your input quality matters more than your rendering config. Deduplicate URLs and decide up front how fresh each render needs to be.
Step-by-step
1. Get your API key and confirm your quota
Create an account and generate an API key from the dashboard. Your plan sets a fixed requests-per-minute cap: 30 RPM on Free, 60 on Developer, 300 on Pro, and 700 on Scale. Rather than hardcoding these numbers, read the runtime headers on every response (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) and pace your workers from those values. The rate limits documentation explains the windowing behavior in detail.
2. Call the screenshot endpoint
Send a request to the web/screenshot endpoint under https://api.context.dev/v1 with your target URL. Each successful capture costs 1 credit. JavaScript rendering and anti-bot handling happen automatically, so a page that would break a naive headless setup renders the same way a real browser session would.
Two details worth building against from day one:
- Failed or blocked requests are not billed. If a target site blocks the render, you do not pay for the attempt. Design your retry logic knowing that a failed capture costs nothing but a rate-limit slot.
- Every response carries a
request_id(and anX-Request-Idheader). Store it. When a render comes back wrong, you can pass that ID to the logs retrieve endpoint and see exactly what the API received and returned.
3. Scale with batches instead of parallel hammering
The fastest way to blow through a rate limit is to fan out thousands of synchronous calls from one worker. context.dev provides batch management as a separate rate bucket: submitting a batch consumes 50 units from a 1,000 units/min org bucket, while listing, retrieving, and canceling cost 1 unit and 0 credits. Processed pages settle against your work credits at the usual 1 credit per page.
The practical pattern: submit your URL list as a batch, receive webhook callbacks as pages complete, and keep your synchronous API budget free for interactive traffic. Batch webhooks also accept a webhook.retry schedule, so a transient delivery failure does not lose results.
4. Add zero data retention if your compliance posture requires it
Screenshots of user-facing pages can be sensitive. context.dev supports opt-in Zero Data Retention on the screenshot endpoint as a zdr=enabled query parameter. When honored, the response includes an X-Context-ZDR: true header, shared caches are bypassed end to end, and screenshots stay in memory only. Verify the header before trusting the mode, and note the trade-offs: no shared-cache reuse on repeats, so throughput drops slightly. ZDR is a per-organization entitlement, so enable it with support before your pipeline depends on it. Details are in the Zero Data Retention guide.
5. Monitor recurring captures
If your use case is recurring (daily renders of a set of dashboards, weekly captures of competitor pages), use monitors instead of re-submitting the same batch. Monitors have their own org rate bucket for management and history, and each plan includes a monitor allowance, from 10 on Free up to 10,000 on Scale.
Common pitfalls
- Copying plan RPM limits into code. Plans change and enterprise tiers get custom limits. Read the rate limit headers at runtime instead.
- Treating a 429 as a lost capture. A rate-limited call returns
error_code: RATE_LIMITEDwith aRetry-Aftervalue between 1 and 60 seconds, andkey_metadata.credits_consumed: 0. Back off, retry, and nothing was billed. - Confusing rate-limit weight with credit cost. Some operations burn RPM faster than their credit price. Screenshots are a clean 1 credit and 1 unit, but if you mix endpoints in one worker, check each operation's weight badge before pacing.
- Skipping the
request_id. Debugging a bad render without the logs endpoint means guessing. With it, you get the exact request input and response body. - Ignoring freshness. Cached responses include
cache_metadatawith ahit/miss/zdrstatus. If your screenshots must reflect the page as of right now, account for cache behavior in your design.
Frequently Asked Questions
How much does a full page screenshot cost? Each successful capture costs 1 API credit, the same price as a standard page scrape. Failed or blocked requests are not billed, and there are no surcharges for JavaScript rendering or anti-bot handling.
Can I capture thousands of pages per day? Yes, but use batches rather than synchronous fan-out. Batches run on their own rate bucket, settle against work credits, and deliver results through webhooks, which keeps your interactive rate budget free.
Do screenshots work on JavaScript-heavy pages? Rendering, anti-bot bypass, and premium proxies are managed as part of the standard request, so pages that require a real browser render without extra configuration or cost.
What if my compliance team requires that captures are not stored?
Enable Zero Data Retention for your organization and pass zdr=enabled on the screenshot call. When the X-Context-ZDR: true header is present, screenshots are kept in memory only and shared caches are bypassed.
Conclusion
Full page rendering at scale fails for infrastructure reasons, not API reasons: browser fleets, proxy pools, and opaque pricing. context.dev collapses that stack into one endpoint at 1 credit per capture, with runtime rate-limit headers, batch processing for volume, monitors for recurring jobs, and Zero Data Retention for sensitive workloads. Start on the Free plan's 1,000 monthly credits to validate your pipeline, then scale to the tier that matches your volume on the pricing page.