Web Scraper
Scrape one rendered web page into structured metadata, readable text, links, images, JSON-LD types, and optional simple selector matches.
Overview
Web Scraper is the general-purpose single-page extraction tool in the Better Fetch marketplace. Provide any public URL and the tool renders the page through the browser engine, normalizes page metadata, extracts readable text, captures link and image inventories, reports structured-data types, and can pull text from a small list of simple selectors.
Last validated: Jul 3, 2026
Playground
Input
urlstring (uri)requiredThe public page URL to scrape.
max_linksintegerdefault: 25Maximum links to return.
selectorsstring[]Optional simple selectors to extract text from, e.g. h1, main, .price, #content, article.
max_imagesintegerdefault: 10Maximum images to return.
max_text_charsintegerdefault: 12000Maximum readable text characters to return.
Output
urlstringrequiredRequested URL
textstringrequiredReadable page text
linksobject[]Links discovered in page order
titlestringrequiredPage title
imagesobject[]Images discovered in page order
final_urlstringrequiredFinal URL after redirects
html_bytesintegerHTML byte length
word_countintegerrequiredWords in extracted text
descriptionstringMeta description
canonical_urlstringCanonical page URL
json_ld_typesstring[]Structured data @type values
selector_resultsobject[]Optional selector text matches
Examples
example-page
{
"url": "https://example.com",
"max_links": 10,
"selectors": [
"h1",
"p"
],
"max_images": 5,
"max_text_chars": 2000
}Use cases
FAQ
Is Web Scraper a full recursive crawler?
No. Version 0.1 focuses on a single rendered page. Use Website Content Crawler for small same-origin crawls, or add a future Web Scraper slice for recursive request queues.
Can it run arbitrary JavaScript page functions?
No. It returns a fixed, safe structured extraction. Arbitrary page functions and custom execution should be added as a separate validated capability.
What selectors does this version support?
The selector helper supports simple tag, class, id, and tag.class patterns. It is intended for lightweight text probes, not complete CSS selector coverage.
Use it anywhere
MCP (Claude, Cursor, any client)
# Add the Better Fetch MCP connector (or paste the URL into # Claude → Settings → Connectors → Add custom connector): claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \ --header "Authorization: Bearer bf_your_key_here" # Then ask for the tool by name: web_scraper
REST
curl -sS -X POST "https://betterfetch.co/api/tools/web_scraper/run" \
-H "Authorization: Bearer bf_your_key_here" \
-H "Content-Type: application/json" \
-d '{"input": {"url":"https://example.com","max_links":10,"selectors":["h1","p"],"max_images":5,"max_text_chars":2000}}'Run locally
git clone https://github.com/better-fetch/web-scraper && cd web-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"url":"https://example.com","max_links":10,"selectors":["h1","p"],"max_images":5,"max_text_chars":2000}'