Skip to main content
Quick actions create an ephemeral browser for one deterministic operation. They are useful when you do not need a persistent browser handle or a model-backed agent.
const page = await web.scrape({
  url: "https://www.sec.gov/edgar/search/",
  format: "markdown",
  maxChars: 20_000,
  policy: { allowedDomains: ["sec.gov"] },
});
All quick actions accept policy. All quick actions also accept proxy, which routes the ephemeral browser through a custom proxy URL.

web.scrape()

web.scrape(options: string | ScrapeOptions): Promise<ScrapeResponse>
Pass a URL string for the default markdown read:
const result = await web.scrape("https://example.com");
Use ScrapeOptions for control:
FieldTypeDefaultDescription
urlstringRequiredURL to read.
format"html" | "markdown" | "text"markdownReturned content format.
selectorstringNoneCSS selector that scopes page content.
iframestringNoneCSS selector of a specific iframe to target.
waitForstringNoneCSS selector to wait for before reading.
timeoutnumber30000Total operation timeout in milliseconds.
maxCharsnumber20000Soft cap on returned content characters. Maximum is 50000.
startFromCharnumber0Zero-based content character offset for continuing a truncated read.
readFrom"start" | "end"startRead window direction.
includeLinksbooleanfalseInclude deterministic anchor links.
iframeTextbooleanfalseWhen format is not html, append iframe text to content.
proxystringNoneProxy URL for the ephemeral browser.
policyBrowserNavigationPolicyClient-level policy, if configuredBrowser navigation policy for the read.
ScrapeResponse:
FieldDescription
vResponse version. Current value is 1.
urlFinal URL.
titlePage title.
formatReturned format.
contentPrimary deterministic read content.
provenanceRead source and scoping metadata.
diagnosticsRead threshold and fallback diagnostics.
completenessRatio and cap/pruning diagnostics.
statusCodePage HTTP status code.
linksDeterministic links when includeLinks is true.
truncatedWhether content was clamped to maxChars.
charsOmittedOmitted UTF-16 code units when truncated.
warningsStructured warnings.
tipsBrowser policy tips.
elapsedMsBrowser-side elapsed time.

web.screenshot()

web.screenshot(options: ScreenshotOptions): Promise<ScreenshotResponse>
const shot = await web.screenshot({
  url: "https://example.com/dashboard",
  fullPage: true,
  format: "png",
});
ScreenshotOptions:
FieldTypeDefaultDescription
urlstringRequiredURL to capture.
fullPagebooleanfalseCapture the full scrollable page.
format"png" | "jpeg" | "webp"pngImage format.
qualitynumber80Image quality for jpeg and webp.
selectorstringNoneCSS selector of a specific element to capture.
hideSelectorsstring[]NoneCSS selectors hidden with visibility:hidden during capture.
maskSelectorsstring[]NoneCSS selectors covered by screenshot masks.
maskColorstringNoneMask color.
stylestringNoneTemporary screenshot-only CSS.
waitForstringNoneCSS selector to wait for before capture.
timeoutnumber30000Total operation timeout in milliseconds.
proxystringNoneProxy URL for the ephemeral browser.
policyBrowserNavigationPolicyClient-level policy, if configuredBrowser navigation policy for capture.
ScreenshotResponse:
FieldDescription
urlFinal URL.
dataBase64-encoded image data.
formatImage format.
widthImage width.
heightImage height.
elapsedMsBrowser-side elapsed time.
artifactSensitivity and export metadata.
tipsBrowser policy tips.
_metaQuick-action metadata.

web.pdf()

web.pdf(options: PdfOptions): Promise<PdfResponse>
const pdf = await web.pdf({
  url: "https://example.com/report",
  format: "Letter",
  landscape: false,
});
PdfOptions:
FieldTypeDefaultDescription
urlstringRequiredURL to render.
format"A4" | "Letter" | "A3" | "Tabloid" | "Ledger" | "Legal"A4Paper size.
landscapebooleanfalseUse landscape orientation.
printBackgroundbooleantruePrint background graphics.
waitForstringNoneCSS selector to wait for before PDF generation.
timeoutnumber30000Total operation timeout in milliseconds.
proxystringNoneProxy URL for the ephemeral browser.
policyBrowserNavigationPolicyClient-level policy, if configuredBrowser navigation policy for rendering.
PdfResponse:
FieldDescription
urlFinal URL.
dataBase64-encoded PDF data.
pagesPage count.
elapsedMsBrowser-side elapsed time.
tipsBrowser policy tips.
_metaQuick-action metadata.

Proxy example

const result = await web.scrape({
  url: "https://example.com",
  proxy: process.env.RESIDENTIAL_PROXY_URL,
});
Proxy credentials can appear inside URLs. Keep proxy URLs in environment variables and avoid logging request objects directly.