You get a Tavily API key by signing up at app.tavily.com with a free account, then copying the key shown on the dashboard.
A card isn't needed for the free plan, so a working key is a few minutes away, ready to paste into whatever tool, such as Activepieces, you plan to connect it to.
A Tavily API key is a secret credential, issued from your Tavily account dashboard, that authenticates your requests to Tavily's search and content-extraction API and ties their credit usage and rate limits to your account.
Steps below follow Tavily's documentation and were checked on 2026-12-05.
Get a Tavily API key in five steps
Create a Tavily account and sign in
Go to app.tavily.com and create an account with an email address or a supported single sign-on option. Confirm your email if prompted, then sign in. You land on the dashboard, which is where keys and usage live.

Copy and name your key
Find the API keys panel on the dashboard. A default key is usually already there, and Tavily keys begin with tvly-.
Copy it, or create a new one and give it a name that says what it's for, such as the service or environment that will use it.
When a key leaks or needs rotating, a name like "staging-search-agent" tells you what breaks if you revoke it, while an unnamed key forces you to guess.
Paste the value straight into your secrets manager or an environment variable, not into a file you might commit.
Check the Tavily free plan credit allowance
Open the plan and usage view on the dashboard and read the monthly credit allowance for your account.
Read it before you write code, because Tavily meters usage in credits, and different request types can consume different amounts. A prototype that looks cheap on one search can burn through the allowance once an agent loops over it.
If you'd rather use the key without writing code, Activepieces can hold it as a connection. Secret managers are part of the enterprise feature set (Ultimate, or self-hosted Enterprise control), alongside central credential control.
Secret managers sit in the enterprise feature set next to SCIM, custom RBAC, SSO/SAML and audit logs, and MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces.
Those platforms have their own setup steps, and the wizard step below sits second of four, showing "Waiting for DNS" in orange beside a CNAME record and three TXT records to copy.
Seeing "Waiting for DNS" does not mean anything has failed; the records just haven't been detected yet, so add all four exactly as shown and let the check run again.
With the key stored and your plan limits known, the next section covers what the key can and can't do.
This takes minutes, not a project: automate it in Activepieces free.
Learn Tavily key operations and costs
Anyone holding a Tavily key can call Search, Extract, Crawl and Map against your credit balance, because it is a bearer credential.
Prices below are from Tavily's credits documentation, checked 2026-12-05.
Tavily endpoints and credits per call
At 1 credit for a basic Search and 2 for an advanced one, defaulting an agent to advanced doubles your spend on every query, so make it a deliberate choice for questions that need depth.
If you call Extract one URL at a time, it is wasteful; basic costs 1 credit per 5 URLs, which makes it cheap for batches.
Crawl and Map are separate endpoints with their own billing; read the credits page before pointing an agent at either, because a crawl can touch many pages from one request.
Plans, price per credit and rate limits by tier
Read the table for what each plan includes and what that works out to per credit. The pattern to take from it: the bigger the commitment, the cheaper the credit, and pay-as-you-go is the most expensive per credit in exchange for no commitment.
| Plan | Credits | Price | Per credit |
|---|---|---|---|
| Researcher | 1,000 | Free | $0 |
| Project | 4,000 | $30 | $0.0075 |
| Bootstrap | 15,000 | $100 | $0.0067 |
| Pay-as-you-go | As used | Billed per credit | $0.008 |
Two larger plans sit above these. Startup charges $0.0058 per credit and Growth charges $0.005, so a team at Growth pays about 37% less per credit than pay-as-you-go.

At prototype scale, the free 1,000 credits cover roughly 1,000 basic searches, and paying more per credit costs less than paying for capacity you never use.
You find out you've hit a rate limit when a 429 response comes back, and limits differ by tier. Build retry with backoff in from the first day, so a burst of agent calls slows down instead of failing.

What a key cannot do
Nothing beyond Tavily's own endpoints is within the key's reach. It doesn't log into the sites it searches, read pages behind a login, or act on anything it finds.
That limit is useful: if the key leaks, the worst outcome is spent credits, not exposed systems.
It can't be restricted to Search only or capped per call type, so an agent allowed to use it can also run the expensive endpoints. That is the risk: one key is all-or-nothing.
Treat the all-or-nothing key as a design constraint: put a budget check or a wrapper between the agent and the key. Give each project its own key so one leak can be revoked without touching the others.
Send a first Tavily search request that works
For a working first request, POST to Tavily's search endpoint with your project's key in a Bearer header and a JSON body containing a query. The key stays in an environment variable so it never appears in the command or the file.
Tavily search with curl and Python
Paste the key straight into the command and it lands in shell history and in every screenshot of your terminal. Export it once per session instead, using the per-project key from the previous section:
export TAVILY_API_KEY="tvly-your-key"
curl -X POST https://api.tavily.com/search \
-H "Authorization: Bearer $TAVILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "what is retrieval-augmented generation"}'
Read three things in the response. results is a list in which each item carries a title, a url, a content snippet and a score. The score lets your code drop weak matches before they reach a model.
answer appears only if you ask for it with include_answer, so its absence isn't a failure. response_time tells you what the call cost in latency.
In any HTTP client or automation tool the same shape holds: a POST with an Authorization header goes out. A healthy run log shows status 200 with an OK status text coming back, as in the run below.

When a 200 comes back with an empty results list, the query was too narrow, not the key wrong.
The official client wraps the same request, so you read the key from the environment and skip building headers by hand.
pip install tavily-python
import os
from tavily import TavilyClient
client = TavilyClient(api_key=os.environ)
response = client.search("what is retrieval-augmented generation")
for item in response["results"]:
print(item["score"], item["title"], item["url"])
Using os.environ[...] rather than .get() is deliberate: a missing variable raises an error at startup instead of surfacing later as an authentication failure that looks like a Tavily problem.
Confirm the Tavily request used credits
Open the Tavily dashboard after the call and check the usage counter for the key you used. It should've moved, which proves that the request was billed to the project you intended and not to a shared or forgotten key.
If the counter didn't move, the call probably ran under a different key than you think, so check which variable your shell exported before you debug anything else.
You can follow the rest of this with the builder open. Start free, no card.
Fix Tavily API errors in production
Seeing the limit move is half the job; the other half is knowing what Tavily says when you hit it.
Tavily's rate-limit help page lists 1,000 requests per minute for a production key and 100 for a development key, so development environments can sustain only about 1-2 requests per second.
A loop that passes testing on development can trip 429s well before it matters in production, and a key swap changes your ceiling tenfold.
Poll the usage endpoint on a timer, not per call, because it allows 1 request per minute.
To map each status to its documented meaning, likely cause and fix, use the table below, checked against Tavily's documentation on 5 December 2026.
| Status | Documented meaning | Likely cause | Fix |
|---|---|---|---|
| 400 | Bad request | Malformed or unsupported parameters | Validate the payload; lower max_results or depth to documented values |
| 401 | Unauthorized | Missing or invalid key | Check the environment variable and the account that issued the key |
| 403 | Forbidden | Key lacks access to the request | Check the account and key; confirm the request is permitted |
| 429 | Too many requests | Rate limit exceeded | Back off and retry; cache repeat queries |
| Plan or usage limit exceeded | Credits or plan allowance used up | Heavy depth settings or unbounded loops | Cache, lower depth or max_results, then check the account |
| 5xx | Server-side error | Temporary Tavily-side failure | Retry with backoff; alert only if it persists |
Key errors, limits and retries
When you get a 401, the key almost always never reached the request: an unset environment variable, a stale deployment or a typo. Print only the key's length or prefix, never the value, to confirm it loaded.
For a 403, check that the key belongs to the account you think it does.
Wait and retry on a 429, because it is temporary. A plan or usage limit error isn't, because no backoff restores credits. Treat the two differently: retry the first, and stop and alert on the second.
Retry 429 and 5xx with exponential backoff and jitter, with a cap of a few attempts. Cache identical queries so repeats cost nothing. Lower depth and max_results where answers don't need them; cheaper calls stretch the plan and keep you further from every limit above.
Keep Tavily keys from repos and browsers
Keep the key on a server you control, loaded from an environment variable or a secrets manager, and never in browser code or a committed file.
Cheaper calls keep you from the limits, but a leaked key spends your credits however carefully you tuned each request.
To get a demo working by Friday, someone pastes the key into a front-end fetch call, and it ships. That is the unsanctioned habit, and it is easy to spot.
Anything the browser can read, every visitor can read, so the sanctioned alternative is a thin proxy that holds the key and makes the call on the browser's behalf.
In the diagram, the browser app holds no key and talks only to your proxy, and the proxy reads the key from an environment variable and calls Tavily. The direct browser-to-Tavily path is crossed out.
Anything the browser can read, every visitor can read, so the sanctioned alternative is a thin proxy that holds the key and makes the call on the browser's behalf.
The proxy is also where you can add your own limits, such as per-user throttling, before a request reaches Tavily and spends credits.
Store Tavily keys in environment variables
For local work, put the key in a .env file and add that file to .gitignore before the first commit. Removing a secret from git history later is far harder than never adding it.
Read it in code from the environment rather than hardcoding a string.
In deployment, move it into your platform's secret store or a dedicated secrets manager so it's injected at runtime and never baked into an image or build log.
Issue a separate key for each environment: development, staging and production. The tradeoff is a few more keys to track, and in return a leaked development key can be killed without taking production down, and usage in the dashboard shows which environment is spending.
Rotating a key and responding to a leak
Rotate on a schedule you can actually keep, and always when someone with access leaves the team.
The safe order is to create the new key in the Tavily dashboard, deploy it to your secret store, confirm traffic works with it, and only then delete the old one.
Deleting first turns a routine rotation into an outage of 401 errors.
Treat any exposed key as compromised, even if the repo was public only briefly, since automated scrapers find pushed keys fast. Act in this order:
- Revoke the exposed key in the dashboard immediately, accepting a short outage over continued exposure.
- Create a replacement and deploy it through your secret store.
- Review recent usage for calls you don't recognize, so you know what the exposure cost.
- Remove the key from the code, then clean the git history if the repo is shared, though revocation is what actually protects you.
- Add a secret-scanning check to your repo or CI so the next slip is caught before it merges.
Use a Tavily key in Activepieces without code
Paste the key once into an Activepieces connection, add the Tavily step to a workflow, and run a search; no application code is involved.
A run costs 1 Activepieces credit however many steps it has, and the free plan includes 1,000 credits a month with unlimited flows.
Most people already do a rougher version of this: the key sits in a personal script or a shared chat message so an automation can call search. A connection is the sanctioned alternative, because the key is stored once and the workflow only references it.
You're also not betting on a niche option. Tavily is one of 751 integrations counted in the open source monorepo, whose MIT-licensed core has 25,869 GitHub stars.
That means the same key and the same credit-and-rate-limit habits carry over if you later move the workflow to another platform, so the lessons from the earlier steps aren't tied to one tool.

The steps, in order:
- Create a new flow and pick a trigger for whatever should start the search, such as a schedule or a webhook.
- Add the Tavily integration as an action and choose its search action. Use only the actions the integration actually lists in the builder; if one is missing, the integration doesn't offer it.
- When prompted for a connection, paste your key once and save it. Every later Tavily step in the flow reuses that connection, so the key never appears in a field you might screenshot or share.
- Enter a query, then run Test flow.
Nothing starts a flow when Tavily has new data, because the Tavily integration is an action with no triggers of its own; you supply the trigger from another integration.
In the builder canvas below, a Google Calendar "New or Updated Event" trigger feeds a Gmail "Send Email" action, with the run details panel on the left. It's a different app pair, but the layout is the same.

When a search returns a 401 or 429, you'll lean on the failed run at the bottom, with its "Edit Run" button: open the failed step, read its input and output JSON, and fix the connection or slow the schedule.
This is for no-code use. It doesn't replace calling the API from your own application, where you control retries, caching and per-request credit spend.
On Monday: create one flow, paste the key as a connection, run a single test search, and check the credit usage on your Tavily dashboard before you schedule anything.
Related reading
References
Build it
Set this up in minutes.
No code required. Connect your accounts, and Activepieces runs it from there.
Start free Talk to sales

