← 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.4k stars Python RAG · SearchData Tooling
tavily-python
Not currently ranked — collecting fresh signals.
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.

Frequently asked

What is tavily-ai/tavily-python?
Tavily's Python SDK offers keyless search and extraction so you can kick the tires before committing an API key.
Is tavily-python open source?
Yes — tavily-ai/tavily-python is open source, released under the MIT license.
What language is tavily-python written in?
tavily-ai/tavily-python is primarily written in Python.
How popular is tavily-python?
tavily-ai/tavily-python has 1.4k stars on GitHub.
Where can I find tavily-python?
tavily-ai/tavily-python is on GitHub at https://github.com/tavily-ai/tavily-python.

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