Fetch loads a URL in a cloud browser and returns the outputs you specify—markdown, HTML, links, screenshots, structured JSON, or a branding profile. It’s the core building block for web scraping with Hyperbrowser.Documentation Index
Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
For the full API schema, see the Fetch API Reference.
Quick Start
Response
The response includes ajobId, overall status, and the outputs under data:
Outputs
Useoutputs.formats to specify what data you want returned.
| Output | Description |
|---|---|
markdown | Page content converted to Markdown |
html | Raw HTML of the page |
links | All links found on the page |
screenshot | Screenshot image (configure with options) |
json | Structured data extracted using a JSON Schema, a prompt, or both |
branding | Visual brand profile—colors, fonts, logo, button styles, personality |
outputs.formats cannot contain duplicate output types (e.g. two screenshots).Screenshot with options
Screenshot with options
Structured JSON extraction
Structured JSON extraction
Extract structured data from the page using Schema only:Both prompt and schema (recommended):
prompt, schema, or both:promptonly — Describe what you want in natural language. A schema is auto-generated from the prompt.schemaonly — Provide a JSON Schema (or Zod/Pydantic equivalent) defining the exact output structure.promptandschema— The schema defines the output structure, while the prompt provides additional guidance for the extraction.
Node SDK: You can pass a Zod schema directly to the
schema field, and it will be automatically converted to JSON Schema.Python SDK: You can pass a Pydantic model class directly to the schema field, and it will be automatically converted to JSON Schema.Branding profile
Branding profile
Extract a structured brand profile for the page: color roles (primary, secondary, accent, background, text), typography, logo + favicon, primary/secondary button styles, personality, and confidence scores. Combines in-browser DOM analysis with an LLM pass over the detected elements.The response
data.branding object includes:| Field | Description |
|---|---|
colorScheme | "light" or "dark" |
colors | primary, secondary, accent, background, textPrimary, … |
fonts | Cleaned brand fonts with roles (heading, body, monospace, …) |
typography | fontFamilies, fontStacks, fontSizes |
spacing | baseUnit, borderRadius |
components | buttonPrimary, buttonSecondary, input — full CSS style objects |
images | logo, logoHref, logoAlt, favicon, ogImage |
personality | tone, energy, targetAudience |
designSystem | framework (tailwind, bootstrap, …), componentLibrary |
confidence | buttons, colors, overall (0–1) |
Branding works identically in Crawl — each crawled page gets its own
branding profile.Output Controls
Control what gets extracted and returned:| Field | Type | Default | Description |
|---|---|---|---|
outputs.sanitize | string | "none" | Sanitize mode: "none", "basic", or "advanced" |
outputs.includeSelectors | string[] | [] | CSS selectors to include (only matching elements returned) |
outputs.excludeSelectors | string[] | [] | CSS selectors to exclude from output |
outputs.storageState | object | — | Pre-seed localStorage/sessionStorage before fetching |
Example with selectors, storageState, navigation, and cache
Example with selectors, storageState, navigation, and cache
Browser & Stealth
Configure how the cloud browser runs:| Field | Type | Default | Description |
|---|---|---|---|
stealth | string | "auto" | Stealth mode: "none", "auto", or "ultra" (recommended: "auto" or "ultra") |
browser.profileId | string | — | Reuse an existing browser profile |
browser.solveCaptchas | boolean | false | Enable CAPTCHA solving |
browser.screen | object | { width: 1280, height: 720 } | Set viewport dimensions (width, height) |
browser.location | object | — | Localize via proxy location (country, state, city). If set, proxy is enabled automatically |
Navigation Controls
Control page load behavior and timing:| Field | Type | Default | Description |
|---|---|---|---|
navigation.waitUntil | string | "domcontentloaded" | Load condition: "load", "domcontentloaded", or "networkidle" |
navigation.waitFor | number | 0 | Milliseconds to wait after navigation completes before collecting outputs (0–30000) |
navigation.timeoutMs | number | 30000 | Max time (ms) to wait for navigation (1–60000) |
Cache Controls
Control caching behavior for fetch results:| Field | Type | Default | Description |
|---|---|---|---|
cache.maxAgeSeconds | number | — | Cache control—cached results older than this are treated as stale. Set to 0 to bypass cache reads |
Using cache can improve response times for frequently accessed pages. Set
maxAgeSeconds based on how fresh you need the data to be.