Skip to content

Tavily Extract API

Tavily Extract is a powerful tool for converting one or more web pages into clean, structured content. It is highly optimized for extracting relevant data for LLM context windows.

POST https://llm.siraya.ai/v1/tavily/extract

Body

model string Required
Use `tavily-extract`.
urls array Required
A list of URLs to extract content from.
query string
User intent for reranking extracted content chunks.
extract_depth string
`basic` or `advanced` (default: `basic`).
include_images boolean
Whether to include images in the output.
curl https://llm.siraya.ai/v1/tavily/extract \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "tavily-extract",
    "urls": ["https://en.wikipedia.org/wiki/Artificial_intelligence"],
    "extract_depth": "advanced"
  }'
import requests

url = "https://llm.siraya.ai/v1/tavily/extract"
headers = {"Authorization": "Bearer <API_KEY>"}
data = {
    "model": "tavily-extract",
    "urls": ["https://en.wikipedia.org/wiki/Artificial_intelligence"],
    "extract_depth": "advanced"
}

response = requests.post(url, headers=headers, json=data)
results = response.json().get("results", [])

Example Response

{
  "results": [
    {
      "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
      "title": "Artificial intelligence - Wikipedia",
      "raw_content": "... extracted markdown text ...",
      "images": ["url1", "url2"]
    }
  ],
  "failed_urls": []
}