Overview
Integration details
Tool features
Setup
The integration lives in thelangchain-tavily package.
Credentials
We also need to set our Tavily API key. You can get an API key by visiting this site and creating an account.Instantiation
The tool accepts the following parameters during instantiation:max_depth(optional, int): Maximum number of hops from the starting URL. Default is 1.max_breadth(optional, int): Maximum number of pages to crawl per level. Default is 20.limit(optional, int): Maximum total number of pages to crawl. Default is 50.instructions(optional, str): Natural-language instructions that guide the crawler.select_paths(optional, list[str]): Only crawl URLs containing these path regexes.select_domains(optional, list[str]): Only crawl these domain regexes.exclude_paths(optional, list[str]): Skip URLs containing these path regexes.exclude_domains(optional, list[str]): Skip URLs from these domain regexes.allow_external(optional, bool): Allow the crawler to follow external links.extract_depth(optional, str):"basic"or"advanced"extraction depth for each crawled page.format(optional, str):"markdown"or"text"content format.include_images(optional, bool): Include images discovered on each page.
Invocation
Invoke directly with args
The Tavily crawl tool accepts the following arguments during invocation:url(required): The base URL to start crawling from.- The following arguments can also be set during invocation:
instructions,select_paths,select_domains,exclude_paths,exclude_domains,allow_external.
Invoke with ToolCall
We can also invoke the tool with a model-generated ToolCall, in which case a ToolMessage will be returned:Use within an agent
We can use the crawl tool directly with an agent by binding it to the model. The agent can then dynamically set the available arguments to control where and how deep to crawl.API reference
For detailed documentation of all Tavily Crawl API features and configurations head to the API reference: docs.tavily.com/documentation/api-reference/endpoint/crawlConnect these docs to Claude, VSCode, and more via MCP for real-time answers.

