A Tavily API key lets whoever holds it run web searches and content extraction through your Tavily account, and every call draws down the credits on that account. The key is the whole credential, so anyone with a copy can spend your credits and read the results they return. Generate a replacement first, then check how many credits were used since the exposure, because search keys are often copied into scripts and agents that keep running unnoticed.
Check your GitHub account for leaked secrets — free
- Provider
- Tavily
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Tavily API Key looks like
Tavily keys start with the literal prefix tvly-, followed by a body of letters, digits and hyphens. Some keys carry an environment segment after the prefix, such as dev-, so the value may contain a hyphen early on:
tvly-…XXXX Tavily API key (masked)
The prefix is distinctive, so a hit is rarely a false alarm. The string alone does not say which account owns it or whether it is a development or production key. Check the variable name and the file it sits in for context, such as TAVILY_API_KEY, and check whether the same file holds keys for the models the agent calls.
How Tavily API Keys get leaked
- Agent and tool configuration. Agent frameworks and MCP server configurations often list search keys inline in JSON or YAML, and those files get committed with the project.
- Environment files. A
.envfile that holdsTAVILY_API_KEYand was never added to.gitignore. - Notebooks and tutorials. A key pasted into a notebook cell to test a search, then published with its output.
- Front-end code. A demo page that calls the search API from the browser, which ships the key to every visitor.
- Shared dotfiles and screenshots. A configuration copied into a team repository, or a terminal capture posted in an issue or a chat thread.
What to do in the first hour
- Generate a replacement key first. Sign in to the Tavily dashboard and create a new API key. Name it after the application that will use it, so you can tell the keys apart later.
- Deploy the new key to your agent, script or secret store, then run one search to confirm it works. Keep one key per application.
- Remove the exposed key. Use the revocation steps below. Do this before you clean the repository, so that nothing keeps using it.
- Check credit usage. Open the usage view in the dashboard for the period since the exposure. The free tier includes a monthly credit allowance, so an unexpected spike will show up quickly. Look for searches you did not run and for activity at unusual hours.
- Check what the key returned. If your application stores search results or logs queries, review those logs for searches that were not part of normal work.
- Review other keys and members. Check the other keys listed in the account and remove any you cannot name an owner for. Check the list of people with access to the account.
- Clean the repository. Remove the value and rewrite history if you want to. See I accidentally pushed an API key to GitHub, and deep scan your whole git history if the value may sit in an older branch.
Not sure what else leaked? Run a free scan.
Revoke it at Tavily
Tavily API keys are listed in your dashboard on the Tavily platform, on the API keys page. Find the key that matches the leaked value, by its name or its first and last characters, and delete it or regenerate it. A deleted key stops working for new requests. If you use Tavily’s enterprise key generation, keys created that way have a lifetime in hours and expire on their own, but a key created in the dashboard stays active until you remove it. If you cannot find the delete option, check Tavily’s documentation for the current steps, and contact Tavily support if the key is still active after you have tried.
How LeakWatch detects it
The rule is called Tavily API Key. It looks for the literal tvly- prefix at a word boundary, followed by between 40 and 100 letters, digits and hyphens, and the match must end at a word boundary. The hyphen is allowed so that environment segments such as dev- are caught. The keyword tvly- narrows the search. The severity is high, because the key can spend credits and expose the queries it runs. This type is not checked live: LeakWatch does not send any request to Tavily with the value it found, so a finding says the value has the right shape, not that it still works.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Can someone read my data with this key?
The key authenticates your searches. It does not open your application’s data. What an attacker can do is run searches on your account, use up your credits and read the results they receive. Check whether your queries contain anything sensitive, because search terms can reveal what your product or your users are working on.
The key was public for only a short time. Is that enough to be safe?
Scanners watch public repositories all the time, so assume the key was seen. Replacing it is quick and removes the risk for good. Checking usage afterwards tells you whether anyone used it.
Does a credit limit protect me?
It caps the cost but not the exposure. A stolen key can still spend your allowance and stop your own application from searching. Treat any limit as a second line of defense, and replace the key as the real fix.