Skip to content

Tavily Search API

Tavily is a search engine built specifically for AI agents and LLMs. it delivers real-time, accurate, and factual information in a format that's easy for models to process.

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

Body

model string Required
Use `tavily-search`.
query string Required
The search query to execute.
search_depth string
`basic` or `advanced` (default: `basic`).
topic string
`general`, `news`, or `finance`.
max_results integer
Maximum number of results to return (default: 5).
include_answer boolean
Whether to include a generated answer based on results.
include_raw_content boolean
Return the full cleaned content of the pages.
curl https://llm.siraya.ai/v1/tavily \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "tavily-search",
    "query": "Who is the current CEO of Nvidia?",
    "search_depth": "advanced",
    "include_answer": true
  }'
import requests

url = "https://llm.siraya.ai/v1/tavily"
headers = {"Authorization": "Bearer <API_KEY>"}
data = {
    "model": "tavily-search",
    "query": "Who is the current CEO of Nvidia?",
    "search_depth": "advanced"
}

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

Example Response

{
  "query": "Who is the current CEO of Nvidia?",
  "answer": "Jensen Huang is the co-founder, president, and CEO of Nvidia.",
  "results": [
    {
      "title": "Jensen Huang - Wikipedia",
      "url": "https://en.wikipedia.org/wiki/Jensen_Huang",
      "content": "Jensen Huang is an American electrical engineer and business executive...",
      "score": 0.98
    }
  ]
}