Skip to the page

Tavily CLI

Set two environment variables and the Tavily CLI sends tvly search, tvly extract and tvly map to SpecStream. The commands and their output stay the same. A search of up to 10 results costs $1 per 1,000.

SpecStream for Tavily CLICoding agents

What you need

  • The Tavily CLI (tvly). Tested with tavily-cli 0.2.1.
  • A SpecStream API key. New accounts start with $10 of credit, no card. Get your key on the Search API screen of your SpecStream workspace.
  1. 1. Install the Tavily CLI

    If tvly --version already prints a version, skip this step. Tavily's docs install the CLI with uv or pip:

    Terminal
    uv tool install tavily-cli
    tvly --version
  2. 2. Point it at SpecStream

    The CLI reads TAVILY_API_BASE_URL and gives it to the Tavily Python SDK as api_base_url, so every call goes to that address and not to https://api.tavily.com. Put your SpecStream key in TAVILY_API_KEY.

    Add both lines to your shell profile (~/.zshrc or ~/.bashrc). Every new terminal then uses them, and so does every coding agent started from one:

    ~/.zshrc
    export TAVILY_API_BASE_URL=https://api.specstream.ai/tavily
    export TAVILY_API_KEY=YOUR_SPECSTREAM_API_KEY
  3. 3. Check the key

    Open a new terminal and run tvly auth. It prints Authenticated via TAVILY_API_KEY environment variable and the first characters of your SpecStream key.

  4. Run a search. Pass up to five queries and they run in parallel, each one Search API call:

    Terminal
    tvly search "latest stable Python release" "2026 Tour de France winner" --max-results 5
  5. 5. Read the answer

    Each result prints its title, full URL and a snippet, under a === [1/2] header for each query, as it does with Tavily. With --json, the reply keeps Tavily's fields (query, results, response_time, request_id) and adds a specstream object whose price_usd is what the call cost.

What each command does on SpecStream

  • tvly search: one fast search per query, at $1 per 1,000 searches of up to 10 results. --max-results, --topic, --time-range, --start-date, --end-date, --include-domains, --exclude-domains and --country all apply.
  • tvly search --include-raw-content: adds raw_content to each result, holding the text on that page closest to the query. The price stays the same.
  • tvly search --include-answer or --depth advanced: runs the default search, at $5 per 1,000.
  • tvly extract: each page that returns text is one Extract API page, at $0.80 per 1,000. A page with no text is not charged.
  • tvly map: one call is one page read, at $0.80 per 1,000. --limit, --select-paths, --exclude-paths, --select-domains and --exclude-domains apply.
  • tvly crawl and tvly research are not served at this address and return 404. To read a whole site, run tvly map and pass the URLs it prints to tvly extract.

Tested

Checked on November 12, 2026 with tavily-cli 0.2.1 and the two variables above: tvly search with two queries, tvly extract and tvly map returned results from SpecStream, and the search reply named a price of $0.001. tvly crawl and tvly research returned 404.

Tavily's price and this one

Tavily bills in credits. A basic search costs 1 credit and an advanced search 2, and pay as you go a credit costs $0.008. That makes 1,000 basic searches $8. Through this address, 1,000 searches of up to 10 results cost $1, from your balance, with no plan and no monthly credit allowance to use up.

The Search API scores 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. Scores and method.

Tavily skills in your coding agent

tvly init installs Tavily's skills for Claude Code and Codex, and those skills run tvly. When the agent starts from a shell that has both variables set, the skills search through SpecStream with no other change.

Keep the setting in the config file

When TAVILY_API_BASE_URL is not set, the CLI reads api_base_url from ~/.tavily/config.json. If both are set, the variable wins. tvly login --api-key YOUR_SPECSTREAM_API_KEY saves the key in the same file. Give the key a spending limit under Agents & API.

For code that calls Tavily directly through the Python SDK or the REST API, see moving from Tavily. For lists of records with a source on every value, connect your agent to SpecStream's MCP server.

Disconnect

Run unset TAVILY_API_BASE_URL TAVILY_API_KEY and delete the two lines from your shell profile. The CLI then goes back to https://api.tavily.com. To revoke the key, open API keys in Agents & API. Questions go to [email protected].

More

SpecStream for Tavily CLI covers what it does in Tavily CLI on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].