Browserbase icon

Browserbase

Browser automation, web search, and page fetches with Browserbase.

Search → Fetch a Webpage

AI-generated

Summary

Fetch a webpage and return its content, format, and metadata via the Browserbase API.

Inputs

  • fetchUrl (required) — The URL to fetch.
  • format — How content is returned: Raw (upstream response body), Markdown (page converted to markdown), or JSON (structured extraction per JSON Schema).
  • schema (required) — JSON Schema for the object returned in content. Required when Format is JSON.
  • fetchOptions — Collection of fetch options including Allow Insecure SSL, Allow Redirects, Proxy City, Proxy Country, Proxy State, and Use Proxies.

Output shape

a single record containing id, url, format, statusCode, headers, content, contentType, and encoding from the Browserbase fetch response.

The Format parameter determines the content type: Raw returns the raw body, Markdown returns converted markdown, JSON returns structured extraction per the provided JSON Schema. If Format is JSON and no Schema is provided, the operation errors. Proxy Country and Proxy City routing is ignored when Proxy Country is not set.

Examples

Example 1: Fetch a public webpage as raw HTML

Set URL to the target page and leave Format as Raw; returns the body and metadata.

Example 2: Fetch and extract structured data as JSON

Set URL, Format to JSON, and provide a JSON Schema (e.g., title and summary); returns extracted content matching the schema.

Example 3: Fetch a proxied page from a specific city and country

Set URL, Format as Raw, and configure fetchOptions with Proxy Country and Proxy City; returns the fetched content via the specified proxy.

Links

Discussion