Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Tavily URL Content Extraction

Tài liệu 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.

Giá
Từ $0.0016USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 2 tùy chọn

Phòng thử nghiệm

Đầu vào
URLs to extract content from.
Depth of content extraction.
Include images found on the pages.
Đầu raVí dụ
Phản hồioutputs · 420 B · 13 dòng
{
  "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"
    }
  ]
}

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

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.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
TavilyTừ $0.0016 mỗi lần gọiJSON
TavilyTừ $0.04 mỗi lần gọiJSON
TavilyTừ $0.008 mỗi lần gọiJSON

Hướng dẫn:Tavily alternatives: compare Exa and Firecrawl searchExa vs Tavily vs Firecrawl for AI agents

Câu hỏi

FAQ

Làm thế nào để dùng API Tavily URL Content Extraction?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/tavily/extract với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Tavily URL Content Extraction có giá bao nhiêu?

Từ $0.0016 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API Tavily URL Content Extraction chấp nhận những tham số nào?

Bắt buộc: urls (array). Tùy chọn: extract_depth (một trong số basic, advanced) và include_images (boolean). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Tavily URL Content Extraction trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Tavily không?

Không. Tavily URL Content Extraction chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Tavily.

Định dạng đầu vào URL là gì?

Gửi urls dưới dạng mảng các địa chỉ trang công khai, không phải một chuỗi đơn lẻ hay một truy vấn tìm kiếm. extract_depth chấp nhận basic hoặc advanced; include_images là giá trị boolean. Hãy xem schema hiện tại của endpoint này thay vì sao chép các tùy chọn bổ sung từ upstream.

Tôi có thể giả định mọi kết quả được trích xuất đều có raw_content không?

Không. Mẫu tham chiếu hiện tại chỉ hiển thị các trường URL, title và image cùng failed_results, nhưng không minh họa raw_content. Điều đó không có nghĩa là văn bản trang không có sẵn. Hãy xác minh một phản hồi đã được chấp thuận cho mục tiêu của bạn trước khi dựa vào trường văn bản, độ phủ toàn trang hoặc quy trình RAG phía sau.

Một yêu cầu đã hoàn tất có chứng minh mọi URL đều đã được trích xuất không?

Không. Gói phản hồi được tài liệu hóa là outputs[0].data, và phần tham chiếu mô tả results và failed_results. Chỉ một lần chạy hoàn tất hoặc HTTP success không đủ để chứng minh mọi URL đều tạo ra nội dung bạn muốn. Hãy xem phản hồi và giữ các trường bị thiếu ở trạng thái chưa biết thay vì chuyển chúng thành văn bản trống.