← all repositories
tavily-ai/tavily-python

A search API wrapper that actually wants you to try it first

Tavily's Python SDK offers keyless search and extraction so you can kick the tires before committing an API key.

1.3k stars Python RAG · SearchData Tooling
tavily-python
Velocity · 7d
+1.3
★ / day
Trend
steady
star history

What it does This is a thin Python wrapper around the Tavily API, covering search, content extraction, web crawling, site mapping, and a research report generator. You install it with pip install tavily-python, instantiate TavilyClient, and call methods that mostly mirror REST endpoints.

The interesting bit The SDK runs in “keyless mode” — no API key required for search() and extract(). It hits the public Tavily API with rate limits, and raises TavilyKeylessLimitError with structured retry metadata when you hit the cap. That’s a genuinely useful onboarding pattern: try before you buy, with clear error handling instead of opaque 403s.

Key highlights

  • Keyless mode for search() and extract(); full endpoints (crawl, map, research) require an API key
  • get_search_context() returns a pre-formatted context string for RAG pipelines in one call
  • qna_search() returns a concise answer, also aimed at LLM consumption
  • extract() handles up to 20 URLs in one batch, with failed URLs surfaced separately in response["failed_results"]
  • Custom requests.Session or httpx.AsyncClient injection supported for enterprise gateway/proxy setups
  • Optional session_id, human_id, and client_name headers for request attribution; human_id is hashed server-side

Caveats

  • crawl is invite-only as of the README date; the SDK documents it but you can’t use it without access
  • The “research” endpoint is asynchronous by design: you create a task, get a request_id, then poll or stream results — not a single round-trip
  • Free tier is 1,000 credits/month; the README doesn’t specify how many credits each operation costs

Verdict Worth a look if you’re building Python RAG or agent pipelines and want a search backend with a low-friction trial. Skip it if you need self-hosted search or already have a preferred scraping stack — this is API glue, not infrastructure.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.