For AI agents: a documentation index is available at /llms.txt
Skip to main content

BQL Generated Type Reference

Classes

ClassDescription
BrowserManages BAP pages connected to a Browserless BrowserQL endpoint.
BrowserlessEntry point for creating BAP browser sessions backed by Browserless BrowserQL.
BrowserQLErrorRaised when the BrowserQL server returns GraphQL errors.
ConnectionErrorRaised when the WebSocket connection fails, drops, or is unavailable.
ElementHandleA handle to a matched element.
EventEmitterMinimal typed event emitter backing the puppeteer-style Page event API.
Page-
TimeoutErrorRaised when an operation exceeds its timeout.
Transport-
WebSocketTransportThe built-in ConnectionTransport: a WebSocket via #platform (native in the browser, ws in Node so the User-Agent header can be sent). This is what the library uses whenever no custom transport is supplied — connecting to a WebSocket URL goes through WebSocketTransport.create, which negotiates the SUBPROTOCOL subprotocol.

Functions

FunctionDescription
buildOperationBuilds a parameterized GraphQL mutation document and its accompanying variables payload. Argument values are passed as GraphQL variables rather than interpolated into the query string, which lets the server coerce and validate them by type (including enums and input objects) and keeps the operation document constant across calls.

Interfaces

InterfaceDescription
AddScriptTagOptions-
AddScriptTagResponseResponse returned after injecting a script tag
AddStyleTagOptions-
AddStyleTagResponseResponse returned after injecting a style tag
Attribute-
AuthenticateOptions-
CaptchaResponseResponse returned after a captcha has been solved
CheckboxOptions-
CleanInputOptions for cleaning up the DOM prior to exporting its content. Many options are available, and this query can destructively remove non-text DOM nodes, DOM attributes, and gratuitous whitespace characters. Since these operations are destructive in their nature it's recommended to run them at the very end of your query in order to preserve page functionality
ClickOptions-
ClickResponseResponse returned after having clicked on an element
ConnectionTransportA user-suppliable transport, modeled on puppeteer's ConnectionTransport. Pass one via ConnectOptions.transport to send BrowserQL frames over your own channel instead of the built-in WebSocket. The frames it relays are graphql-transport-ws envelopes (SUBPROTOCOL) — the transport is just the pipe, Transport does the framing on top.
ConnectOptions-
ConsoleMessageA console message emitted by the page. Mirrors puppeteer's ConsoleMessage, sourced from CDP Runtime.consoleAPICalled and Runtime.exceptionThrown.
ConsoleMessageLocationThe source location a console message originated from.
CookieInputThe cookie to be sent to the page
CookiePartitionKeyInput-
CookieResponseThe response returned after setting or getting cookies
DefaultResponseDefault response for all methods
EmulateMediaTypeOptions-
EmulateMediaTypeResponseResponse returned after emulating a CSS media type
EvaluateOptions-
EvaluateResponseResponse returned after evaluating a script
FulfillOptions-
FulfillResponseResponse returned after registering a request-fulfillment interceptor
GotoOptions-
HeaderInputA HTTP header input type
HoverOptions-
HoverResponseResponse returned after having hovered over an element
HTMLOptions-
HTMLResourcePathInputA resource URL and its replacement archive path when rewriting HTML for export.
HTMLResponseHTML content of a page
HTMLRewriteInputOptions for rewriting page resource URLs before returning HTML.
HTTPHeadersAn object representing the header's name and underlying value
HTTPHeadersResponseThe response returned after setting HTTP headers
HTTPResponseResponse returned after a navigation event
JavaScriptEnabledOptions-
JavaScriptResponseThe response returned after enabling or disabling JavaScript on the page
LiveURLOptions-
LiveURLResponseThe response from the Live-URL query
LoadSecretOptions-
LoadSecretResponseResponse returned after attempting to fill a credential resolved from a 1Password integration. The resolved value is never included in the response.
MapSelectorOptions-
MapSelectorResponseResponse returned from a Map Selector
MarkdownOptions-
MarkdownResponseResponse returned after converting the page content to Markdown
NavigationOptions-
PageEventMapMaps each Page event name to the payload delivered to its listeners. Backed by a GraphQL subscription that is opened lazily on first listen.
PDFOptions-
PDFResponseThe response returned after generating a PDF
PreferencesOptions-
ProxyOptions-
ProxyResponseResponse returned after setting up the proxy patterns
QuerySelectorOptions-
QuerySelectorResponseThe response returned after querying the page for a selector
ReconnectionResponseThe response received after attempting to reconnect a BrowserQL session
ReconnectOptions-
RejectOptions-
RejectResponseThe response parameters for the reject mutation
RequestFilterOptions-
RequestHeaderAn object representing the header's name and underlying value
RequestInputThe specific request to perform a conditional action on
RequestResponseResponse returned from the request API
ResponseFilterOptions-
ResponseInputThe specific response to perform a conditional action on
ResponseResponseResponse returned from the response API
ScreenshotClipThe clipping to be applied to the screenshot
ScreenshotOptions-
ScreenshotResponseThe response returned after generating a Screenshot
ScrollOptions-
ScrollResponseResponse returned after having scrolling inside the page
SelectOptions-
SelectResponseThe response returned after selecting a value from a dropdown or multiple select element
SendOptions-
SetContentOptions-
SetCookieOptions-
SetExtraHTTPHeadersOptions-
SolveImageCaptchaOptions-
SolveOptions-
StandardCookieA standard cookie
StopSessionRecordingResponseThe response received after stopping session recording
SubscriptionSpec-
SwitchToWindowOptions-
SwitchWindowResponseResponse from window switching operation
TextOptions-
TextResponseText content of a page
TitleResponseResponse returned after the page's title has been set or get
TypeOptions-
TypeResponseResponse returned after having typed into an element
URLResponseResponse returned after the URL of the page has been set or get
UserAgentResponseThe response returned after setting the User-Agent
ViewportOptions-
ViewportResponseResponse returned after setting the viewport
WaitForEventResponse returned after having waited for an event to fire on the page
WaitForEventOptions-
WaitForFunctionResponse returned after having waited for a JavaScript predicate to become truthy
WaitForFunctionOptions-
WaitForNavigationOptions-
WaitForNetworkIdleOptions-
WaitForRequestOptions-
WaitForRequestResponseResponse returned after a particular network request has been sent
WaitForResponseOptions-
WaitForResponseResponseResponse returned after a particular network response has been received
WaitForSelectorOptions-
WaitForSelectorResponseResponse returned after a particular selector has been found in the DOM
WaitForTimeoutResponseResponse returned after having waited for a selector to appear in the DOM

References

default

Renames and re-exports Browserless

Type Aliases

Type AliasDescription
AttributeModeControls how the attributes field is interpreted in cleaning operations
CaptchaTypeThe different types of captchas that can be solved
ConsoleMessageTypeThe kind of console message, mirroring the CDP Runtime.consoleAPICalled type (and puppeteer's ConsoleMessageType). Uncaught exceptions are reported as error.
CookiePriority-
CookieSameSiteThe values a cookie's SameSite attribute can hold
CookieSourceScheme-
CountryCodeThe two-letter ISO code for the specified country
Listener-
LiveURLStreamTypeThe binary-type of the stream
MediaTypeThe CSS media type to emulate for the page
MessageListenerA raw-frame listener registered via Page.on/Page.subscribe.
MethodThe various HTTP-based methods to wait for
OperatorTypeLogical operators for APIs that have conditions
PageEventsPage events surfaced through the puppeteer-style emitter. The schema-derived PageEventMap entries (console/request/response) each open a GraphQL subscription lazily; error is emitted if opening or streaming one fails (it never throws, matching puppeteer's non-fatal emitter errors). message carries every raw frame the transport receives — including server-pushed frames with no matching operation (e.g. data over a custom ConnectionTransport); it is not subscription-backed.
PDFPageFormatThe values a pdf's Size attribute can hold
ProxyNetworkThe Browserless proxy network to route matching requests through.
ResourceTypeThe type of resource for a given network or HTTP request
ScreenshotTypeThe different types of screenshot formats
TransportFactoryBuilds a ConnectionTransport for a given endpoint URL. Supply one via ConnectOptions.transport to override the default WebSocket transport. The returned promise must resolve only once the connection is open — the library begins sending frames as soon as it resolves. This is a factory rather than a single instance because Browser.newPage invokes it per page and Transport assigns onmessage/onclose/onerror on the returned transport each time — so every page must get a fresh transport instance. Reusing one instance across pages would overwrite the earlier pages' handlers and cross-wire their frames, unless the transport itself multiplexes.
WaitForFunctionPollingBrowser-driven polling modes for waitForFunction
WaitUntilGotoOptions for when to consider the page has loaded and proceed with further execution
WaitUntilHistoryThe different stages of the browser's loading process

Variables

VariableDescription
ARG_TYPES-
RESPONSE_FIELDS-
SUBSCRIPTIONS-