Web Content
Web crawling, URL discovery and page extraction.
Tavily Extract
从一个 URL 或 URL 数组中提取可读内容。通过 format 选择 text 或 Markdown。请同时检查 results 和 failed_results:失败的 URL 可能出现在整体成功的 HTTP 响应中。设置 include_usage 以获取资源用量信息;usage.credits 不是 Felo 费用。
计费参考
- 计量方式:按响应单位计量。
- 参考请求估算:0.024 美元。
- 单位成本基准:0.008 美元。
- 资源单位:
tavily_credit。 - 参考客户倍率:1.0。不得对已结算的客户金额再次应用。
- 成本基准不构成最终客户价格,即使为零也不例外。
仅供参考的元数据,不是账户报价、保证价格或消费上限。资源额度不同于 Felo 额度。最终扣费以 Felo 计费记录为准。
- urls必填
要提取内容的 URL。单个 URL 字符串和 URL 字符串数组均可接受。
- 类型: string
要提取内容的 URL。单个 URL 字符串和 URL 字符串数组均可接受。
- 类型: integerchunks
_per _source 最小值:1最大值:5每个来源返回的相关分块最大数。仅在提供 query 时可用。
- 类型: string 枚举extract
_depth 提取过程的深度。
值- basic
- advanced
- 类型: string 枚举format
提取的网页内容格式。
值- markdown
- text
- 类型: booleaninclude
_favicon 为每条结果包含 favicon URL。
- 类型: booleaninclude
_images 包含从 URL 中提取的图片列表。
- 类型: booleaninclude
_usage 在响应中包含资源用量信息。此信息不是 Felo 计费信息。
- 类型: stringquery
用于对提取的内容分块重新排序的用户意图。
- 类型: number 格式: floattimeout最小值:1最大值:60
URL 提取的最长等待时间(秒)。省略时,默认超时取决于 extract_depth:basic 为 10 秒,advanced 为 30 秒。
- 类型: object200
提取结果已成功返回。
- 类型: array string[]failed
_results 无法处理的 URL 列表。
- 类型: stringrequest
_id 唯一的请求标识符。
- 类型: number 格式: floatresponse
_time 完成该请求所用的时间(秒)。
- 类型: array object[]results
- favicon类型: string | null
提取内容的 Favicon URL。
- images类型: array string[]
include_images 为 true 时从 URL 提取的图片。
- raw类型: string
_content 从 URL 提取的原始内容。
- title类型: string
已提取页面的标题。
- url类型: string
已提取内容的 URL。
- 类型: objectusage
- credits类型: integer
此请求消耗的资源单位,不是美元或 Felo 额度。
application/json - 400
无法处理该请求。请检查请求参数。
- 401
需要有效的 Felo API 密钥。
- 402
由于未满足计费要求,请求无法继续。
- 403
该账户无权执行此操作。
- 429
已达到请求或支出限额。
- 502
服务无法完成该请求。
- 503
API 或计费服务暂时不可用。
- 504
服务在处理请求时超时。
- default
错误响应;上游透传响应可能采用提供方格式
application/json
curl --request POST https://openapi.felo.ai/v1/beta/tavily/extract \
--header "Authorization: Bearer ${FELO_API_KEY:?Set FELO_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{"urls": ["https://example.com"], "extract_depth": "basic", "format": "text", "include_usage": true}'
{
"results": [
{
"url": "https://example.com",
"title": "Example Domain",
"raw_content": "This domain is for use in documentation examples.",
"images": []
}
],
"failed_results": [],
"response_time": 0.5,
"usage": {
"credits": 1
},
"request_id": "example-extract-request"
}