Tavily
Search the web and extract structured content with Tavily's AI search API.
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("tavily", "extract", {
"urls": []
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Tavily answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "tavily-extract",
name: "Tavily: Extract Content",
description: "Calls Tavily when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("tavily", {
"action": "extract",
"urls": []
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/tavily/extract" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"urls":[]}}'Actions
extractin catalog
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. |
searchin catalog
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- Tier
- Built in