闲社服务运行正常AI智能体自动化平台
x

XCrawl入口

技能标识:xcrawl

Use this skill as the default XCrawl entry point for direct XCrawl requests, including single-URL fetch, format selection, sync or async execution, and JSON extraction with prompt or json_schema.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

XCrawl入口

XCrawl

概述

当用户直接询问XCrawl但未指定具体API或子技能时,此技能是默认的XCrawl入口点。
当前通过XCrawl Scrape API定位单页提取。
默认行为为原始透传:按原样返回上游API响应体。

路由指引

  • - 如果用户想要提取一个或多个特定URL,使用此技能并默认使用XCrawl Scrape。
  • 如果用户想要站点URL发现,优先使用XCrawl Map API。
  • 如果用户想要多页或全站爬取,优先使用XCrawl Crawl API。
  • 如果用户想要基于关键词的发现,优先使用XCrawl Search API。

所需本地配置

使用此技能前,用户必须创建本地配置文件并在其中写入XCRAWLAPIKEY。

路径:~/.xcrawl/config.json

json
{
XCRAWLAPIKEY: apikey>
}

仅从本地配置文件中读取API密钥。无需全局环境变量。

积分与账户设置

使用XCrawl API会消耗积分。
如果用户没有账户或可用积分,引导其前往https://dash.xcrawl.com/注册。
注册后,他们可以在运行请求前激活免费的1000积分套餐。

工具权限策略

仅请求curl和node的运行时权限。
不请求Python、shell辅助脚本或其他运行时权限。

API接口

  • - 开始抓取:POST /v1/scrape
  • 读取异步结果:GET /v1/scrape/{scrapeid}
  • 基础URL:https://run.xcrawl.com
  • 必需请求头:Authorization: Bearer API_KEY>

使用示例

cURL(同步)

bash
APIKEY=$(node -e const fs=require(fs);const p=process.env.HOME+/.xcrawl/config.json;const k=JSON.parse(fs.readFileSync(p,utf8)).XCRAWLAPI_KEY||;process.stdout.write(k))

curl -sS -X POST https://run.xcrawl.com/v1/scrape \
-H Content-Type: application/json \
-H Authorization: Bearer ${API_KEY} \
-d {url:https://example.com,mode:sync,output:{formats:[markdown,links]}}

cURL(异步创建 + 结果)

bash
APIKEY=$(node -e const fs=require(fs);const p=process.env.HOME+/.xcrawl/config.json;const k=JSON.parse(fs.readFileSync(p,utf8)).XCRAWLAPI_KEY||;process.stdout.write(k))

CREATE_RESP=$(curl -sS -X POST https://run.xcrawl.com/v1/scrape \
-H Content-Type: application/json \
-H Authorization: Bearer ${API_KEY} \
-d {url:https://example.com/product/1,mode:async,output:{formats:[json]},json:{prompt:提取标题和价格。}})

echo $CREATE_RESP

SCRAPEID=$(node -e const s=process.argv[1];const j=JSON.parse(s);process.stdout.write(j.scrapeid||) $CREATE_RESP)

curl -sS -X GET https://run.xcrawl.com/v1/scrape/${SCRAPE_ID} \
-H Authorization: Bearer ${API_KEY}

Node

bash
node -e
const fs=require(fs);
const apiKey=JSON.parse(fs.readFileSync(process.env.HOME+/.xcrawl/config.json,utf8)).XCRAWLAPIKEY;
const body={url:https://example.com,mode:sync,output:{formats:[markdown,json]},json:{prompt:提取标题和发布日期。}};
fetch(https://run.xcrawl.com/v1/scrape,{
method:POST,
headers:{Content-Type:application/json,Authorization:Bearer ${apiKey}},
body:JSON.stringify(body)
}).then(async r=>{console.log(await r.text());});

请求参数

请求端点和请求头

  • - 端点:POST https://run.xcrawl.com/v1/scrape
  • 请求头:
  • Content-Type: application/json
  • Authorization: Bearer

请求体:顶级字段

字段类型必需默认值描述
url字符串是-目标URL
mode
字符串 | 否 | sync | sync 或 async | | proxy | 对象 | 否 | - | 代理配置 | | request | 对象 | 否 | - | 请求配置 | | js_render | 对象 | 否 | - | JS渲染配置 | | output | 对象 | 否 | - | 输出配置 | | webhook | 对象 | 否 | - | 异步Webhook配置(mode=async) |

proxy

字段类型必需默认值描述
location字符串否USISO-3166-1 alpha-2国家代码,例如 US / JP / SG
sticky_session
字符串 | 否 | 自动生成 | 粘性会话ID;相同ID尝试重用出口 |

request

字段类型必需默认值描述
locale字符串否en-US,en;q=0.9影响 Accept-Language
device
字符串 | 否 | desktop | desktop / mobile;影响UA和视口 | | cookies | 对象映射 | 否 | - | Cookie键值对 | | headers | 对象映射 | 否 | - | 请求头键值对 | | onlymaincontent | 布尔值 | 否 | true | 仅返回主要内容 | | block_ads | 布尔值 | 否 | true | 尝试屏蔽广告资源 | | skiptlsverification | 布尔值 | 否 | true | 跳过TLS验证 |

js_render

字段类型必需默认值描述
enabled布尔值否true启用浏览器渲染
wait_until
字符串 | 否 | load | load / domcontentloaded / networkidle | | viewport.width | 整数 | 否 | - | 视口宽度(桌面端1920,移动端402) | | viewport.height | 整数 | 否 | - | 视口高度(桌面端1080,移动端874) |

output

字段类型必需默认值描述
formats字符串数组否[markdown]输出格式
screenshot
字符串 | 否 | viewport | full_page / viewport(仅当formats包含screenshot时) | | json.prompt | 字符串 | 否 | - | 提取提示 | | json.json_schema | 对象 | 否 | - | JSON Schema |

output.formats枚举:

  • - html
  • raw_html
  • markdown
  • links
  • summary
  • screenshot
  • json

webhook

字段类型必需默认值描述
url字符串否-回调URL
headers
对象映射 | 否 | - | 自定义回调请求头 | | events | 字符串数组 | 否 | [started,completed,failed] | 事件:started / completed / failed |

响应参数

同步创建响应(mode=sync)

字段类型描述
scrape_id字符串任务ID
endpoint
字符串 | 始终为scrape | | version | 字符串 | 版本 | | status | 字符串 | completed / failed | | url | 字符串 | 目标URL | | data | 对象 | 结果数据 | | started_at | 字符串 | 开始时间(ISO 8601) | | ended_at |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 xcrawl-1776124442 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 xcrawl-1776124442 技能

通过命令行安装

skillhub install xcrawl-1776124442

下载

⬇ 下载 xcrawl v1.0.0(免费)

文件大小: 3.88 KB | 发布时间: 2026-4-14 11:51

v1.0.0 最新 2026-4-14 11:51
xcrawl 1.0.0

- Initial release as the default XCrawl entry point.
- Supports direct requests for single-URL extraction via XCrawl Scrape APIs.
- Enables sync and async operations, customizable output formats, and JSON extraction with prompt or schema.
- Requires API key from local config file (`~/.xcrawl/config.json`); guides setup if missing.
- Documents usage examples for cURL and Node, plus all request/response parameters.
- Restricts tool usage to `curl` and `node` only.
返回顶部