读取网页正文
页面获取
给一个 URL,拿回读者真正会读的内容。POST /v1/fetch 负责抓取、兜底和清洗,你的 Agent 或数据管道拿到就能直接用。
只要正文
去掉导航、广告、Cookie 弹窗和页脚,只留文章本身,标题层级、列表和链接都保留。
Markdown 或纯文本
format=markdown 保留结构,适合直接塞进大模型上下文;format=text 去掉标记,适合建索引或做分析。
拿到才付钱
每页 5 积分。被拦截、超时或过大的页面不扣费;cache_first 命中一小时内的缓存也免费。
和搜索一起用
在搜索请求里加 include_content,排名靠前的结果会连同正文一起返回,不用再发第二次请求。
请求
curl https://api.serphubapi.com/v1/fetch \
-H "X-API-Key: shapi_..." \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/blog/espresso-guide",
"format": "markdown"}'返回
{
"meta": { "id": "fet_01J9Z4A2BC", "status": "success",
"cached": false, "credits_charged": 5 },
"url": "https://example.com/blog/espresso-guide",
"title": "The Complete Espresso Guide",
"markdown": "# The Complete Espresso Guide\n\nPulling a good shot…"
}使用须知
- 只抓公开网页:内网、本地等非公开地址会被拒绝,需要登录或付费才能看的内容不在范围内。
- 部分网站会拦截自动化访问,这类调用返回 all_upstreams_failed,不扣费。
- 抓取结果不会在我们这边存档,之后还要用的话请自行保存。
- Agent 可以直接通过官方 MCP Server 的 fetch 工具调用。 安装 →