> ## 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 Search 执行搜索查询。



## OpenAPI

````yaml openapi/zh/tavily.json POST /tavily/search
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/search:
    post:
      tags:
        - https://docs.tavily.com/documentation/api-reference/endpoint/search
      summary: 使用 Tavily Search 执行搜索查询。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 要使用 Tavily 执行的搜索查询。
                  example: Who is Leo Messi?
                search_depth:
                  type: string
                  enum:
                    - advanced
                    - basic
                    - fast
                    - ultra-fast
                  default: basic
                  description: >-
                    控制延迟与相关性之间的权衡。advanced 以更高的延迟和成本提供最高相关性；basic 实现均衡；fast 和
                    ultra-fast 针对更低延迟进行优化。
                chunks_per_source:
                  type: integer
                  default: 3
                  description: 每个来源返回的相关文本块的最大数量。
                  minimum: 1
                  maximum: 3
                max_results:
                  type: integer
                  default: 5
                  description: 返回的最大搜索结果数。
                  minimum: 0
                  maximum: 20
                topic:
                  type: string
                  enum:
                    - general
                    - news
                    - finance
                  default: general
                  description: 搜索类别。
                time_range:
                  type: string
                  enum:
                    - day
                    - week
                    - month
                    - year
                    - d
                    - w
                    - m
                    - 'y'
                  description: 根据发布日期筛选结果的时间范围。
                start_date:
                  type: string
                  format: date
                  description: 返回指定开始日期之后的结果。
                  example: '2025-02-09'
                end_date:
                  type: string
                  format: date
                  description: 返回指定结束日期之前的结果。
                  example: '2025-12-29'
                include_answer:
                  oneOf:
                    - type: boolean
                    - type: string
                      enum:
                        - basic
                        - advanced
                  default: false
                  description: 包含由 LLM 生成的答案。true 使用默认答案模式；basic 或 advanced 用于选择答案生成模式。
                include_raw_content:
                  oneOf:
                    - type: boolean
                    - type: string
                      enum:
                        - markdown
                        - text
                  default: false
                  description: >-
                    为每个搜索结果包含清理和解析后的内容。true 或 markdown 返回 Markdown；text
                    返回纯文本，并可能增加延迟。
                include_images:
                  type: boolean
                  default: false
                  description: 执行图片搜索并包含搜索结果。
                include_image_descriptions:
                  type: boolean
                  default: false
                  description: 当 include_images 为 true 时，为每张图片添加描述性文本。
                safe_search:
                  type: boolean
                  default: false
                  description: >-
                    从搜索结果中过滤成人或不安全内容。仅限企业版；当 search_depth 为 fast 或 ultra-fast
                    时不受支持。
                include_favicon:
                  type: boolean
                  default: false
                  description: 为每个结果包含 favicon URL。
                include_domains:
                  type: array
                  items:
                    type: string
                  description: 搜索结果中需要明确包含的域名列表。
                  maxItems: 300
                exclude_domains:
                  type: array
                  items:
                    type: string
                  description: 要从搜索结果中特别排除的域名列表。
                  maxItems: 150
                country:
                  type: string
                  description: 提升特定国家/地区的搜索结果。仅当 topic 为 general 时可用。
                  enum:
                    - afghanistan
                    - albania
                    - algeria
                    - andorra
                    - angola
                    - argentina
                    - armenia
                    - australia
                    - austria
                    - azerbaijan
                    - bahamas
                    - bahrain
                    - bangladesh
                    - barbados
                    - belarus
                    - belgium
                    - belize
                    - benin
                    - bhutan
                    - bolivia
                    - bosnia and herzegovina
                    - botswana
                    - brazil
                    - brunei
                    - bulgaria
                    - burkina faso
                    - burundi
                    - cambodia
                    - cameroon
                    - canada
                    - cape verde
                    - central african republic
                    - chad
                    - chile
                    - china
                    - colombia
                    - comoros
                    - congo
                    - costa rica
                    - croatia
                    - cuba
                    - cyprus
                    - czech republic
                    - denmark
                    - djibouti
                    - dominican republic
                    - ecuador
                    - egypt
                    - el salvador
                    - equatorial guinea
                    - eritrea
                    - estonia
                    - ethiopia
                    - fiji
                    - finland
                    - france
                    - gabon
                    - gambia
                    - georgia
                    - germany
                    - ghana
                    - greece
                    - guatemala
                    - guinea
                    - haiti
                    - honduras
                    - hungary
                    - iceland
                    - india
                    - indonesia
                    - iran
                    - iraq
                    - ireland
                    - israel
                    - italy
                    - jamaica
                    - japan
                    - jordan
                    - kazakhstan
                    - kenya
                    - kuwait
                    - kyrgyzstan
                    - latvia
                    - lebanon
                    - lesotho
                    - liberia
                    - libya
                    - liechtenstein
                    - lithuania
                    - luxembourg
                    - madagascar
                    - malawi
                    - malaysia
                    - maldives
                    - mali
                    - malta
                    - mauritania
                    - mauritius
                    - mexico
                    - moldova
                    - monaco
                    - mongolia
                    - montenegro
                    - morocco
                    - mozambique
                    - myanmar
                    - namibia
                    - nepal
                    - netherlands
                    - new zealand
                    - nicaragua
                    - niger
                    - nigeria
                    - north korea
                    - north macedonia
                    - norway
                    - oman
                    - pakistan
                    - panama
                    - papua new guinea
                    - paraguay
                    - peru
                    - philippines
                    - poland
                    - portugal
                    - qatar
                    - romania
                    - russia
                    - rwanda
                    - saudi arabia
                    - senegal
                    - serbia
                    - singapore
                    - slovakia
                    - slovenia
                    - somalia
                    - south africa
                    - south korea
                    - south sudan
                    - spain
                    - sri lanka
                    - sudan
                    - sweden
                    - switzerland
                    - syria
                    - taiwan
                    - tajikistan
                    - tanzania
                    - thailand
                    - togo
                    - trinidad and tobago
                    - tunisia
                    - turkey
                    - turkmenistan
                    - uganda
                    - ukraine
                    - united arab emirates
                    - united kingdom
                    - united states
                    - uruguay
                    - uzbekistan
                    - venezuela
                    - vietnam
                    - yemen
                    - zambia
                    - zimbabwe
                auto_parameters:
                  type: boolean
                  default: false
                  description: 根据查询内容自动配置搜索参数。
                include_usage:
                  type: boolean
                  default: false
                  description: 在响应中包含信用额度用量信息。
              required:
                - query
      responses:
        '200':
          description: 搜索结果已成功返回。
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                    description: 已执行的搜索查询。
                  answer:
                    type: string
                    description: 由 LLM 生成的简短回答。当 include_answer 为 false 或未生成回答时，此字段为 null。
                    nullable: true
                  images:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 图片 URL。
                        description:
                          type: string
                          description: 图片描述。
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          description: 搜索结果的标题。
                        url:
                          type: string
                          description: 搜索结果的 URL。
                        content:
                          type: string
                          description: 搜索结果的内容摘要。
                        score:
                          type: number
                          format: float
                          description: 搜索结果的相关性得分。
                        favicon:
                          type: string
                          description: 搜索结果的 Favicon URL。
                          nullable: true
                        raw_content:
                          type: string
                          nullable: true
                          description: >-
                            已清理并解析的源内容。除非请求了 include_raw_content 或没有可用的原始内容，否则为
                            Null。
                  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

````