GET /scrape
Turn any page into clean markdown, an LLM summary, structured JSON, links, or images. Costs 3 credits.
Overview
/scrape fetches one URL and gives it back to you in whichever formats you ask for. It handles the parts that make scraping tedious:
- JavaScript rendering — pages that need a browser get one, automatically. Static pages take the fast path.
- Bot walls — blocked requests escalate through stealth and proxy tiers before giving up.
- Boilerplate — navigation, sidebars, footers, and cookie banners are stripped by default.
- Absolute URLs — every link and image is resolved against the page, so the output still works once you store it somewhere else.
formats as a comma-separated list. Each format you request appears as its own object on data. Formats you do not request are absent, not null — so if (data.markdown) is a reliable check.
metadata is always present, whatever you request.
Example requests
Example response
Main content isolation
only_main_content defaults to true. It removes navigation, headers, footers, sidebars, share widgets, and cookie bars before rendering markdown, html, summary, and json.
When a page is not article-shaped — a product grid, a landing page — isolation would have to guess which fragment is “the content”. Rather than guess, it returns the full page body, sets main_content_only: false, and tells you in warnings:
links and images are always read from the full document, even when only_main_content is true. If you are mapping a site, the navigation links are exactly the ones you want.include_selectors to name the content, or exclude_selectors to name what to drop:
Structured extraction with json
Ask for the json format with a plain-language json_prompt, a json_schema, or both. Requesting json without either returns a 400.
null rather than being filled in from the model’s own knowledge.
Partial failures
The LLM-backed formats (summary and json) can fail on their own without losing the rest of the scrape. When that happens the format returns null values and the reason appears in warnings:
success: true, and you are still charged — the page was fetched.
Content size
markdown, html, and raw_html are each capped at 1 MB. Content that hits the cap is cut on a character boundary and flagged:
Related
GET /map
POST /crawl
Authorizations
Your Prefetch API key. Obtain one from the dashboard.
Query Parameters
The website URL to process. https:// is prepended automatically if no protocol is provided.
"https://stripe.com"
Comma-separated list of output formats. Each requested format appears as its own object on data; formats you do not request are absent, not null.
"markdown,links"
Strip navigation, sidebars, footers, and cookie banners before rendering markdown, html, summary, and json. links and images always come from the full document.
Keep hyperlinks in the markdown and html output. When false, link text is kept and the target is dropped.
Keep images in the markdown and html output.
Keep inline data: images. Off by default because base64 payloads are large and carry no meaning as text.
Comma-separated CSS selectors to keep. Overrides main-content detection entirely.
"article,.post-body"
Comma-separated CSS selectors to remove before rendering.
".cookie-bar,#promo"
What to extract, in plain language. Required for the json format unless json_schema is given.
"product name, price and availability"
A JSON Schema, passed as a JSON string, describing the object the json format should return.
Word budget for the summary format.
20 <= x <= 400