Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Tavily URL Content Extraction

API 文件
https://api.sandbase.ai/v1/api/tavily/extract

Extracts clean text content from specified web pages using their URLs. Supports basic or advanced extraction depth and optional image inclusion.

價格
自 $0.0016 起美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 2 個選填

Playground

輸入
URLs to extract content from.
Depth of content extraction.
Include images found on the pages.
輸出範例
回應outputs · 420 B · 13 行
{
  "failed_results": [],
  "request_id": "35001ccb-b475-4057-b008-b5026dc5ac41",
  "response_time": 0,
  "results": [
    {
      "images": [],
      "raw_content": "# Example Domain\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n[Learn more](https://iana.org/domains/example)",
      "title": "Example Domain",
      "url": "https://example.com"
    }
  ]
}

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

Tavily URL Content Extraction API

Returns the page title and images for each URL you send, with a list of URLs that could not be extracted. It needs a urls array with one or more web page addresses.

Use cases

  • Pull the title of a list of known pages to check what each URL points to.
  • Collect the images found on specific pages by setting include_images to true.
  • Find which URLs in a batch could not be extracted by reading failed_results.
  • Run a batch of pages from a search or site crawl through one extraction call.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tavily/extract" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://en.wikipedia.org/wiki/Artificial_intelligence"]}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlsarrayYesURLs to extract content from.
extract_depthstringNoDepth of content extraction.
include_imagesbooleanNoInclude images found on the pages.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "failed_results": [],
  "request_id": "f594f392-10f6-4a3f-9d7c-ac020a617625",
  "response_time": 0.03,
  "results": [
    {
      "images": [],
      "title": "Artificial intelligence - Wikipedia",
      "url": "https://en.wikipedia.org/wiki/Artificial_intelligence"
    }
  ],
  "usage": {
    "credits": 1
  }
}

Response fields

FieldMeaning
results[]One entry per URL that was extracted successfully.
results[].urlThe page address that was extracted. Use it to match each result to the URL you sent.
results[].titleThe title of the page, for example Artificial intelligence - Wikipedia.
results[].imagesList of images found on the page. It is empty in this response, where include_images was not set.
failed_resultsList of URLs that could not be extracted. It is empty when every URL worked.
request_idUnique ID of the request, as a UUID.
response_timeTime taken for the request. The value is a number such as 0.03.
usage.creditsNumber of credits recorded for the call, such as 1.

Notes

  • Pass several addresses in the urls array to extract them in one call. Check both results and failed_results for each one.
  • Set extract_depth to basic or advanced. Set include_images to true to fill results[].images.
  • To find URLs to extract, call Tavily Search or Tavily Site Map.

Submit URLs without assuming a text field

Send urls as an array of public page addresses. extract_depth accepts basic or advanced; include_images is a boolean. Search takes a query, while this request takes URLs you already selected. The current reference sample shows URL, title and image fields with failed_results; it does not demonstrate raw_content. That absence is not proof that text extraction is impossible, and it is not a guarantee of full-page text either. Check the approved response for your target before writing a text parser or claiming a complete RAG workflow.

To discover candidate URLs first, read the Tavily Search parameters and the Python search guide. Review and select a URL yourself; the examples do not chain or retry requests.

Pricing

Billed like Tavily's pay-as-you-go price of $0.008 per credit, where 5 successful extractions use 1 credit (tavily.com, checked 2026-11-22 UTC): $0.0016 per successfully extracted URL with extract_depth: "basic" (the default), $0.0032 with "advanced". 5 URLs cost $0.008. Tavily counts credits across calls, so a single URL is not rounded up to a full credit. URLs that fail to extract are not charged, and a call where every URL fails costs nothing. The estimate before a call assumes every URL succeeds. It is not part of the daily free quota, because its price varies with the request.

探索更多

相關 APIs

所有 APIs
API價格回應
Tavily每次呼叫 $0.0016 起JSON
Tavily每次呼叫 $0.04 起JSON
Tavily每次呼叫 $0.008 起JSON

指南:Tavily alternatives: compare Exa and Firecrawl searchExa vs Tavily vs Firecrawl for AI agents

問題

常見問題

我要如何使用 Tavily URL Content Extraction API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/tavily/extract。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Tavily URL Content Extraction API 的費用是多少?

每次起 $0.0016,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Tavily URL Content Extraction API 接受哪些參數?

必要:urls (array)。 選填:extract_depth(basic, advanced 之一) 和 include_images (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Tavily URL Content Extraction API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Tavily 開發者帳號或 API 金鑰嗎?

不需要。Tavily URL Content Extraction 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Tavily API 存取權。

URL 的輸入格式是什麼?

請將 urls 以公開頁面位址陣列傳送,不要傳單一字串或搜尋查詢。extract_depth 可接受 basic 或 advanced;include_images 是布林值。請查看此端點目前的 schema,不要照搬額外的上游選項。

我可以假設每個擷取結果都包含 raw_content 嗎?

不行。目前的參考範例只顯示了 URL、title 和 image 欄位,以及 failed_results,但沒有示範 raw_content。這並不能證明頁面文字不可用。若要依賴文字欄位、整頁涵蓋範圍或下游 RAG 工作流程,請先確認您目標的核准回應。

已完成的請求能證明每個 URL 都已擷取嗎?

不能。文件定義的封裝是 outputs[0].data,而參考說明中也提到 results 和 failed_results。單靠完成執行或 HTTP 成功,不能證明每個 URL 都產生了您要的內容。請檢視回應,並將缺少的欄位保留為未知,不要把它們轉成空白文字。