> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# cloudflare-browser-run

> Cloudflare Browser Run

**Server path:** `/cloudflare-browser-run` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                      | Description                             |
| ----------------------------------------------------------------------------------------- | --------------------------------------- |
| [`cloudflare_browser_run_capture_screenshot`](#cloudflare_browser_run_capture_screenshot) | Capture a screenshot                    |
| [`cloudflare_browser_run_crawl_pages`](#cloudflare_browser_run_crawl_pages)               | Crawl web content across multiple pages |
| [`cloudflare_browser_run_extract_json`](#cloudflare_browser_run_extract_json)             | Extract structured data using AI        |
| [`cloudflare_browser_run_extract_links`](#cloudflare_browser_run_extract_links)           | Extract all links from a page           |
| [`cloudflare_browser_run_extract_markdown`](#cloudflare_browser_run_extract_markdown)     | Extract page content as Markdown        |
| [`cloudflare_browser_run_fetch_content`](#cloudflare_browser_run_fetch_content)           | Fetch rendered HTML content             |
| [`cloudflare_browser_run_render_pdf`](#cloudflare_browser_run_render_pdf)                 | Render page as PDF                      |
| [`cloudflare_browser_run_scrape_elements`](#cloudflare_browser_run_scrape_elements)       | Scrape HTML elements                    |
| [`cloudflare_browser_run_take_snapshot`](#cloudflare_browser_run_take_snapshot)           | Take a full page snapshot               |

***

## cloudflare\_browser\_run\_capture\_screenshot

Capture a screenshot

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `screenshotOptions`    | object    | No       | —       | Options for screenshot capture.                                                             |
| `scrollPage`           | boolean   | No       | —       | Auto-scroll the page during capture to ensure all lazy-loaded content is visible.           |
| `selector`             | string    | No       | —       | CSS selector of a specific element to capture instead of the full page.                     |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "screenshotOptions": {
        "type": "object",
        "description": "Options for screenshot capture.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Image format. Default is png.",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ]
          },
          "encoding": {
            "type": "string",
            "description": "Image encoding format.",
            "enum": [
              "binary",
              "base64"
            ]
          },
          "quality": {
            "type": "number",
            "description": "Image quality (0-100). Only applicable for jpeg and webp formats."
          },
          "fullPage": {
            "type": "boolean",
            "description": "Capture the entire scrollable page, not just the viewport."
          },
          "captureBeyondViewport": {
            "type": "boolean",
            "description": "Capture content beyond the viewport boundaries."
          },
          "clip": {
            "type": "object",
            "description": "Specific region of the page to capture."
          },
          "omitBackground": {
            "type": "boolean",
            "description": "Hide the default white background to capture with transparency."
          },
          "optimizeForSpeed": {
            "type": "boolean",
            "description": "Optimize for speed over quality."
          },
          "fromSurface": {
            "type": "boolean",
            "description": "Capture from the surface rather than the view."
          }
        }
      },
      "scrollPage": {
        "type": "boolean",
        "description": "Auto-scroll the page during capture to ensure all lazy-loaded content is visible."
      },
      "selector": {
        "type": "string",
        "description": "CSS selector of a specific element to capture instead of the full page."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_crawl\_pages

Crawl web content across multiple pages

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `excludePatterns`      | string\[] | No       | —       | URL regex patterns to exclude from the crawl.                                               |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `includePatterns`      | string\[] | No       | —       | URL regex patterns to include in the crawl.                                                 |
| `prompt`               | string    | No       | —       | Natural language instruction describing what data to extract from each crawled page.        |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `schema`               | object    | No       | —       | JSON schema defining the expected structure of extracted data from each page.               |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "excludePatterns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "URL regex patterns to exclude from the crawl."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "includePatterns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "URL regex patterns to include in the crawl."
      },
      "prompt": {
        "type": "string",
        "description": "Natural language instruction describing what data to extract from each crawled page."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "schema": {
        "type": "object",
        "description": "JSON schema defining the expected structure of extracted data from each page."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_extract\_json

Extract structured data using AI

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `prompt`               | string    | No       | —       | Natural language instruction describing what data to extract from the page.                 |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `schema`               | object    | No       | —       | JSON schema defining the expected structure of the extracted data.                          |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "prompt": {
        "type": "string",
        "description": "Natural language instruction describing what data to extract from the page."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "schema": {
        "type": "object",
        "description": "JSON schema defining the expected structure of the extracted data."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_extract\_links

Extract all links from a page

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_extract\_markdown

Extract page content as Markdown

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_fetch\_content

Fetch rendered HTML content

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_render\_pdf

Render page as PDF

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `pdfOptions`           | object    | No       | —       | Options for PDF generation.                                                                 |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "pdfOptions": {
        "type": "object",
        "description": "Options for PDF generation.",
        "properties": {
          "format": {
            "type": "string",
            "description": "Paper format. Default is letter.",
            "enum": [
              "letter",
              "legal",
              "tabloid",
              "ledger",
              "a0",
              "a1",
              "a2",
              "a3",
              "a4",
              "a5",
              "a6"
            ]
          },
          "width": {
            "type": "string",
            "description": "Paper width (e.g., '8.5in'). Overrides format."
          },
          "height": {
            "type": "string",
            "description": "Paper height (e.g., '11in'). Overrides format."
          },
          "margin": {
            "type": "object",
            "description": "Paper margins."
          },
          "scale": {
            "type": "number",
            "description": "Scale of the webpage rendering (0.1 to 2.0). Default is 1."
          },
          "displayHeaderFooter": {
            "type": "boolean",
            "description": "Display header and footer."
          },
          "headerTemplate": {
            "type": "string",
            "description": "HTML template for the header. Supports special classes: date, title, url, pageNumber, totalPages."
          },
          "footerTemplate": {
            "type": "string",
            "description": "HTML template for the footer. Supports the same special classes as headerTemplate."
          },
          "printBackground": {
            "type": "boolean",
            "description": "Print background graphics."
          },
          "landscape": {
            "type": "boolean",
            "description": "Use landscape orientation."
          },
          "pageRanges": {
            "type": "string",
            "description": "Paper ranges to print (e.g., '1-5, 8, 11-13')."
          },
          "preferCSSPageSize": {
            "type": "boolean",
            "description": "Give any CSS @page size declared in the page priority over format/width/height."
          },
          "omitBackground": {
            "type": "boolean",
            "description": "Hide the default white background."
          },
          "outline": {
            "type": "boolean",
            "description": "Generate document outline (bookmarks)."
          },
          "tagged": {
            "type": "boolean",
            "description": "Generate tagged (accessible) PDF."
          },
          "timeout": {
            "type": "number",
            "description": "Timeout in milliseconds for PDF generation."
          }
        }
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_scrape\_elements

Scrape HTML elements

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `elements`             | object\[] | Yes      | —       | Array of CSS selectors to extract from the page.                                            |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "elements": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "selector": {
              "type": "string",
              "description": "CSS selector to match elements."
            }
          },
          "required": [
            "selector"
          ]
        },
        "description": "Array of CSS selectors to extract from the page."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID",
      "elements"
    ]
  }
  ```
</Expandable>

***

## cloudflare\_browser\_run\_take\_snapshot

Take a full page snapshot

**Parameters:**

| Parameter              | Type      | Required | Default | Description                                                                                 |
| ---------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `cacheTTL`             | number    | No       | —       | Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching.               |
| `actionTimeout`        | number    | No       | —       | Maximum time in milliseconds for browser actions after page load.                           |
| `addScriptTag`         | object\[] | No       | —       | Scripts to inject into the page.                                                            |
| `addStyleTag`          | object\[] | No       | —       | Stylesheets to inject into the page.                                                        |
| `allowRequestPattern`  | string\[] | No       | —       | Only allow requests matching these regex patterns.                                          |
| `allowResourceTypes`   | string\[] | No       | —       | Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch). |
| `authenticate`         | object    | No       | —       | HTTP Basic authentication credentials.                                                      |
| `bestAttempt`          | boolean   | No       | —       | If true, proceed even if awaited events (like waitForSelector) fail or timeout.             |
| `cookies`              | object\[] | No       | —       | Cookies to set before navigation.                                                           |
| `emulateMediaType`     | string    | No       | —       | CSS media type to emulate (e.g., 'screen', 'print').                                        |
| `gotoOptions`          | object    | No       | —       | Navigation options for page loading.                                                        |
| `html`                 | string    | No       | —       | Raw HTML content to render directly. Either url or html must be provided.                   |
| `rejectRequestPattern` | string\[] | No       | —       | Block requests matching these regex patterns.                                               |
| `rejectResourceTypes`  | string\[] | No       | —       | Block specific resource types (e.g., image, font, media).                                   |
| `screenshotOptions`    | object    | No       | —       | Options for screenshot capture.                                                             |
| `setExtraHTTPHeaders`  | object    | No       | —       | Additional HTTP headers to send with every request.                                         |
| `setJavaScriptEnabled` | boolean   | No       | —       | Enable or disable JavaScript execution on the page.                                         |
| `url`                  | string    | No       | —       | URL to navigate to and render. Either url or html must be provided.                         |
| `userAgent`            | string    | No       | —       | Custom user agent string to use for the browser session.                                    |
| `viewport`             | object    | No       | —       | Browser viewport dimensions and settings.                                                   |
| `waitForSelector`      | object    | No       | —       | Wait for a specific element to appear on the page before proceeding.                        |
| `waitForTimeout`       | number    | No       | —       | Delay in milliseconds to wait before proceeding after page load.                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cacheTTL": {
        "type": "number",
        "description": "Cache duration in seconds. Default is 5 seconds. Set to 0 to disable caching."
      },
      "actionTimeout": {
        "type": "number",
        "description": "Maximum time in milliseconds for browser actions after page load."
      },
      "addScriptTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the script to load."
            },
            "content": {
              "type": "string",
              "description": "Inline JavaScript content to inject."
            },
            "type": {
              "type": "string",
              "description": "Script type attribute (e.g., 'module')."
            },
            "id": {
              "type": "string",
              "description": "Script element ID."
            }
          }
        },
        "description": "Scripts to inject into the page."
      },
      "addStyleTag": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "URL of the stylesheet to load."
            },
            "content": {
              "type": "string",
              "description": "Inline CSS content to inject."
            }
          }
        },
        "description": "Stylesheets to inject into the page."
      },
      "allowRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow requests matching these regex patterns."
      },
      "allowResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Only allow specific resource types (e.g., document, stylesheet, image, script, xhr, fetch)."
      },
      "authenticate": {
        "type": "object",
        "description": "HTTP Basic authentication credentials.",
        "properties": {
          "username": {
            "type": "string",
            "description": "HTTP auth username."
          },
          "password": {
            "type": "string",
            "description": "HTTP auth password."
          }
        }
      },
      "bestAttempt": {
        "type": "boolean",
        "description": "If true, proceed even if awaited events (like waitForSelector) fail or timeout."
      },
      "cookies": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Cookie name."
            },
            "value": {
              "type": "string",
              "description": "Cookie value."
            },
            "domain": {
              "type": "string",
              "description": "Cookie domain."
            },
            "path": {
              "type": "string",
              "description": "Cookie path."
            },
            "expires": {
              "type": "number",
              "description": "Cookie expiration as Unix timestamp."
            },
            "httpOnly": {
              "type": "boolean",
              "description": "Whether the cookie is HTTP-only."
            },
            "secure": {
              "type": "boolean",
              "description": "Whether the cookie requires HTTPS."
            },
            "sameSite": {
              "type": "string",
              "enum": [
                "Strict",
                "Lax",
                "None"
              ],
              "description": "Cookie SameSite attribute."
            }
          },
          "required": [
            "name",
            "value"
          ]
        },
        "description": "Cookies to set before navigation."
      },
      "emulateMediaType": {
        "type": "string",
        "description": "CSS media type to emulate (e.g., 'screen', 'print')."
      },
      "gotoOptions": {
        "type": "object",
        "description": "Navigation options for page loading.",
        "properties": {
          "timeout": {
            "type": "number",
            "description": "Maximum navigation time in milliseconds."
          },
          "waitUntil": {
            "type": "string",
            "description": "When to consider navigation succeeded. Values: load, domcontentloaded, networkidle0, networkidle2.",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle0",
              "networkidle2"
            ]
          },
          "referer": {
            "type": "string",
            "description": "Referer header value."
          },
          "referrerPolicy": {
            "type": "string",
            "description": "Referrer policy for the navigation."
          }
        }
      },
      "html": {
        "type": "string",
        "description": "Raw HTML content to render directly. Either url or html must be provided."
      },
      "rejectRequestPattern": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block requests matching these regex patterns."
      },
      "rejectResourceTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Block specific resource types (e.g., image, font, media)."
      },
      "screenshotOptions": {
        "type": "object",
        "description": "Options for screenshot capture.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Image format. Default is png.",
            "enum": [
              "png",
              "jpeg",
              "webp"
            ]
          },
          "encoding": {
            "type": "string",
            "description": "Image encoding format.",
            "enum": [
              "binary",
              "base64"
            ]
          },
          "quality": {
            "type": "number",
            "description": "Image quality (0-100). Only applicable for jpeg and webp formats."
          },
          "fullPage": {
            "type": "boolean",
            "description": "Capture the entire scrollable page, not just the viewport."
          },
          "captureBeyondViewport": {
            "type": "boolean",
            "description": "Capture content beyond the viewport boundaries."
          },
          "clip": {
            "type": "object",
            "description": "Specific region of the page to capture."
          },
          "omitBackground": {
            "type": "boolean",
            "description": "Hide the default white background to capture with transparency."
          },
          "optimizeForSpeed": {
            "type": "boolean",
            "description": "Optimize for speed over quality."
          },
          "fromSurface": {
            "type": "boolean",
            "description": "Capture from the surface rather than the view."
          }
        }
      },
      "setExtraHTTPHeaders": {
        "type": "object",
        "description": "Additional HTTP headers to send with every request."
      },
      "setJavaScriptEnabled": {
        "type": "boolean",
        "description": "Enable or disable JavaScript execution on the page."
      },
      "url": {
        "type": "string",
        "description": "URL to navigate to and render. Either url or html must be provided."
      },
      "userAgent": {
        "type": "string",
        "description": "Custom user agent string to use for the browser session."
      },
      "viewport": {
        "type": "object",
        "description": "Browser viewport dimensions and settings.",
        "properties": {
          "width": {
            "type": "number",
            "description": "Viewport width in pixels."
          },
          "height": {
            "type": "number",
            "description": "Viewport height in pixels."
          },
          "deviceScaleFactor": {
            "type": "number",
            "description": "Device scale factor (DPI). Default is 1."
          },
          "hasTouch": {
            "type": "boolean",
            "description": "Whether the viewport supports touch events."
          },
          "isLandscape": {
            "type": "boolean",
            "description": "Whether the viewport is in landscape orientation."
          },
          "isMobile": {
            "type": "boolean",
            "description": "Whether the viewport emulates a mobile device."
          }
        }
      },
      "waitForSelector": {
        "type": "object",
        "description": "Wait for a specific element to appear on the page before proceeding.",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector to wait for."
          },
          "timeout": {
            "type": "number",
            "description": "Maximum wait time in milliseconds."
          },
          "visible": {
            "type": "boolean",
            "description": "Wait for the element to be visible."
          },
          "hidden": {
            "type": "boolean",
            "description": "Wait for the element to be hidden."
          }
        }
      },
      "waitForTimeout": {
        "type": "number",
        "description": "Delay in milliseconds to wait before proceeding after page load."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>
