> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-opensw-1772748614-696205f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google scholar integration

> Integrate with the Google scholar tool using LangChain JavaScript.

This notebook provides a quick overview for getting started with [`SERPGoogleScholarTool`](https://api.js.langchain.com/classes/_langchain_community.tools_google_scholar.SERPGoogleScholarAPITool.html). For detailed documentation of all `SERPGoogleScholarAPITool` features and configurations, head to the [API reference](https://api.js.langchain.com/classes/_langchain_community.tools_google_scholar.SERPGoogleScholarAPITool.html).

## Overview

### Integration details

| Class                                                                                                                             | Package                                                                    | [PY support](https://python.langchain.com/docs/integrations/tools/google_scholar/) |                                              Version                                              |
| :-------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :--------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------: |
| [GoogleScholarTool](https://api.js.langchain.com/classes/_langchain_community.tools_google_scholar.SERPGoogleScholarAPITool.html) | [@langchain/community](https://www.npmjs.com/package/@langchain/community) |                                          ✅                                         | ![NPM - Version](https://img.shields.io/npm/v/@langchain/community?style=flat-square\&label=%20&) |

### Tool features

* Retrieve academic publications by topic, author, or query.
* Fetch metadata such as title, author, and publication year.
* Advanced search filters, including citation count and journal name.

## Setup

The integration lives in the `@langchain/community` package.

```bash theme={null}
npm install @langchain/community
```

### Credentials

Ensure you have the appropriate API key to access Google Scholar. Set it in your environment variables:

```typescript theme={null}
SERPAPI_API_KEY="your-serp-api-key"
```

It's also helpful to set up [LangSmith](https://smith.langchain.com/) for best-in-class observability:

```typescript theme={null}
process.env.LANGSMITH_TRACING="true"
process.env.LANGSMITH_API_KEY="your-langchain-api-key"
```

## Instantiation

You can import and instantiate an instance of the `SERPGoogleScholarAPITool` tool like this:

```python theme={null}
import { SERPGoogleScholarAPITool } from "@langchain/community/tools/google_scholar";

const tool = new SERPGoogleScholarAPITool({
  apiKey: process.env.SERPAPI_API_KEY,
});
```

## Invocation

### Invoke directly with args

You can invoke the tool directly with query arguments:

```python theme={null}
const results = await tool.invoke({
  query: "neural networks",
  maxResults: 5,
});

console.log(results);
```

### Invoke with ToolCall

We can also invoke the tool with a model-generated `ToolCall`:

```python theme={null}
const modelGeneratedToolCall = {
  args: { query: "machine learning" },
  id: "1",
  name: tool.name,
  type: "tool_call",
};
await tool.invoke(modelGeneratedToolCall);
```

***

## API reference

For detailed documentation of all `SERPGoogleScholarAPITool` features and configurations, head to the [API reference](https://api.js.langchain.com/classes/_langchain_community.tools_google_scholar.SERPGoogleScholarAPITool.html).

***

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

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