Loading...
Loading...
Compare original and translation side by side
CF_ACCOUNT_IDCF_API_TOKENCF_ACCOUNT_IDCF_API_TOKENundefinedundefinedundefinedundefined| 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 |
| 目标 | 端点 | 使用场景 |
|---|---|---|
| 读取页面内容用于分析 | | 默认选择——内容简洁、令牌使用效率高 |
| 提取特定元素 | | 清楚所需内容对应的CSS选择器时 |
| 用AI提取结构化数据 | | 需要类型化对象,但不清楚具体选择器时 |
| 获取完整渲染后的DOM | | 需要原始HTML用于解析或调试时 |
| 发现页面/爬取 | | 构建站点地图或查找子页面时 |
| 视觉检查 | | 需要查看页面布局或进行视觉调试时 |
| 同时获取DOM和视觉内容 | | 同时需要HTML和屏幕截图时 |
markdowncfbr.sh markdown '{"url":"https://target-site.com/listings", "gotoOptions":{"waitUntil":"networkidle0"}}'networkidle0waitForSelector{"url":"...", "waitForSelector": ".listing-card"}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.pngscreenshotcfbr.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"]
}
}
}
}
}
}'scrapejsoncfbr.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=20linkscfbr.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": "/"}]}userAgent"gotoOptions": {"waitUntil": "networkidle0"}"waitForSelector": "<selector>""gotoOptions": {"timeout": 60000}{"rejectResourceTypes": ["image", "stylesheet", "font", "media"]}{"cookies": [{"name": "session", "value": "abc123", "domain": "target-site.com", "path": "/"}]}userAgentmarkdownnetworkidle0waitForSelectorrejectResourceTypesscrapemarkdownnetworkidle0waitForSelectorrejectResourceTypesscrape