Context.dev zero data retention (ZDR) keeps the URLs, queries, page content and results of a request out of its logs, caches and storage, keeping only one line of operational metadata (time, endpoint, status, latency and credits). Once ZDR is enabled for an organization, you add zdr: "enabled" to each Scrape, Crawl, Search, Answers or other supported request and confirm it in the X-Context-ZDR: true response header.
What this guide covers
- Context.dev zero data retention on web-content endpoints
- Context.dev Brand and Styleguide under ZDR
- How to verify ZDR in your own code
What does zero data retention mean for a web scraping API?
Context.dev zero data retention (ZDR) keeps request inputs and outputs out of logs, caches, and storage across the platform. As outlined in the Context.dev zero data retention offering, web-content ZDR requests follow four steps from arrival to completion.
First, you send one field, adding zdr: "enabled" on a JSON payload or zdr=enabled on a query-string endpoint. Second, the content stays in memory. Pages, files, and screenshots are processed purely in memory, skipping shared caches and asset uploads. AI processing also uses a dedicated zero-retention configuration. Third, everything is discarded on the way out. The results are returned directly to the caller, and all processed content is discarded before the request completes. Finally, Context.dev retains exactly one line of metadata so usage and billing still add up.
This strict processing lifecycle is why Tinfoil chose Context.dev to power its privacy-preserving web search agent.
ZDR covers internal server logs and distributed traces in addition to customer-facing usage logs. Inside a ZDR request, Context.dev server logs keep only operational fields like status and latency, and traces drop URLs, content, headers, and error messages before they leave the server.
Standard request internal log and trace example:
INFO scrape completed
url=https://example.com/pricing
user_agent=acme-sync/2.1 tags=pricing,nightly
status=200 latency=412 credits_used=1
TRACE GET example.com/pricing http.url=https://example.com/pricingZDR request internal log and trace example:
INFO ZDR request event
status=200 latency=412 credits_used=1
TRACE ZDR operation zdr=trueWhat Context.dev logs and what it never keeps on web-content endpoints
| Category | What Context.dev Logs (1 Line of Metadata) | What Context.dev Never Keeps |
|---|---|---|
| Identifiers & Auth | request_id (e.g., req_7f3a9c21), api_key suffix (e.g., key_...4f2a) | Headers and cookies you pass along, user agent, request tags |
| Request Target & Inputs | endpoint (e.g., POST /v1/web/scrape), time (e.g., 2026-10-17 14:02:11 UTC) | URLs, queries, and parameters you send; uploaded files |
| Outputs & Media | None | Page content, Markdown, and HTML; screenshots and images; search results and answers |
| Execution & Billing | status (e.g., 200), latency (e.g., 412 ms), credits (e.g., 1) | Full trace URLs, payload bodies, and error messages in server traces |
Step 1: Turn on ZDR for your organization
Context.dev zero data retention is an organization entitlement requested per call. To turn it on for an organization, you must contact support@context.dev or book a call with the team before sending the enablement flag.
If an organization without the active ZDR entitlement sends zdr: "enabled", the API rejects the call entirely. The response will return an HTTP status of 403 and the specific error code ZDR_NOT_ENABLED. Establishing the entitlement at the organization level acts as a safeguard, ensuring that developers cannot mistakenly believe they are running zero-retention workloads on an account that has not been securely provisioned for it.
Step 2: Send zdr enabled on a request
Context.dev ZDR requires passing the exact flag per call once the organization entitlement is active. Passing the parameter differs slightly based on the type of endpoint you are calling.
For JSON-based endpoints, pass zdr: "enabled" inside the JSON request body. For query-based endpoints, pass zdr=enabled in the query string. If you omit the parameter or set it to zdr: "disabled", the API falls back to standard mode.
Passing invalid values, sending the parameter in both the query string and the JSON body at the same time, or sending it in the wrong location returns an HTTP status 400 with the error INPUT_VALIDATION_ERROR. Additionally, sending the enablement flag to an unsupported asynchronous endpoint like Batches or Monitors will be rejected with the error ZDR_NOT_SUPPORTED.
JSON Body Example (POST https://api.context.dev/v1/web/scrape):
{
"url": "https://example.com",
"formats": {
"markdown": true
},
"zdr": "enabled"
}Step 3: Confirm ZDR was applied
Context.dev zero data retention confirms that the control was honored via specific HTTP headers and JSON response fields. Every successful supported ZDR response includes the HTTP response header X-Context-ZDR: true.
For Scrape responses, the system also returns cache_metadata.status: "zdr" and cache_metadata.age_ms: 0 in the JSON body. Developers should programmatically verify this confirmation in their application code before recording in their own audit logs or databases that the ZDR control was successfully applied to the data processing pipeline.
Which endpoints support ZDR?
Context.dev ZDR is supported across most synchronous web content, search, people, company, and brand endpoints. The complete list of supported paths is maintained in the Zero data retention documentation.
| Endpoint | Supported? | Where to Send zdr | Notes / Error Behavior |
|---|---|---|---|
Scrape (POST /v1/web/scrape) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true and cache_metadata.status: "zdr", age_ms: 0 |
Crawl (POST /v1/web/crawl) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true |
Search (POST /v1/web/search) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true |
Answers (POST /v1/web/answers) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true |
People Enrich (POST /v1/people/enrich) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true; omits hosted avatar_url |
People Search (POST /v1/people/search) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true; omits hosted avatar_url |
| Company Search | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true |
Brand Retrieval (POST /v1/brand/retrieve) | Yes | JSON body ("zdr": "enabled") | Confirms via X-Context-ZDR: true; suppresses logs/traces while brand records persist |
Map URLs (GET /v1/web/urls) | Yes | Query string (zdr=enabled) | Confirms via X-Context-ZDR: true |
| Styleguide | Yes | Query string (zdr=enabled) | Confirms via X-Context-ZDR: true; suppresses logs/traces while brand records persist |
| Parse | Yes | Query string (zdr=enabled) | Confirms via X-Context-ZDR: true |
Batches (POST /v1/batch/submit) | No | Not supported | Rejects with ZDR_NOT_SUPPORTED because Batches retain result files |
| Monitors & Feedback | No | Not supported | Rejects with ZDR_NOT_SUPPORTED |
What works differently under ZDR?
Context.dev zero data retention processes pages, files, and screenshots in memory, which changes standard behaviors like shared cache reuse and hosted asset generation. To uphold the guarantee that no content hits disk storage, certain conveniences available in standard mode are modified or skipped.
| Feature or Endpoint | Standard Mode Behavior | ZDR Mode (zdr: "enabled") Behavior |
|---|---|---|
| Scrape screenshots | Uploaded and hosted or returned as requested | Available as inline image data URLs; asset uploads are skipped |
Scrape images (formats.images) | Can include hosted fileUrl alongside original URLs | Keeps original image URLs, but hosted fileUrl is omitted |
Map URLs (GET /v1/web/urls) | Returns URLs with shared page metadata and background enrichment | Returns URLs without shared page metadata or background enrichment |
| People results | Includes hosted avatar_url when available | Hosted avatar_url is omitted |
| PDF OCR | Runs OCR on PDF pages when needed (+1 credit per recovered page) | PDF OCR is skipped |
Request tags (tags) | Stored in usage logs for dashboard filtering (up to 20 tags) | Request tags are omitted from retained logs |
| Shared cache & latency | Reuses shared caches (hit / miss), reducing response latency | Shared caches are skipped (cache_metadata.status: "zdr", age_ms: 0), so requests may take longer |
How ZDR works for Brand retrieval and Styleguide
Context.dev ZDR operates with distinct semantics for the Brand retrieval and Styleguide endpoints compared to standard web-content requests. Setting the parameter on Brand retrieval in the JSON body or on Styleguide in the query string successfully suppresses application logs, request-log entries, and exported traces.
However, brand records, shared caches, and hosted assets can still be read and saved. This mode does not make brand data ephemeral. Cache metadata on Brand retrieval and Styleguide responses can still report a hit or miss. These requests do not appear in your request-log history, ensuring that the act of querying the brand is not logged. Fresh maxSpeed Brand results skip background refresh and are not saved as shared brand records. Both endpoints require the organization's ZDR entitlement and confirm acceptance with the standard X-Context-ZDR: true response header.
Brand Retrieval ZDR Request Body Example (POST /v1/brand/retrieve):
{
"type": "by_domain",
"domain": "example.com",
"zdr": "enabled"
}What ZDR does not cover
Context.dev zero data retention governs only the processing, logs, caches, and storage inside the Context.dev platform. Your own application remains fully responsible for its own content storage, database persistence, and application logs after receiving the API response. Furthermore, asynchronous workflows like Batches and Monitors are excluded entirely, as Batches inherently retain result files for later download.
Security reviewers mapping out data flow requirements can leverage Context.dev's broader compliance posture. Context.dev is SOC 2 Type 2 compliant. Teams can request the SOC 2 report, security policies, and subprocessor list through the Context.dev Trust Center. Additionally, Enterprise agreements include zero data retention alongside account-wide access policies, SSO/SAML and SCIM provisioning, and a 99.9% uptime SLA.
Before deploying to production, security and engineering teams should review the Data Processing Addendum and the official security and trust documentation with their own security and legal teams to satisfy broader data-handling requirements.
Complete TypeScript example
Context.dev zero data retention is straightforward to enforce in your codebase by wrapping standard SDK calls. The following TypeScript helper function calls the Scrape endpoint, enforces ZDR, checks the verification fields, and safely handles any missing entitlements.
import ContextDev from "context.dev";
const client = new ContextDev({
apiKey: process.env.CONTEXT_DEV_API_KEY,
});
export async function scrapeWithZdr(url: string): Promise<string> {
try {
const page = await client.web.scrape({
url,
formats: { markdown: true },
zdr: "enabled",
});
// Confirm ZDR was applied before returning content
if (page.cache_metadata.status !== "zdr") {
throw new Error("ZDR was not applied");
}
if (!page.markdown.success || page.markdown.data === null) {
throw new Error("Markdown extraction failed");
}
return page.markdown.data;
} catch (error: unknown) {
const err = error as { status?: number; error_code?: string; code?: string; message?: string };
const code = err.error_code ?? err.code ?? "";
if (err.status === 403 || code === "ZDR_NOT_ENABLED") {
throw new Error(
"Zero data retention is not enabled for this organization. Contact support@context.dev to turn on ZDR."
);
}
if (code === "ZDR_NOT_SUPPORTED") {
throw new Error(
"This endpoint does not support zero data retention. Use a supported synchronous endpoint."
);
}
throw error;
}
}
// Example usage with an example.com placeholder URL
const markdown = await scrapeWithZdr("https://example.com/pricing");
console.log(markdown);If you prefer to interact with the API directly using cURL, here are two examples demonstrating both JSON body and query string methods.
Scrape with ZDR in the JSON body (POST /v1/web/scrape):
# Send zdr enabled in the JSON body and inspect response headers with -i
curl -i -X POST https://api.context.dev/v1/web/scrape \
-H "Authorization: Bearer $CONTEXT_DEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"formats": { "markdown": true },
"zdr": "enabled"
}'Map URLs with ZDR in the query string (GET /v1/web/urls):
# Send zdr=enabled in the query string for Map URLs
curl -i "https://api.context.dev/v1/web/urls?domain=example.com&maxLinks=50&zdr=enabled" \
-H "Authorization: Bearer $CONTEXT_DEV_API_KEY"What it costs
Context.dev zero data retention costs the exact same number of credits per request as a standard request. There is no surcharge applied for memory-only processing.
For the Scrape endpoint, standard scraping costs 1 credit per page, or 2 credits if you require browser actions. Scrape with JSON extraction (formats.json) costs 5 credits per page, consisting of 1 base credit plus 4 credits when JSON extraction successfully runs. Highlights add 1 credit when at least one passage is returned, and a successful product result adds 1 credit. Because ZDR mode skips PDF OCR, the usual extra credit charge for recovered PDF pages does not apply.
Other supported endpoints follow their normal pricing models exactly. Crawl is 1 credit per successful page. Search requires 1 credit per 10 returned results, rounded up. Answers utilizes 10 credits for fast mode and 100 credits for ultra mode on success. Brand retrieval and Styleguide require 10 credits per call. Map URLs is 1 credit per call, Parse is 1 credit per call, and People and Company Search endpoints scale credits based on fast or ultra modes.
Frequently asked questions
Context.dev zero data retention addresses core compliance and security questions for engineering teams. Here are the most common inquiries regarding the capability.
Is there a web scraping API with zero data retention?
Context.dev zero data retention provides per-request retention controls across its web scraping, crawling, search, and answers endpoints. When zdr: "enabled" is passed on a web-content request, Context.dev processes the page in memory, skips shared caches and asset uploads, and discards the URL, query, and page content before the request completes. Context.dev keeps only one line of operational metadata (request_id, time, endpoint, status, latency, credits, and API key suffix) for billing and usage accounting.
How do I turn on zero data retention in Context.dev?
Context.dev ZDR is an organization entitlement that you activate by emailing support@context.dev or booking a call with the Context.dev team. Once the entitlement is enabled on your organization, you activate it per call by passing zdr: "enabled" in the JSON body or zdr=enabled in the query string on supported endpoints. If an organization without the entitlement sends zdr: "enabled", the API rejects the request with HTTP status 403 and error code ZDR_NOT_ENABLED.
How can I tell ZDR was applied to a request?
Context.dev zero data retention confirms that the control was honored by returning the X-Context-ZDR: true HTTP header on every successful supported response. On Scrape requests, the JSON response body also returns cache_metadata.status: "zdr" and cache_metadata.age_ms: 0. Your application should verify these fields before logging internally that the request ran under zero data retention.
Which Context.dev endpoints support zero data retention?
Context.dev ZDR is supported on Scrape, Crawl, Search, Answers, People Enrich, People Search, Company Search, and Brand retrieval via the JSON request body, and on Map URLs, Styleguide, and Parse via the query string. On Brand retrieval and Styleguide, ZDR suppresses application logs, request-log entries, and exported traces while still allowing brand records, shared caches, and hosted assets to be read and saved. Asynchronous Batches, Monitors, and feedback endpoints do not support ZDR and reject it with ZDR_NOT_SUPPORTED.
Does zero data retention cost extra?
Context.dev zero data retention costs the exact same number of credits per request as standard mode. For example, a standard Scrape call uses 1 credit per page and a Scrape call with JSON extraction uses 5 credits per page whether ZDR is enabled or disabled. Teams can contact support@context.dev to enable the ZDR entitlement on their organization and review full plan details on the Context.dev pricing page.
Start with 1,000 free monthly credits at https://www.context.dev and email support@context.dev to turn on zero data retention.