Tavily
Search the web and extract structured content with Tavily's AI search API.
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("tavily", action, input) resolves with the provider's answer and rejects when Tavily isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "tavily"} says whether yours can call it.
// workflows/notify.ts: call Tavily when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellTavily = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Tavily isn't connected.
const output = await step.run("Tavily", () =>
step.ctx.integrations.invoke("tavily", "extract", {
"urls": []
}),
);
step.ctx.log("Tavily answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "tavily",
"piece_action": "extract",
"input": {
"urls": []
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/tavily/extract" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"urls":[]}}'Actions
extract
Extract Content. Retrieve raw web content from specified URLs.
| Input | Type | Description |
|---|---|---|
urlsrequired | array | The URLs you want to extract with Tavily. |
include_imagesoptional | boolean | Include a list of images extracted from the URLs in the response. |
search
Search. Search for data based on a query.
| Input | Type | Description |
|---|---|---|
queryrequired | long text | The search query you want to execute with Tavily. |
search_depthoptional | one of "basic" | "advanced" | The depth of the search. It can be "basic" or "advanced". |
topicoptional | one of "general" | "news" | The category of the search. This will determine which of our agents will be used for the search. |
daysoptional | number | The number of days back from the current date to include in the search results. Only available when using the "news" search topic. Default is 3. |
time_rangeoptional | one of "day" | "week" | "month" | "year" | "d" | "w" | "m" | "y" | The time range back from the current date to include in the search results. |
max_resultsoptional | number | The maximum number of search results to return. |
include_imagesoptional | boolean | Include a list of query-related images in the response. |
include_image_descriptionsoptional | boolean | When include_images is set to True, this option adds descriptive text for each image. |
include_answeroptional | boolean | Include a short answer to original query, generated by an LLM based on Tavily's search results. |
include_raw_contentoptional | boolean | Include the cleaned and parsed HTML content of each search result. |
include_domainsoptional | array | A list of domains to specifically include in the search results. |
exclude_domainsoptional | array | A list of domains to specifically exclude from the search results. |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
Details
- Id
tavily- Category
- AI and ML
- Tags
- search, extraction, web, ai, research
- Package
@activepieces/piece-tavily@0.1.5- Runs
- Through the integration runner