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

# Browserbase: Fetch Page

> Fetch a web page's content, headers and metadata from its URL, optionally as markdown or structured data. Includes SDK V2 examples, schemas, and cost.

Fetch a web page's content, headers and metadata from its URL, optionally as markdown or structured data.

> [!NOTE]
>
> Tool ID: `browserbase_fetch_page`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'browserbase_fetch_page',
  {
    "url": "https://example.com/resource"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute browserbase_fetch_page --input '{
  "url": "https://example.com/resource"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "id": "id_123",
    "statusCode": 123,
    "headers": {},
    "content": "Example message",
    "contentType": "example",
    "encoding": "example"
  }
}
```

Use `deepline describe browserbase_fetch_page --json` for the latest machine-readable contract.

## Input reference

Fetch a page and return its content, headers, and metadata.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.url` | `string` | Yes | — | The URL to fetch Format: `uri`. |
| `payload.allowRedirects` | `boolean` | No | `false` | Whether to follow HTTP redirects |
| `payload.allowInsecureSsl` | `boolean` | No | `false` | Whether to bypass TLS certificate verification |
| `payload.proxies` | `boolean` | No | `false` | Whether to enable proxy support for the request |
| `payload.format` | `"raw" \| "json" \| "markdown"` | No | `"raw"` | Output format for the response content. `raw` (default) returns the response body unchanged. `json` returns structured data (requires `schema`). `markdown` returns the page as markdown. |
| `payload.schema` | `record` | No | — | JSON Schema describing the desired structure of the response. Only used when `format` is `json`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Fetch a page and return its content, headers, and metadata.",
    "properties": {
      "url": {
        "type": "string",
        "description": "The URL to fetch",
        "format": "uri"
      },
      "allowRedirects": {
        "type": "boolean",
        "description": "Whether to follow HTTP redirects",
        "default": false
      },
      "allowInsecureSsl": {
        "type": "boolean",
        "description": "Whether to bypass TLS certificate verification",
        "default": false
      },
      "proxies": {
        "type": "boolean",
        "description": "Whether to enable proxy support for the request",
        "default": false
      },
      "format": {
        "description": "Output format for the response content. `raw` (default) returns the response body unchanged; `json` returns structured data (requires `schema`); `markdown` returns the page as markdown.",
        "default": "raw",
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "raw"
            ]
          },
          {
            "type": "string",
            "enum": [
              "json"
            ]
          },
          {
            "type": "string",
            "enum": [
              "markdown"
            ]
          }
        ]
      },
      "schema": {
        "type": "object",
        "description": "JSON Schema describing the desired structure of the response. Only used when `format` is `json`.",
        "additionalProperties": {}
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | Yes | — | Unique identifier for the fetch request |
| `result.data.statusCode` | `integer` | Yes | — | HTTP status code of the fetched response |
| `result.data.headers` | `record` | Yes | — | Response headers as key-value pairs |
| `result.data.content` | `string \| record` | Yes | — | The response body content. A string for `raw` and `markdown` formats. A structured object for `json` format (the schema-extracted result). |
| `result.data.contentType` | `string` | Yes | — | The MIME type of the response |
| `result.data.encoding` | `string` | Yes | — | The character encoding of the response |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the fetch request"
          },
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code of the fetched response"
          },
          "headers": {
            "type": "object",
            "description": "Response headers as key-value pairs",
            "additionalProperties": {
              "type": "string"
            }
          },
          "content": {
            "description": "The response body content. A string for `raw` and `markdown` formats; a structured object for `json` format (the schema-extracted result).",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ]
          },
          "contentType": {
            "type": "string",
            "description": "The MIME type of the response"
          },
          "encoding": {
            "type": "string",
            "description": "The character encoding of the response"
          }
        },
        "required": [
          "id",
          "statusCode",
          "headers",
          "content",
          "contentType",
          "encoding"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.01` per pricing unit.

## Related documentation

* [Browserbase provider guide](https://deepline.com/docs/providers/browserbase/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.