URL 内容 提取
传入一个或多个 URL,即可获得剥离导航与广告后的干净可读内容。可直接接入 RAG 管线、智能体抓取与摘要流程,或内容监控任务。
集成指南
复制代码片段,替换你的 API 密钥,运行即可。适用于任何 HTTP 客户端——下方提供 cURL、JavaScript 和 Python 示例。
/api/extracthttps://www.apipick.comExtract clean readable content from one or more URLs. Removes navigation, ads, and boilerplate. Returns markdown-flavoured text ready for LLM ingestion.
urlsarray<string>必填1–25 http(s) URLs
extract_effortstring可选auto | low | high
response_lengthstring可选short | medium | long
curl -X POST "https://www.apipick.com/api/extract" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"urls": [
"https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
"https://docs.anthropic.com/claude/docs/intro-to-claude"
],
"extract_effort": "auto"
}'{
"results": [
{
"url": "https://en.wikipedia.org/wiki/Retrieval-augmented_generation",
"title": "Retrieval-augmented generation - Wikipedia",
"content": "Retrieval-augmented generation (RAG) is a technique…",
"status": "ok"
}
],
"result_count": 1,
"credits_used": 2,
"remaining_credits": 98
}速率限制
限流按 API 密钥计,采用 60 秒滑动窗口。触发限制时会返回干净的 429,并带 Retry-After 响应头。
30req/min
按 API 密钥、按端点计。60 秒滑动窗口。
3concurrent
每个 API 密钥的最大同时进行中请求数。
X-RateLimit-Limit每分钟允许的最大请求数X-RateLimit-Remaining当前窗口内剩余的请求数X-RateLimit-Reset当前窗口重置前的秒数Retry-After重试前需等待的秒数(仅在 429 时)HTTP/1.1 429 Too Many Requests
Retry-After: 12
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 12
{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded: 30 requests/minute per API key. Retry after 12s.",
"retry_after": 12
}常见问题
积分如何计费?
每个提交的 URL 消耗 2 积分。一次提交 5 个 URL 的调用消耗 10 积分。单次调用最多 25 个 URL。
响应是什么样的?
一个由 { url, title, content, status } 对象组成的数组。content 是清洗后的可读文本(类 Markdown 风格),已去除样板内容,可直接供 LLM 使用。
我能控制提取深度吗?
传入 extract_effort(auto、low、high)。'auto' 是默认值,适用于大多数页面。'high' 速度较慢,但对重度依赖 JS 或类付费墙的页面处理得更彻底。
如果某个 URL 失败会怎样?
失败的 URL 会在结果数组中将 status 设为相应的错误码,但整个调用仍会成功。无论单个 URL 结果如何,所有提交的 URL 都会计费。
有工具 schema 吗?
GET /api/extract/tool-schema 会返回 OpenAI 函数和 Claude 工具使用的定义。