tavily-cli

Web search, content extraction, site crawling, and deep research via Tavily CLI. Five command modes covering search, extraction, URL discovery, bulk crawling, and multi-source research with citations All commands support JSON output and file saving for structured, agentic workflows Escalation pattern guides you from simple search through extraction, mapping, crawling, to comprehensive research based on your needs Requires tavily-cli installation and API key authentication via tvly login

npx skills add https://github.com/tavily-ai/skills --skill tavily-cli

Tavily CLI

Web search, content extraction, site crawling, URL discovery, and deep research. Returns JSON optimized for LLM consumption.

Requires tavily-cli. Search and extract support capped keyless access; map, crawl, and research require authentication.

Run tvly --help or tvly <command> --help for full option details.

Setup

If tvly is not installed:

curl -fsSL https://cli.tavily.com/install.sh | bash

Or manually: uv tool install tavily-cli / pip install tavily-cli

For agent setup, start keyless unless the user asks to sign in or the requested task needs map, crawl, or research. If the installer did not already complete setup, run:

tvly init --skip-auth

This installs or updates the Tavily skills and verifies a live keyless search. Do not look for an API key or authenticate before the first search or extract request.

When authentication is requested or required, use guided setup:

tvly init

# Prefer to open the sign-in link yourself
tvly init --no-browser

tvly init reuses an existing credential, installs or updates the Tavily skills bundled with that CLI release, and verifies a live search. Run tvly update first when refreshing bundled skills. Use tvly init --skip-skills when the skills are already installed and only authentication or verification is needed.

Search and extract can run immediately without authentication, subject to a keyless rate-limit cap. If either command reaches that cap in an interactive session, run tvly login to open browser OAuth, then retry the original command once. In an unattended environment, report the cap and authentication options instead of starting an interactive flow. Map, crawl, and research require authentication. Check the current state only when needed with tvly --status --json.

For authentication without full setup, use tvly login, tvly login --no-browser, tvly login --api-key tvly-YOUR_KEY, or TAVILY_API_KEY.

Browser-based OAuth is the preferred interactive sign-in method. --no-browser simply prints the sign-in link instead of opening it automatically; the flow still returns to a localhost callback on the machine running tvly. In remote sessions, make sure that callback is reachable (SSH may require port forwarding). In an unattended agent or CI environment, leave authentication to the user or use a securely provided TAVILY_API_KEY, then resume the original command.

Keep an existing installation current with tvly update --check and tvly update.

Workflow

Follow this escalation pattern — start simple, escalate when needed:

  1. Search — No specific URL. Find pages, answer questions, discover sources.
  2. Extract — Have a URL. Pull its content directly.
  3. Map — Large site, need to find the right page. Discover URLs first.
  4. Crawl — Need bulk content from an entire site section.
  5. Research — Need comprehensive, multi-source analysis with citations.
NeedCommandWhen
Find pages on a topictvly searchNo specific URL yet
Get a page's contenttvly extractHave a URL
Find URLs within a sitetvly mapNeed to locate a specific subpage
Bulk extract a site sectiontvly crawlNeed many pages (e.g., all /docs/)
Deep research with citationstvly researchNeed multi-source synthesis

For detailed command reference, use the individual skill for each command (e.g., tavily-search, tavily-crawl) or run tvly <command> --help.

Run tvly without a subcommand for the interactive REPL.

Output

Search, extract, crawl, map, and research support --json for structured output. Result-producing commands support -o to save the JSON response; crawl also supports --output-dir for one Markdown file per page. Setup, authentication, status, and update commands expose --json where documented but do not support -o.

tvly search "react hooks" --json -o results.json
tvly extract "https://example.com/docs" -o docs.json
tvly crawl "https://docs.example.com" --output-dir ./docs/

Tips

  • Always quote URLs — shell interprets ? and & as special characters.
  • Use --json for agentic workflows when the selected command exposes it.
  • Read from stdin with - — echo "query" | tvly search -
  • Exit codes: 0 = success, 1 = setup/update failure, 2 = bad input, 3 = auth error, 4 = API or live-verification error.

More skills from tavily-ai

research
tavily-ai
Comprehensive research on any topic with automatic source gathering, analysis, and citations. Conducts multi-source web research with explicit citations, ideal for comparisons, current events, market analysis, and detailed reports Offers three model options: mini for targeted single-topic research (~30s), pro for comprehensive multi-angle analysis (~60-120s), and auto for API-driven complexity detection Authenticates via OAuth through Tavily MCP server with automatic browser-based login on...
search
tavily-ai
Web search with LLM-optimized results, relevance scoring, and flexible filtering. Supports four search depth modes (ultra-fast, fast, basic, advanced) with configurable latency and relevance tradeoffs Includes domain filtering, time range constraints, date ranges, country boosting, and raw content extraction Returns results with title, URL, content snippet, and relevance score; optional image results and favicons Automatic OAuth authentication via Tavily MCP server or API key configuration;...
tavily-best-practices
tavily-ai
Web search API for LLMs with real-time data access, content extraction, site crawling, and AI-powered research. Five core methods: search() for web results, extract() for URL content, crawl() for site-wide extraction, map() for URL discovery, and research() for end-to-end AI synthesis Supports Python and JavaScript SDKs with async clients for parallel queries and configurable search depth (ultra-fast/fast/basic/advanced) Crawl method accepts semantic instructions to focus extraction on...
tavily-crawl
tavily-ai
Multi-page website crawler with semantic filtering and markdown export. Crawl entire site sections with depth and breadth control; filter by path regex, domain, or natural language instructions to focus results Save each page as local markdown files via --output-dir , or return structured JSON for agentic processing Use semantic instructions with chunk extraction to prevent context bloat when feeding results to LLMs; use full-page extraction for offline documentation downloads Supports...
tavily-dynamic-search
tavily-ai
Search the web, filter results, and extract content so that raw search data never enters your context window . Only your curated print() output comes back.
tavily-extract
tavily-ai
Extract clean markdown or text from up to 20 URLs, with JavaScript rendering and query-focused chunking support. Handles JavaScript-rendered pages with configurable extraction depth (basic for simple pages, advanced for dynamic SPAs and tables) Supports query-focused extraction to return only relevant content chunks instead of full pages Returns LLM-optimized markdown by default, with options for plain text format and structured JSON output Processes up to 20 URLs in a single call;...
tavily-research
tavily-ai
Comprehensive AI-powered research with multi-source synthesis and citations. Produces structured reports grounded in web sources, taking 30-120 seconds depending on model selection (mini for targeted queries, pro for complex comparisons) Supports multiple output formats: markdown reports, JSON with custom schemas, and configurable citation styles (numbered, MLA, APA, Chicago) Includes async workflow for long-running research via --no-wait , status , and poll commands, plus real-time...
tavily-search
tavily-ai
Web search with LLM-optimized results, content snippets, and relevance scores. Supports four search depths (ultra-fast, fast, basic, advanced) with configurable result counts up to 20, plus domain filtering and time-range constraints Returns structured JSON output with content snippets, relevance scores, and metadata optimized for LLM consumption Includes specialized search modes for news and finance topics, with optional AI-generated answers and full page content extraction Integrates into...