Skip to content
Start here

Browser Rendering

Browser RenderingContent

Get HTML content.
client.browserRendering.content.create(ContentCreateParamsparams, RequestOptionsoptions?): ContentCreateResponse
POST/accounts/{account_id}/browser-rendering/content
ModelsExpand Collapse
ContentCreateResponse = string

HTML content.

Browser RenderingPDF

Get PDF.
client.browserRendering.pdf.create(PDFCreateParamsparams, RequestOptionsoptions?): Response
POST/accounts/{account_id}/browser-rendering/pdf

Browser RenderingScrape

Scrape elements.
client.browserRendering.scrape.create(ScrapeCreateParamsparams, RequestOptionsoptions?): ScrapeCreateResponse { results, selector }
POST/accounts/{account_id}/browser-rendering/scrape
ModelsExpand Collapse
ScrapeCreateResponse = Array<ScrapeCreateResponseItem>
results: Results { attributes, height, html, 4 more }
attributes: Array<Attribute>
name: string

Attribute name.

value: string

Attribute value.

height: number

Element height.

html: string

HTML content.

left: number

Element left.

text: string

Text content.

top: number

Element top.

width: number

Element width.

selector: string

Selector.

Browser RenderingScreenshot

Get screenshot.
client.browserRendering.screenshot.create(ScreenshotCreateParamsparams, RequestOptionsoptions?): ScreenshotCreateResponse { success, errors }
POST/accounts/{account_id}/browser-rendering/screenshot
ModelsExpand Collapse
ScreenshotCreateResponse { success, errors }
success: boolean

Response status.

errors?: Array<Error>
code: number

Error code.

message: string

Error message.

Browser RenderingSnapshot

Get HTML content and screenshot.
client.browserRendering.snapshot.create(SnapshotCreateParamsparams, RequestOptionsoptions?): SnapshotCreateResponse { content, screenshot }
POST/accounts/{account_id}/browser-rendering/snapshot
ModelsExpand Collapse
SnapshotCreateResponse { content, screenshot }
content: string

HTML content.

screenshot: string

Base64 encoded image.

Browser RenderingJson

Get json.
client.browserRendering.json.create(JsonCreateParamsparams, RequestOptionsoptions?): JsonCreateResponse
POST/accounts/{account_id}/browser-rendering/json
ModelsExpand Collapse
JsonCreateResponse = Record<string, unknown>
Get Links.
client.browserRendering.links.create(LinkCreateParamsparams, RequestOptionsoptions?): LinkCreateResponse
POST/accounts/{account_id}/browser-rendering/links
ModelsExpand Collapse

Browser RenderingMarkdown

Get markdown.
client.browserRendering.markdown.create(MarkdownCreateParamsparams, RequestOptionsoptions?): MarkdownCreateResponse
POST/accounts/{account_id}/browser-rendering/markdown
ModelsExpand Collapse
MarkdownCreateResponse = string

Markdown content.

Browser RenderingCrawl

Crawl websites.
client.browserRendering.crawl.create(CrawlCreateParamsparams, RequestOptionsoptions?): CrawlCreateResponse
POST/accounts/{account_id}/browser-rendering/crawl
Get crawl result.
client.browserRendering.crawl.get(stringjobId, CrawlGetParams { account_id, cacheTTL, cursor, 2 more } params?, RequestOptionsoptions?): CrawlGetResponse { id, browserSecondsUsed, finished, 5 more }
GET/accounts/{account_id}/browser-rendering/crawl/{job_id}
Cancel a crawl job.
client.browserRendering.crawl.delete(stringjobId, CrawlDeleteParams { account_id } params?, RequestOptionsoptions?): CrawlDeleteResponse { job_id, message }
DELETE/accounts/{account_id}/browser-rendering/crawl/{job_id}
ModelsExpand Collapse
CrawlCreateResponse = string

Crawl job ID.

CrawlGetResponse { id, browserSecondsUsed, finished, 5 more }
id: string

Crawl job ID.

browserSecondsUsed: number

Total seconds spent in browser so far.

finished: number

Total number of URLs that have been crawled so far.

records: Array<Record>

List of crawl job records.

metadata: Metadata { status, url, title }
status: number

HTTP status code of the crawled page.

url: string

Final URL of the crawled page.

title?: string

Title of the crawled page.

status: "queued" | "errored" | "completed" | 3 more

Current status of the crawled URL.

One of the following:
"queued"
"errored"
"completed"
"disallowed"
"skipped"
"cancelled"
url: string

Crawled URL.

html?: string

HTML content of the crawled URL.

json?: Record<string, unknown>

JSON of the content of the crawled URL.

markdown?: string

Markdown of the content of the crawled URL.

skipped: number

Total number of URLs that were skipped due to include/exclude/subdomain filters. Skipped URLs are included in records but are not counted toward total/finished.

status: string

Current crawl job status.

total: number

Total current number of URLs in the crawl job.

cursor?: string

Cursor for pagination.

CrawlDeleteResponse { job_id, message }
job_id: string

The ID of the cancelled job.

message: string

Cancellation confirmation message.

Browser RenderingDevtools

Browser RenderingDevtoolsSession

List sessions.
client.browserRendering.devtools.session.list(SessionListParams { account_id, limit, offset } params?, RequestOptionsoptions?): SessionListResponse { sessionId, closeReason, closeReasonText, 8 more }
GET/accounts/{account_id}/browser-rendering/devtools/session
Get session details.
client.browserRendering.devtools.session.get(stringsessionId, SessionGetParams { account_id } params?, RequestOptionsoptions?): SessionGetResponse { sessionId, closeReason, closeReasonText, 8 more } | null
GET/accounts/{account_id}/browser-rendering/devtools/session/{session_id}
ModelsExpand Collapse
SessionListResponse = Array<SessionListResponseItem>
sessionId: string

Session ID.

formatuuid
closeReason?: string

Reason for session closure.

closeReasonText?: string

Human-readable close reason.

connectionEndTime?: number

Connection end time.

connectionId?: string

Connection ID.

connectionStartTime?: number

Connection start time.

devtoolsFrontendUrl?: string

DevTools frontend URL.

endTime?: number

Session end time.

lastUpdated?: number

Last updated timestamp.

startTime?: number

Session start time.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

SessionGetResponse { sessionId, closeReason, closeReasonText, 8 more }
sessionId: string

Session ID.

formatuuid
closeReason?: string

Reason for session closure.

closeReasonText?: string

Human-readable close reason.

connectionEndTime?: number

Connection end time.

connectionId?: string

Connection ID.

connectionStartTime?: number

Connection start time.

devtoolsFrontendUrl?: string

DevTools frontend URL.

endTime?: number

Session end time.

lastUpdated?: number

Last updated timestamp.

startTime?: number

Session start time.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

Browser RenderingDevtoolsBrowser

Get a browser session ID.
client.browserRendering.devtools.browser.create(BrowserCreateParams { account_id, keep_alive, lab, 2 more } params?, RequestOptionsoptions?): BrowserCreateResponse { sessionId, webSocketDebuggerUrl }
POST/accounts/{account_id}/browser-rendering/devtools/browser
Acquire and connect to browser session.
client.browserRendering.devtools.browser.launch(BrowserLaunchParams { account_id, keep_alive, lab, recording } params?, RequestOptionsoptions?): void
GET/accounts/{account_id}/browser-rendering/devtools/browser
Connect to browser session.
client.browserRendering.devtools.browser.connect(stringsessionId, BrowserConnectParams { account_id, keep_alive, lab, recording } params?, RequestOptionsoptions?): void
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}
Close browser session.
client.browserRendering.devtools.browser.delete(stringsessionId, BrowserDeleteParams { account_id } params?, RequestOptionsoptions?): BrowserDeleteResponse { status }
DELETE/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}
Get browser version metadata.
client.browserRendering.devtools.browser.version(stringsessionId, BrowserVersionParams { account_id } params?, RequestOptionsoptions?): BrowserVersionResponse { Browser, Protocol-Version, User-Agent, 3 more }
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/version
Get Chrome DevTools Protocol schema.
client.browserRendering.devtools.browser.protocol(stringsessionId, BrowserProtocolParams { account_id } params?, RequestOptionsoptions?): BrowserProtocolResponse { domains, version }
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/protocol
ModelsExpand Collapse
BrowserCreateResponse { sessionId, webSocketDebuggerUrl }
sessionId: string

Browser session ID.

webSocketDebuggerUrl?: string

WebSocket URL for the session.

BrowserDeleteResponse { status }
status: "closing" | "closed"
One of the following:
"closing"
"closed"
BrowserVersionResponse { Browser, Protocol-Version, User-Agent, 3 more }
Browser: string

Browser name and version.

"Protocol-Version": string

Chrome DevTools Protocol version.

"User-Agent": string

User agent string.

"V8-Version": string

V8 JavaScript engine version.

"WebKit-Version": string

WebKit version.

webSocketDebuggerUrl: string

WebSocket URL for debugging the browser.

BrowserProtocolResponse { domains, version }
domains: Array<Domain>

List of protocol domains.

domain: string

Domain name.

commands?: Array<Record<string, unknown>>

Available commands.

dependencies?: Array<string>

Domain dependencies.

events?: Array<Record<string, unknown>>

Available events.

experimental?: boolean

Whether this domain is experimental.

types?: Array<Record<string, unknown>>

Type definitions.

version?: Version { major, minor }

Protocol version.

major: string

Major version.

minor: string

Minor version.

Browser RenderingDevtoolsBrowserPage

Connect to a specific Chrome DevTools page.
client.browserRendering.devtools.browser.page.get(stringsessionId, stringtargetId, PageGetParams { account_id } params?, RequestOptionsoptions?): void
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/page/{target_id}

Browser RenderingDevtoolsBrowserTargets

Open a new browser tab.
client.browserRendering.devtools.browser.targets.create(stringsessionId, TargetCreateParams { account_id, url } params?, RequestOptionsoptions?): TargetCreateResponse { id, type, url, 4 more }
PUT/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/new
List targets.
client.browserRendering.devtools.browser.targets.list(stringsessionId, TargetListParams { account_id } params?, RequestOptionsoptions?): TargetListResponse { id, type, url, 4 more }
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/list
Get a target by ID.
client.browserRendering.devtools.browser.targets.get(stringsessionId, stringtargetId, TargetGetParams { account_id } params?, RequestOptionsoptions?): TargetGetResponse { id, type, url, 4 more }
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/list/{target_id}
Activate a browser target.
client.browserRendering.devtools.browser.targets.activate(stringsessionId, stringtargetId, TargetActivateParams { account_id } params?, RequestOptionsoptions?): TargetActivateResponse { message }
GET/accounts/{account_id}/browser-rendering/devtools/browser/{session_id}/json/activate/{target_id}
ModelsExpand Collapse
TargetCreateResponse { id, type, url, 4 more }
id: string

Target ID.

type: string

Target type (page, background_page, worker, etc.).

url: string

URL of the target.

description?: string

Target description.

devtoolsFrontendUrl?: string

DevTools frontend URL.

title?: string

Title of the target.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

TargetListResponse = Array<TargetListResponseItem>
id: string

Target ID.

type: string

Target type (page, background_page, worker, etc.).

url: string

URL of the target.

description?: string

Target description.

devtoolsFrontendUrl?: string

DevTools frontend URL.

title?: string

Title of the target.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

TargetGetResponse { id, type, url, 4 more }
id: string

Target ID.

type: string

Target type (page, background_page, worker, etc.).

url: string

URL of the target.

description?: string

Target description.

devtoolsFrontendUrl?: string

DevTools frontend URL.

title?: string

Title of the target.

webSocketDebuggerUrl?: string

WebSocket URL for debugging this target.

TargetActivateResponse { message }
message: string

Target activated.