Pull named fields out of a page with CSS selectors — deterministic, no AI tokens.
scrape
renderfree
`mode: raw` is free; `rendered` consumes browser minutes.
Give it a map of fieldName -> selector and get back a flat JSON object. No model in the loop, so
results are repeatable and cost nothing beyond the fetch.
The selector value supports a tiny suffix DSL:
| Syntax | Meaning |
|---|---|
h1 |
text of the first match |
a@href |
the href attribute of the first match |
.item[] |
array of texts for every match |
.item[]@data-id |
array of attribute values |
article@html |
inner HTML of the first match |
When a page needs JavaScript, set mode: "rendered". When the structure is too irregular for selectors,
reach for extract-data instead.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url * | string | — | Page to scrape. |
| selectors * | object | — | Map of output field name to CSS selector (see the suffix DSL above). |
| mode | `raw` | `rendered` | "raw" |
raw = HTTP fetch. rendered = headless Chromium. |
| userAgent | `chrome-desktop` | `chrome-android` | `safari-iphone` | `googlebot` | `bingbot` | `curl` | `custom` | "chrome-desktop" |
User-agent persona. Many sites serve different HTML per persona — googlebot often returns the pre-rendered version. |
| userAgentString | string | — | Raw UA string, used only when userAgent is custom. |
| waitForSelector | string | — | Block until this CSS selector appears. Useful for lazily hydrated SPAs. |
| timeoutMs | integer | 20000 |
Hard timeout for the page load, in milliseconds. |
`data` holds one key per selector; `missing` lists selectors that matched nothing.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | — | Final URL. |
| data | object | — | Extracted fields. |
| missing | string[] | — | Field names whose selector matched nothing. |