Skip to main content
A scrape returns whatever you ask for. Set the formats array on the request to pick one or more outputs; omit it and you get clean Markdown. Each format you request shows up as its own field on the response data, so you can request several at once and read them side by side.

The formats

string
default:"true"
Clean Markdown of the page’s main content, with navigation, boilerplate, and cruft stripped. This is the default when formats is omitted. Returned on data.markdown.
string
The main content as cleaned HTML — the same content selection as Markdown, but with tags preserved. Use it when you need structure Markdown can’t carry. Returned on data.html.
string
The page’s unmodified HTML, exactly as delivered. Nothing is cleaned or dropped. Returned on data.rawHtml.
Every link on the page, split into internal (same site) and external (other sites). Returned on data.links.
object
The page’s own machine-authored data — JSON-LD, microdata, OpenGraph, and RDFa — normalized for you. Returned on data.structured. No LLM is involved, so it’s the cheapest and highest-fidelity way to get typed data a page already publishes about itself. See below.
string
A concise, factual summary of the page, generated for you. Returned on data.summary. Adds one credit.
object
Schema- or prompt-shaped JSON, produced by reading the page against the instructions in jsonOptions. Returned on data.json. Adds four credits.

Structured data, in depth

The structured format reads the data a page publishes about itself and hands it back in a consistent shape. Because it reflects what the page already declares, it’s exact — no interpretation, no cost beyond the base scrape. You get both a normalized view and the raw source:
array
One deduplicated list of typed entities gathered from every syntax on the page. Each entry has:
array
The raw blocks for each syntax, exactly as found, for when you want the unmerged source.
Prefer structured when a page already publishes what you need — product prices, article metadata, event details. Reach for json only when the data isn’t declared on the page and has to be read out of the prose.

Shaping the json format

When you request json, tell Hydrafetch what shape you want with jsonOptions. Provide a schema, a prompt, or both — the schema fixes field names and types while the prompt guides what to pull.
Requesting json without a schema or prompt in jsonOptions is a validation error. One of the two is required.

Formats compose

Request as many formats as you like in a single call. Each returns on its own field, and the credit cost is the base scrape plus the surcharge for any premium formats you included. So a call for ["markdown", "structured"] costs 1 credit, ["markdown", "summary"] costs 2, and ["markdown", "summary", "json"] costs 6. Every response reports the exact total on usage.creditsUsed.

Next: Extraction quality

How every scrape reports how much to trust it — confidence, completeness, and blocked signals.