> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tavily 提取

> 使用 Tavily Extract 从指定 URL 提取网页内容。



## OpenAPI

````yaml openapi/zh/tavily.json POST /tavily/extract
openapi: 3.0.0
info:
  title: Tavily API
  version: 1.0.0
  description: Tavily 端点的统一 API 文档，包括 Search、Extract、Crawl 和 Map。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - bearerAuth: []
paths:
  /tavily/extract:
    post:
      tags:
        - https://docs.tavily.com/documentation/api-reference/endpoint/extract
      summary: 使用 Tavily Extract 从指定 URL 提取网页内容。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: 要从中提取内容的 URL。支持单个 URL 字符串和 URL 字符串数组。
                  example:
                    - https://en.wikipedia.org/wiki/Artificial_intelligence
                query:
                  type: string
                  description: 用于对提取的内容块进行重新排序的用户意图。
                chunks_per_source:
                  type: integer
                  default: 3
                  description: 每个来源返回的相关内容块的最大数量。仅在提供 query 时可用。
                  minimum: 1
                  maximum: 5
                extract_depth:
                  type: string
                  enum:
                    - basic
                    - advanced
                  default: basic
                  description: 提取过程的深度。
                include_images:
                  type: boolean
                  default: false
                  description: 包含从 URL 中提取的图片列表。
                include_favicon:
                  type: boolean
                  default: false
                  description: 为每个结果包含 favicon URL。
                format:
                  type: string
                  enum:
                    - markdown
                    - text
                  default: markdown
                  description: 提取的网页内容格式。
                timeout:
                  type: number
                  format: float
                  description: >-
                    等待 URL 提取的最长时间（秒）。如果省略，默认超时时间取决于 extract_depth：basic 为 10
                    秒，advanced 为 30 秒。
                  minimum: 1
                  maximum: 60
                include_usage:
                  type: boolean
                  default: false
                  description: 在响应中包含信用额度用量信息。
              required:
                - urls
      responses:
        '200':
          description: 已成功返回提取结果。
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 已提取内容的 URL。
                        title:
                          type: string
                          description: 所提取页面的标题。
                        raw_content:
                          type: string
                          description: 从 URL 提取的原始内容。
                        images:
                          type: array
                          items:
                            type: string
                          description: 当 include_images 为 true 时从 URL 中提取的图片。
                        favicon:
                          type: string
                          description: 所提取内容的 Favicon URL。
                          nullable: true
                  failed_results:
                    type: array
                    items:
                      type: string
                    description: 无法处理的 URL 列表。
                  response_time:
                    type: number
                    format: float
                    description: 完成请求所用的时间（秒）。
                  usage:
                    type: object
                    properties:
                      credits:
                        type: integer
                        description: 请求的额度使用详情。
                  request_id:
                    type: string
                    description: 唯一请求标识符。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````