> ## 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 Crawl、基于图的网站遍历工具。



## OpenAPI

````yaml openapi/zh/tavily.json POST /tavily/crawl
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/crawl:
    post:
      tags:
        - https://docs.tavily.com/documentation/api-reference/endpoint/crawl
      summary: 使用 Tavily Crawl、基于图的网站遍历工具。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: 开始抓取的根 URL。
                  example: docs.tavily.com
                instructions:
                  type: string
                  description: 用于爬虫的自然语言指令。
                chunks_per_source:
                  type: integer
                  default: 3
                  description: 每个来源返回的相关文本块的最大数量。
                  minimum: 1
                  maximum: 5
                max_depth:
                  type: integer
                  default: 1
                  description: 最大抓取深度。
                  minimum: 1
                  maximum: 5
                max_breadth:
                  type: integer
                  default: 20
                  description: 树中每一层可跟踪的最大链接数量。
                  minimum: 1
                  maximum: 500
                limit:
                  type: integer
                  default: 50
                  description: 爬虫停止前将处理的链接总数。
                  minimum: 1
                select_paths:
                  type: array
                  items:
                    type: string
                  description: 用于仅选择具有特定路径模式的 URL 的正则表达式模式。
                select_domains:
                  type: array
                  items:
                    type: string
                  description: 用于选择仅抓取特定域名或子域名的正则表达式模式。
                exclude_paths:
                  type: array
                  items:
                    type: string
                  description: 用于排除具有特定路径模式的 URL 的正则表达式模式。
                exclude_domains:
                  type: array
                  items:
                    type: string
                  description: 用于从抓取中排除特定域名或子域名的正则表达式模式。
                allow_external:
                  type: boolean
                  default: true
                  description: 在最终结果列表中包含外部域名链接。
                include_images:
                  type: boolean
                  default: false
                  description: 在抓取结果中包含图片。
                extract_depth:
                  type: string
                  enum:
                    - basic
                    - advanced
                  default: basic
                  description: 提取过程的深度。
                format:
                  type: string
                  enum:
                    - markdown
                    - text
                  default: markdown
                  description: 提取的网页内容格式。
                include_favicon:
                  type: boolean
                  default: false
                  description: 为每个结果包含 favicon URL。
                timeout:
                  type: number
                  format: float
                  default: 150
                  description: 等待抓取操作完成的最长时间（秒）。
                  minimum: 10
                  maximum: 150
                include_usage:
                  type: boolean
                  default: false
                  description: 在响应中包含信用额度用量信息。
              required:
                - url
      responses:
        '200':
          description: 已成功返回抓取结果。
          content:
            application/json:
              schema:
                type: object
                properties:
                  base_url:
                    type: string
                    description: 已抓取的基础 URL。
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 已抓取页面的 URL。
                        raw_content:
                          type: string
                          description: 从页面中提取的原始内容。
                        favicon:
                          type: string
                          description: 已抓取页面的 Favicon 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

````