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

/chrome/export

POST 

/chrome/export

Exports a webpage to a PDF or image format. This API is useful for generating reports, screenshots, or PDFs of web pages.

Request​

Query Parameters

    allowedDomains string[]
    blockAds boolean
    blockAdsInclude string
    credentials object
    externalProxyServer string
    integrationId string
    launch object
    profile string
    proxy ProxyType

    Possible values: [datacenter, residential]

    proxyCity string
    proxyCountry string
    proxyLocaleMatch string

    Possible values: [0, 1, false, true]

    proxyPreset string
    proxyState string
    proxySticky string

    Possible values: [0, 1, false, true]

    timeout number
    token string
    trackingId string

Body

    bestAttemptboolean

    When bestAttempt is set to true, browserless will attempt to proceed when "awaited" events fail or timeout. This includes things like goto, waitForSelector, and more.

    urlstringrequired

    The URL of the site you want to archive.

    gotoOptions object

    An optional goto parameter object for considering when the page is done loading.

    refererstring

    If provided, it will take preference over the referer header value set by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.

    referrerPolicystring

    If provided, it will take preference over the referer-policy header value set by {@link Page.setExtraHTTPHeaderspage.setExtraHTTPHeaders()}.

    timeoutnumber

    Maximum wait time in milliseconds. Pass 0 to disable the timeout.

    The default value can be changed by using the {@link Page.setDefaultTimeout} or {@link Page.setDefaultNavigationTimeout} methods.

    waitUntil object

    When to consider waiting succeeds. Given an array of event strings, waiting is considered to be successful after all events have been fired.

    anyOf
  • Array [
  • PuppeteerLifeCycleEvent

    Possible values: [domcontentloaded, load, networkidle0, networkidle2]

  • ]
  • signal object

    A signal object that allows you to cancel the call.

    abortedbooleanrequired
    onabort objectrequired
    anyOf
    object
    reasonrequired
    waitForEvent object

    Options for waiting for a specific event to be fired on the page.

    eventstringrequired
    timeoutnumber
    waitForFunction object

    Options for waiting for a JavaScript function to execute.

    fnstringrequired

    The function, or statement, to be evaluated in browser context

    pollingstring | number

    An interval at which the pageFunction is executed, defaults to raf. If polling is a number, then it is treated as an interval in milliseconds at which the function would be executed. If polling is a string, then it can be one of the following values: "raf" or "mutation"

    timeoutnumber

    Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.

    waitForSelector object

    Options for waiting for a specific CSS selector to appear on the page.

    hiddenboolean
    selectorstringrequired
    timeoutnumber
    visibleboolean
    waitForTimeoutnumber

    The amount of time in milliseconds to wait before proceeding.

    headers object

    An object containing additional HTTP headers to send with every request.

    property name*string
    includeResourcesboolean

    Whether to include all linked resources (images, CSS, JS) in a zip file. When true, the response will be a zip file containing the HTML and all resources. When false or not provided, the response will be the raw content (default behavior).

Responses​

Schema
    htmlstringrequired

    The HTML content of the page.

Was this page helpful?