> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tavily get research integration

> Integrate with the Tavily get research tool using LangChain JavaScript.

[Tavily](https://tavily.com/) is a search engine built specifically for AI agents (LLMs), delivering real-time, accurate, and factual results at speed. Tavily offers a [Get Research](https://docs.tavily.com/documentation/api-reference/endpoint/research-get) endpoint that retrieves previously created research reports by request ID.

Use this tool after [TavilyResearch](/oss/javascript/integrations/tools/tavily_research) to poll for status and fetch completed results.

## Overview

### Integration details

| Class                                                                                                | Package                                                                | [PY support](/oss/javascript/integrations/tools/tavily_search) |                                             Downloads                                             |                                             Version                                            |
| :--------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | :------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------: |
| [`TavilyGetResearch`](https://reference.langchain.com/javascript/langchain-tavily/TavilyGetResearch) | [`@langchain/tavily`](https://www.npmjs.com/package/@langchain/tavily) |                                ✅                               | ![NPM - Downloads](https://img.shields.io/npm/dm/@langchain/tavily?style=flat-square\&label=%20&) | ![NPM - Version](https://img.shields.io/npm/v/@langchain/tavily?style=flat-square\&label=%20&) |

### Tool features

| [Returns artifact](/oss/javascript/langchain/tools) | Native async |                Return data               |           Pricing          |
| :-------------------------------------------------: | :----------: | :--------------------------------------: | :------------------------: |
|                          ❌                          |       ✅      | Research status, report content, sources | 1,000 free credits / month |

## Setup

The integration lives in the `@langchain/tavily` package:

<CodeGroup>
  ```bash npm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  npm install @langchain/tavily @langchain/core
  ```

  ```bash yarn theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  yarn add @langchain/tavily @langchain/core
  ```

  ```bash pnpm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  pnpm add @langchain/tavily @langchain/core
  ```
</CodeGroup>

### Credentials

Set up an API key on the [Tavily dashboard](https://app.tavily.com) and set it as an environment variable named `TAVILY_API_KEY`.

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
process.env.TAVILY_API_KEY = "YOUR_API_KEY";
```

It is also helpful (but not needed) to set up [LangSmith](https://smith.langchain.com/?utm_source=docs\&utm_medium=cta\&utm_campaign=langsmith-signup\&utm_content=oss-javascript-integrations-tools-tavily_get_research) for observability:

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
process.env.LANGSMITH_TRACING = "true";
process.env.LANGSMITH_API_KEY = "your-api-key";
```

## Instantiation

You can import and instantiate `TavilyGetResearch` like this:

```ts theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { TavilyGetResearch } from "@langchain/tavily";

const tool = new TavilyGetResearch();
```

## Invocation

### [Invoke directly with args](/oss/javascript/langchain/tools)

The Tavily get research tool accepts the following argument during invocation:

* `requestId` (required): The unique identifier of the research task to retrieve

```ts theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
await tool.invoke({
  requestId: "your-request-id-here",
});
```

### [Invoke with ToolCall](/oss/javascript/langchain/tools)

You can also invoke the tool with a model-generated `ToolCall`, in which case a [`ToolMessage`](https://reference.langchain.com/javascript/langchain-core/messages/ToolMessage) is returned:

```ts theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
// This is usually generated by a model, but we'll create a tool call directly for demo purposes.
const modelGeneratedToolCall = {
  args: {
    requestId: "your-request-id-here",
  },
  id: "1",
  name: tool.name,
  type: "tool_call",
};

await tool.invoke(modelGeneratedToolCall);
```

## Use within an agent

Pass both research tools to `createAgent` so the agent can start a research task and retrieve results by request ID:

```ts theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { ChatOpenAI } from "@langchain/openai";
import { TavilyGetResearch, TavilyResearch } from "@langchain/tavily";
import { createAgent } from "langchain";

const llm = new ChatOpenAI({
  model: "gpt-5.5",
});

const agent = createAgent({
  model: llm,
  tools: [
    new TavilyResearch({
      model: "mini",
    }),
    new TavilyGetResearch(),
  ],
});

const userInput =
  "Start a research task on AI agents, then retrieve the results when ready.";

const stream = await agent.streamEvents(
  { messages: [{ role: "user", content: userInput }] },
  { version: "v3" },
);

await Promise.all([
  (async () => {
    for await (const message of stream.messages) {
      for await (const token of message.text) {
        process.stdout.write(token);
      }
    }
  })(),
  (async () => {
    for await (const call of stream.toolCalls) {
      console.dir({ name: call.name, input: call.input }, { depth: null });
      await call.output;
    }
  })(),
]);

await stream.output;
```

## API reference

For detailed documentation of all Tavily Get Research API features and configurations, see the API reference: [docs.tavily.com/documentation/api-reference/endpoint/research-get](https://docs.tavily.com/documentation/api-reference/endpoint/research-get)

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/tools/tavily_get_research.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
