View raw JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"url"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"pdf": {
"type": "object",
"properties": {
"end": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "Last 1-based PDF page to parse. Must be >= start."
},
"ocr": {
"type": "boolean",
"description": "Detect and OCR images embedded in the selected PDF pages, inserting the recognized text in reading order. Default false. OCR calls cost more credits upstream."
},
"start": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1,
"description": "First 1-based PDF page to parse."
},
"shouldParse": {
"type": "boolean",
"description": "Fetch and parse PDF pages. When false, PDFs are skipped entirely (not returned and not counted as failures). Default true."
}
},
"description": "PDF parsing controls.",
"additionalProperties": false
},
"url": {
"type": "string",
"format": "uri",
"description": "Starting URL for the crawl, including the http:// or https:// scheme."
},
"zdr": {
"enum": [
"enabled",
"disabled"
],
"type": "string",
"description": "Set 'enabled' to bypass Context.dev's shared caches and omit request and response content from its retained usage logs. Requires zero data retention on the Context.dev organization, otherwise the call fails with ZDR_NOT_ENABLED."
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2,
"description": "Two-letter ISO 3166-1 alpha-2 country code (e.g. 'us', 'gb', 'de'). Must be one of Context.dev's supported countries."
},
"maxAgeMs": {
"type": "integer",
"maximum": 2592000000,
"minimum": 0,
"description": "Reuse a cached result younger than this many milliseconds. Default 86400000 (1 day), max 2592000000 (30 days). Set 0 to always fetch fresh."
},
"maxDepth": {
"type": "integer",
"maximum": 9007199254740991,
"minimum": 0,
"description": "Maximum link depth from the starting URL (0 = only the starting page). Unlimited when omitted."
},
"maxPages": {
"type": "integer",
"maximum": 500,
"minimum": 1,
"description": "Maximum number of pages to crawl. Default 100, hard cap 500. This is also what sizes the admission hold — one credit per page."
},
"urlRegex": {
"type": "string",
"description": "Only URLs matching this pattern are followed and scraped."
},
"timeoutMS": {
"type": "integer",
"maximum": 300000,
"minimum": 1000,
"description": "Upstream timeout in milliseconds (max 300000). Context.dev aborts the call with a 408 when exceeded. Keep it below the endpoint's requestTimeoutMs so the provider answers before the platform's own budget expires."
},
"waitForMs": {
"type": "integer",
"maximum": 30000,
"minimum": 0,
"description": "Extra browser wait in milliseconds after page load before the content is captured (0-30000). Useful for JavaScript-heavy pages."
},
"stopAfterMs": {
"type": "integer",
"maximum": 110000,
"minimum": 10000,
"description": "Soft time budget for the whole crawl in milliseconds (10000-110000, default 80000). When exceeded, the pages collected so far are returned instead of continuing."
},
"includeLinks": {
"type": "boolean",
"description": "Preserve hyperlinks in the Markdown output. Default true."
},
"includeFrames": {
"type": "boolean",
"description": "Render iframe contents into the output. Default false."
},
"includeImages": {
"type": "boolean",
"description": "Include image references in the Markdown output. Default false."
},
"excludeSelectors": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048
},
"maxItems": 50,
"description": "CSS selectors to remove before conversion. Applied after includeSelectors; exclusion wins on a double match."
},
"followSubdomains": {
"type": "boolean",
"description": "Follow links on subdomains of the starting URL's domain (e.g. docs.example.com from example.com). www and apex are always equivalent. Default false."
},
"includeSelectors": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048
},
"maxItems": 50,
"description": "CSS selectors. When provided, only matching subtrees are kept before each page is converted to Markdown."
},
"settleAnimations": {
"type": "boolean",
"description": "Wait briefly for animations to settle before capturing each page. Default false."
},
"useMainContentOnly": {
"type": "boolean",
"description": "Keep only the page's main content, dropping headers, footers, sidebars, and navigation when detectable. Default false."
},
"shortenBase64Images": {
"type": "boolean",
"description": "Truncate inline base64 image payloads to keep the output small. Default true."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}