Overview
Integration details
| Class | Package | PY support | Downloads | Version |
|---|---|---|---|---|
TavilyExtract | @langchain/tavily | ✅ |
Tool features
| Returns artifact | Native async | Return data | Pricing |
|---|---|---|---|
| ❌ | ✅ | raw content and images | 1,000 free credits / month |
Setup
The integration lives in the@langchain/tavily package, which you can install as shown below:
Credentials
Set up a Tavily API key and set it as an environment variable namedTAVILY_API_KEY.
Instantiation
The tool accepts the following parameters during instantiation:extractDepth(optional, string): Depth of the extraction, either"basic"or"advanced". Default is"basic".includeImages(optional, boolean): Whether to include images in the extraction. Default isfalse.format(optional, string): Content format."markdown"or"text". Default is"markdown".includeFavicon(optional, boolean): Include each result’s favicon URL. Default isfalse.
Invocation
Invoke directly with args
The Tavily extract tool accepts the following arguments during invocation:urls(required): A list of URLs to extract content from.- The following arguments can also be set during invocation:
extractDepth,includeImages.
Invoke with ToolCall
We can also invoke the tool with a model-generatedToolCall, in which case a ToolMessage will be returned:
Use within an agent
We can use the extract tool directly with a LangChain agent by passing it tocreateAgent. The agent can dynamically set the list of URLs and toggles like extractDepth and includeImages as part of its tool call.
API reference
For detailed documentation of all Tavily Extract API features and configurations head to the API reference: docs.tavily.com/documentation/api-reference/endpoint/extractConnect these docs to Claude, VSCode, and more via MCP for real-time answers.

