Felo API PlatformFelo API Platform
v0.1.0-beta
OpenAPI 3.1.0

Tavily Search

服务器:https://openapi.felo.ai
客户端库

Tavily Search

​

Search the web and return ranked results with titles, URLs and content snippets. query is required. Use max_results to control the number of results and search_depth to select the search mode. Additional answer, images and raw content are returned only when requested. Set include_usage to receive resource usage information; usage.credits is not a Felo charge.

请求体
必填
application/json
  • query
    类型: string
    必填

    The search query to execute with Tavily.

  • auto_parameters
    类型: boolean

    Automatically configure search parameters based on query content.

  • chunks_per_source
    类型: integer
    最小值:  
    1
    最大值:  
    3

    Maximum number of relevant chunks returned per source.

  • country
    类型: string 枚举

    Boost search results from a specific country. Available only when topic is general.

    值
    • afghanistan
    • albania
    • algeria
    • andorra
    • angola
  • end_date
    类型: string 格式: date

    Return results before the specified end date.

  • exclude_domains
    类型: array string[] …150

    List of domains to specifically exclude from the search results.

  • include_answer

    Include an LLM-generated answer. true uses the default answer mode; basic or advanced selects the answer generation mode.

    • 类型: boolean

      Include an LLM-generated answer. true uses the default answer mode; basic or advanced selects the answer generation mode.

  • include_domains
    类型: array string[] …300

    List of domains to specifically include in the search results.

  • include_favicon
    类型: boolean

    Include the favicon URL for each result.

  • include_image_descriptions
    类型: boolean

    Add descriptive text for each image when include_images is true.

  • include_images
    类型: boolean

    Perform an image search and include results.

  • include_raw_content

    Include cleaned and parsed content for each search result. true or markdown returns markdown; text returns plain text and may increase latency.

    • 类型: boolean

      Include cleaned and parsed content for each search result. true or markdown returns markdown; text returns plain text and may increase latency.

  • include_usage
    类型: boolean

    Include resource usage information in the response. This is not Felo billing information.

  • max_results
    类型: integer
    最小值:  
    0
    最大值:  
    20

    Maximum number of search results to return.

  • 类型: boolean

    Filter out adult or unsafe content from search results. Enterprise only; not supported when search_depth is fast or ultra-fast.

  • search_depth
    类型: string 枚举

    Controls the latency vs. relevance tradeoff. advanced gives the highest relevance with higher latency and cost; basic is balanced; fast and ultra-fast optimize for lower latency.

    值
    • advanced
    • basic
    • fast
    • ultra-fast
  • start_date
    类型: string 格式: date

    Return results after the specified start date.

  • time_range
    类型: string 枚举

    Time range to filter results based on publish date.

    值
    • day
    • week
    • month
    • year
    • d
    • w
    • m
    • y
  • topic
    类型: string 枚举

    Category of the search.

    值
    • general
    • news
    • finance
响应
  • 200
    类型: object

    Search results returned successfully.

    • answer
      类型: string 可为 null

      A short LLM-generated answer. Present as null when include_answer is false or no answer is generated.

    • images
      类型: array object[]
      • description
        类型: string

        Image description.

      • url
        类型: string

        Image URL.

    • query
      类型: string

      The search query that was executed.

    • request_id
      类型: string

      Unique request identifier.

    • response_time
      类型: number 格式: float

      Time in seconds it took to complete the request.

    • results
      类型: array object[]
      • content
        类型: string

        Content snippet of the search result.

      • favicon
        类型: string 可为 null

        Favicon URL of the search result.

      • raw_content
        类型: string 可为 null

        Cleaned and parsed source content. Null unless include_raw_content is requested or no raw content is available.

      • score
        类型: number 格式: float

        Relevance score of the search result.

      • title
        类型: string

        Title of the search result.

      • url
        类型: string

        URL of the search result.

    • usage
      类型: object
      • credits
        类型: integer

        Resource units consumed by this request, not USD or Felo credits.

    application/json
  • 400

    The request could not be processed. Check the request parameters.

  • 401

    A valid Felo API key is required.

  • 402

    The request cannot proceed because a billing requirement is not met.

  • 403

    The account is not permitted to perform this operation.

  • 429

    A request or spending limit has been reached.

  • 502

    The service could not complete the request.

  • 503

    The API or billing service is temporarily unavailable.

  • 504

    The service timed out while processing the request.

  • default

    The operation failed. Keep the response request ID when contacting Felo support.

Request Example for post/v1/beta/tavily/search
curl --request POST https://openapi.felo.ai/v1/beta/tavily/search \
  --header "Authorization: Bearer ${FELO_API_KEY:?Set FELO_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{"query": "Python official documentation", "search_depth": "basic", "max_results": 2, "include_usage": true}'
{
  "query": "Python official documentation",
  "answer": null,
  "images": [],
  "results": [
    {
      "title": "Python Documentation",
      "url": "https://docs.python.org/3/",
      "content": "Documentation for the Python programming language.",
      "score": 0.98,
      "raw_content": null
    }
  ],
  "response_time": 1.2,
  "usage": {
    "credits": 1
  },
  "request_id": "example-search-request"
}
Tavily Search