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

Tavily Extract

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

Web Content

​

Web crawling, URL discovery and page extraction.

Tavily Extract

​

Extract readable content from one URL or an array of URLs. Select text or Markdown with format. Inspect both results and failed_results: a failed URL can be reported in an otherwise successful HTTP response. Set include_usage to receive resource usage information; usage.credits is not a Felo charge.

请求体
必填
application/json
  • urls
    必填

    The URL or URLs to extract content from. A single URL string and an array of URL strings are both accepted.

    • 类型: string

      The URL or URLs to extract content from. A single URL string and an array of URL strings are both accepted.

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

    Maximum number of relevant chunks returned per source. Available only when query is provided.

  • extract_depth
    类型: string 枚举

    Depth of the extraction process.

    值
    • basic
    • advanced
  • format
    类型: string 枚举

    Format of the extracted web page content.

    值
    • markdown
    • text
  • include_favicon
    类型: boolean

    Include the favicon URL for each result.

  • include_images
    类型: boolean

    Include a list of images extracted from the URLs.

  • include_usage
    类型: boolean

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

  • query
    类型: string

    User intent for reranking extracted content chunks.

  • timeout
    类型: number 格式: float
    最小值:  
    1
    最大值:  
    60

    Maximum time in seconds to wait for URL extraction. If omitted, default timeouts depend on extract_depth: 10 seconds for basic and 30 seconds for advanced.

响应
  • 200
    类型: object

    Extraction results returned successfully.

    • failed_results
      类型: array string[]

      List of URLs that could not be processed.

    • request_id
      类型: string

      Unique request identifier.

    • response_time
      类型: number 格式: float

      Time in seconds it took to complete the request.

    • results
      类型: array object[]
      • favicon
        类型: string 可为 null

        Favicon URL of the extracted content.

      • images
        类型: array string[]

        Images extracted from the URL when include_images is true.

      • raw_content
        类型: string

        Extracted raw content from the URL.

      • title
        类型: string

        Title of the extracted page.

      • url
        类型: string

        URL of the extracted content.

    • 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/extract
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"
}
Tavily Extract