Cloudflare/browser Rendering
@swamp/cloudflare/browser-renderingv2026.10.02.1
01README
Cloudflare browser-rendering infrastructure models
02Models
crawl.tsv2026.09.29.1
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| actionTimeout? | number | The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error. |
| addScriptTag? | array | Adds a script element into the page with the desired URL or content. |
| addStyleTag? | array | Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content. |
| allowRequestPattern? | array | Only allow requests that match the provided regex patterns, eg. '/^.*\\.(css)'. Reject rules are applied first. |
| allowResourceTypes? | array | Only allow requests that match the provided resource types, eg. 'image' or 'script'. Reject rules are applied first. |
| authenticate? | object | Provide credentials for HTTP authentication. |
| bestAttempt? | boolean | Attempt to proceed when 'awaited' events fail or timeout. |
| browser? | enum | Rendering backend for this crawl. Set to `kitesurf` to render pages with Kitesurf (beta). Only valid when `render` is `true`. |
| contentUse? | enum | |
| cookies? | array | Check [options](https://pptr.dev/api/puppeteer.page.setcookie). |
| crawlPurposes? | array | List of crawl purposes to respect Content-Signal directives in robots.txt. Allowed values: 'search', 'ai-input', 'ai-train'. Learn more: https://contentsignals.org/. Default: ['search', 'ai-input', 'ai-train']. |
| depth? | number | Maximum number of levels deep the crawler will traverse from the starting URL. |
| emulateMediaType? | string | |
| formats? | array | Formats to return. Default is `html`. |
| gotoOptions? | object | Check [options](https://pptr.dev/api/puppeteer.gotooptions). |
| jsonOptions? | object | Options for JSON extraction. |
| limit? | number | Maximum number of URLs to crawl. |
| maxAge? | number | Maximum age of a resource that can be returned from cache in seconds. Default is 1 day. |
| modifiedSince? | number | Unix timestamp (seconds since epoch) indicating to only crawl pages that were modified since this time. For sitemap URLs with a lastmod field, this is compared directly. For other URLs, the crawler will use If-Modified-Since header when fetching. URLs without modification information (no lastmod in sitemap and no Last-Modified header support) will be crawled. Note: This works in conjunction with maxAge - both filters must pass for a cached resource to be used. Must be within the last year and not in the future. |
| options? | object | Additional options for the crawler. |
| rejectRequestPattern? | array | Block undesired requests that match the provided regex patterns, eg. '/^.*\\.(css)'. |
| rejectResourceTypes? | array | Block undesired requests that match the provided resource types, eg. 'image' or 'script'. |
| render? | boolean | Whether to render the page or fetch static content. True by default. |
| setExtraHTTPHeaders? | record | |
| setJavaScriptEnabled? | boolean | |
| source? | enum | |
| url? | string | URL to navigate to, eg. `https://example.com`. |
| viewport? | object | Check [options](https://pptr.dev/api/puppeteer.page.setviewport). |
| waitForSelector? | object | Wait for the selector to appear in page. Check [options](https://pptr.dev/api/puppeteer.page.waitforselector). |
| waitForTimeout? | number | Waits for a specified timeout before continuing. |
| apiToken? | string | Cloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| apiKey? | string | Cloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email. |
| email? | string | Cloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey. |
fn create()
Create a Crawl
fn get(id: string)
Get a Crawl
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Crawl |
fn lookup()
Look up an existing Crawl by matching global argument values and import it into state
fn adopt(id: string)
Import an existing Crawl by ID into state for management
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Crawl to import |
fn delete(id: string)
Delete the Crawl
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Crawl |
fn sync(identifier?: string)
Sync Crawl state from Cloudflare
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific Crawl by id (e.g. one discovered by list) |
Resources
state(infinite)— Crawl resource state
03Previous Versions
2026.09.29.1
- Updated: crawl
2026.09.26.1
- Updated: crawl
2026.09.17.1
- Updated: crawl
Modified 1 models
2026.08.27.1
- Updated: crawl
2026.08.15.1
- Updated: crawl
2026.08.04.1
- Added: browser
2026.07.24.1
- Added: crawl
04Stats
A
100 / 100
Downloads
22
Archive size
15.1 KB
Verified by Swamp
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels