Loading...
Loading...
Browse and scrape websites using Cloudflare's Browser Rendering REST API. Use when the agent needs to fetch rendered web content, extract structured data from pages, take screenshots, or scrape specific elements via CSS selectors. Triggers on tasks like "scrape this site", "get listings from this page", "extract data from this URL", "take a screenshot of this page", "browse this website", or any task requiring headless browser access to read, crawl, or extract information from live web pages. Also use when WebFetch is insufficient (JS-heavy sites, SPAs, pages requiring cookies, or when structured extraction is needed).
npx skill4agent add rarestg/rarestg-skills cf-browserCF_ACCOUNT_IDCF_API_TOKEN# JSON endpoints
cfbr.sh <endpoint> '<json_body>'
# Screenshot (binary) — optional third arg for output filename
cfbr.sh screenshot '<json_body>' output.png| Goal | Endpoint | When to use |
|---|---|---|
| Read page content for analysis | | Default choice — clean, token-efficient |
| Extract specific elements | | Know the CSS selectors for what you need |
| Extract structured data with AI | | Need typed objects, don't know exact selectors |
| Get full rendered DOM | | Need raw HTML for parsing or debugging |
| Discover pages / crawl | | Building a sitemap or finding subpages |
| Visual inspection | | Need to see the page layout or debug visually |
| DOM + visual in one shot | | Need both HTML and a screenshot |
markdowncfbr.sh markdown '{"url":"https://target-site.com/listings", "gotoOptions":{"waitUntil":"networkidle0"}}'networkidle0waitForSelector{"url":"...", "waitForSelector": ".listing-card"}screenshotcfbr.sh screenshot '{"url":"https://target-site.com/listings", "screenshotOptions":{"fullPage":true}, "gotoOptions":{"waitUntil":"networkidle0"}}' listings.pngcfbr.sh scrape '{
"url": "https://target-site.com/listings",
"gotoOptions": {"waitUntil": "networkidle0"},
"elements": [
{"selector": ".listing-card .title"},
{"selector": ".listing-card .price"},
{"selector": ".listing-card .address"},
{"selector": ".listing-card a"}
]
}'scrapetexthtmlattributeshrefcfbr.sh json '{
"url": "https://target-site.com/listings",
"gotoOptions": {"waitUntil": "networkidle0"},
"prompt": "Extract all rental listings with title, price, address, bedrooms, and link",
"response_format": {
"type": "json_schema",
"schema": {
"type": "object",
"properties": {
"listings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "string"},
"address": {"type": "string"},
"bedrooms": {"type": "string"},
"url": {"type": "string"}
},
"required": ["title", "price"]
}
}
}
}
}
}'scrapejsonlinkscfbr.sh links '{"url":"https://target-site.com/listings"}'?page=2next?page=2?offset=20"gotoOptions": {"waitUntil": "networkidle0"}"waitForSelector": "<selector>""gotoOptions": {"timeout": 60000}{"rejectResourceTypes": ["image", "stylesheet", "font", "media"]}{"cookies": [{"name": "session", "value": "abc123", "domain": "target-site.com", "path": "/"}]}userAgentmarkdownnetworkidle0waitForSelectorrejectResourceTypesscrape