> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Browserless

> Browserless is a service that provides headless browser automation, allowing users to run automations on their own sites with browser infrastructure.

![Browserless logo](https://mintcdn.com/composio-preview/PudKL42NVsy5O-ND/images/toolkits/browserless.svg?fit=max\&auto=format\&n=PudKL42NVsy5O-ND\&q=85\&s=871564eb5611521464f9e3ca24e7c350)

* **Category:** web scraping & browser
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 7
* **Triggers:** 0
* **Slug:** `BROWSERLESS`
* **Version:** 20261101\_00

## Tools

> [accordion] Download file using Puppeteer script
>
> **Slug:** `BROWSERLESS_DOWNLOAD_FILE`
>
> Runs a Puppeteer script through Browserless's download API and returns the response body as base64, with a content type and filename.
>
> #### Input Parameters
>
> **code** `string` *required*
>
> The Puppeteer script to execute for downloading the file. This should be a valid JavaScript code that triggers a file download.
>
> **context** `object`
>
> Additional context data to be passed to the script
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Execute Custom Function
>
> **Slug:** `BROWSERLESS_EXECUTE_CUSTOM_FUNCTION`
>
> A tool that allows executing custom Puppeteer scripts via HTTP requests. This endpoint enables users to run browser automation tasks without managing their own infrastructure.
>
> #### Input Parameters
>
> **code** `string` *required*
>
> The Puppeteer function code to execute. Must be a valid ESM module with a default export function.
>
> **context** `object`
>
> Optional context object to pass to the function. Supports any JSON-serializable nested data.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Fetch HTML Content
>
> **Slug:** `BROWSERLESS_FETCH_HTML_CONTENT`
>
> This tool fetches the complete HTML content of a webpage using Browserless's content API. It's designed to retrieve the full HTML contents of any website, including dynamically generated content.
>
> #### Input Parameters
>
> **url** `string` *required*
>
> The URL of the webpage to fetch HTML content from
>
> **best\_attempt** `boolean`
>
> Whether to continue on error
>
> **goto\_options** `object`
>
> Navigation options like waitUntil
>
> **wait\_for\_event** `object`
>
> Wait for specific event with optional timeout
>
> **wait\_for\_timeout** `integer`
>
> Wait for specific time in milliseconds
>
> **wait\_for\_selector** `object`
>
> Wait for specific element with optional timeout
>
> **reject\_resource\_types** `array`
>
> Types of resources to block (e.g., images, stylesheets)
>
> **reject\_request\_pattern** `array`
>
> Patterns to block specific requests
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Generate PDF from webpage
>
> **Slug:** `BROWSERLESS_GENERATE_PDF`
>
> Generates a PDF from a webpage URL or HTML using Browserless. Options include paper format, navigation wait conditions, and waiting for a page element; the resulting PDF data is returned as a base64-encoded string.
>
> #### Input Parameters
>
> **url** `string`
>
> URL of the webpage to generate PDF from
>
> **html** `string`
>
> HTML content to generate PDF from
>
> **options** `object`
>
> PDF generation options based on Puppeteer's PDFOptions.
>
> **addStyleTag** `array`
>
> Custom style tags to inject
>
> **bestAttempt** `boolean`
>
> Continue on error
>
> **gotoOptions** `object`
>
> Navigation options for page loading.
>
> **addScriptTag** `array`
>
> Custom script tags to inject
>
> **waitForSelector** `object`
>
> Options for waiting for a selector to appear.
>
> **rejectResourceTypes** `array`
>
> Resource types to block
>
> **rejectRequestPattern** `array`
>
> Request patterns to block
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Scrape webpage content using CSS selectors
>
> **Slug:** `BROWSERLESS_SCRAPE_CONTENT`
>
> A tool to extract structured content from a webpage by specifying CSS selectors. The tool navigates to the specified URL, waits for the page to load (including parsing and executing JavaScript), and returns the selected elements in a structured JSON format.
>
> #### Input Parameters
>
> **url** `string` *required*
>
> The URL to scrape content from
>
> **elements** `array` *required*
>
> Array of objects containing CSS selectors to extract
>
> **gotoOptions** `object`
>
> Options for page navigation
>
> **waitForEvent** `object`
>
> Wait for a specific event to occur
>
> **waitForTimeout** `integer`
>
> Wait specified milliseconds before scraping
>
> **waitForFunction** `object`
>
> Wait for a custom JavaScript function to return true
>
> **waitForSelector** `object`
>
> Wait for a specific selector to appear
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Take Screenshot
>
> **Slug:** `BROWSERLESS_TAKE_SCREENSHOT`
>
> A tool that captures a screenshot of a webpage using browserless's screenshot API. The tool takes a URL and returns either a PNG or JPEG image. It includes options for full page capture, image type, quality, and clipping coordinates.
>
> #### Input Parameters
>
> **url** `string` *required*
>
> The URL of the webpage to capture
>
> **clip\_x** `integer`
>
> X coordinate for clipping the screenshot
>
> **clip\_y** `integer`
>
> Y coordinate for clipping the screenshot
>
> **quality** `integer`
>
> The quality of the image (0-100, only applies to jpeg)
>
> **full\_page** `boolean`
>
> Whether to capture the full page or just the viewport
>
> **clip\_width** `integer`
>
> Width of the clipping area
>
> **image\_type** `string ("png" | "jpeg")`
>
> The type of image to return (png or jpeg)
>
> **clip\_height** `integer`
>
> Height of the clipping area
>
> **omit\_background** `boolean`
>
> Whether to omit the background in the screenshot
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Unblock Protected Content
>
> **Slug:** `BROWSERLESS_UNBLOCK_PROTECTED_CONTENT`
>
> Requests protected webpage content through Browserless's unblock API, with optional waiting conditions. It can also request cookies, a screenshot, or a browser WebSocket endpoint.
>
> #### Input Parameters
>
> **ttl** `integer`
>
> Time to live for the browser instance in milliseconds
>
> **url** `string` *required*
>
> The URL of the protected webpage to access
>
> **content** `boolean`
>
> Whether to return the HTML content of the page
>
> **cookies** `boolean`
>
> Whether to return cookies from the page
>
> **screenshot** `boolean`
>
> Whether to return a screenshot of the page
>
> **waitForEvent** `object`
>
> Event to wait for before returning the response
>
> **waitForFunction** `object`
>
> Function to execute and wait for before returning the response
>
> **waitForSelector** `object`
>
> Selector to wait for before returning the response
>
> **browserWSEndpoint** `boolean`
>
> Whether to return a WebSocket endpoint for browser automation
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
