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

# Overview

All functionality related to [Google Cloud](https://cloud.google.com/), [Google Gemini](https://ai.google.dev/gemini-api/docs) and other Google products.

1. **Google Generative AI (Gemini API & AI Studio)**: Access Google Gemini models directly via the Gemini API. Use [Google AI Studio](https://aistudio.google.com/) for rapid prototyping and get started quickly with the `langchain-google-genai` package. This is often the best starting point for individual developers.
2. **Google Cloud (Vertex AI & other services)**: Access Gemini models, Vertex AI Model Garden and a wide range of cloud services (databases, storage, document AI, etc.) via the [Google Cloud Platform](https://cloud.google.com/). Use the `langchain-google-vertexai` package for Vertex AI models and specific packages (e.g., `langchain-google-cloud-sql-pg`, `langchain-google-community`) for other cloud services. This is ideal for developers already using Google Cloud or needing enterprise features like MLOps, specific model tuning or enterprise support.

See Google's guide on [migrating from the Gemini API to Vertex AI](https://ai.google.dev/gemini-api/docs/migrate-to-cloud) for more details on the differences.

Integration packages for Gemini models and the Vertex AI platform are maintained in
the [langchain-google](https://github.com/langchain-ai/langchain-google) repository.
You can find a host of LangChain integrations with other Google APIs and services in the
[googleapis](https://github.com/googleapis?q=langchain-\&type=all\&language=\&sort=)
Github organization and the `langchain-google-community` package.

## Google Generative AI (Gemini API & AI Studio)

Access Google Gemini models directly using the Gemini API, best suited for rapid development and experimentation. Gemini models are available in [Google AI Studio](https://aistudio.google.com/).

<CodeGroup>
  ```bash pip theme={null}
  pip install -U langchain-google-genai
  ```

  ```bash uv theme={null}
  uv add langchain-google-genai
  ```
</CodeGroup>

Start for free and get your API key from [Google AI Studio](https://aistudio.google.com/app/apikey).

```bash theme={null}
export GOOGLE_API_KEY="YOUR_API_KEY"
```

### Chat Models

Use the `ChatGoogleGenerativeAI` class to interact with Gemini models. See
details in [this guide](/oss/python/integrations/chat/google_generative_ai).

```python theme={null}
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain_core.messages import HumanMessage

llm = ChatGoogleGenerativeAI(model="gemini-2.5-flash")

# Simple text invocation
result = llm.invoke("Sing a ballad of LangChain.")
print(result.content)

# Multimodal invocation with gemini-pro-vision
message = HumanMessage(
    content=[
        {
            "type": "text",
            "text": "What's in this image?",
        },
        {"type": "image_url", "image_url": "https://picsum.photos/seed/picsum/200/300"},
    ]
)
result = llm.invoke([message])
print(result.content)
```

The `image_url` can be a public URL, a GCS URI (`gs://...`), a local file path, a base64 encoded image string (`data:image/png;base64,...`), or a PIL Image object.

### Embedding Models

Generate text embeddings using models like `gemini-embedding-001` with the `GoogleGenerativeAIEmbeddings` class.

See a [usage example](/oss/python/integrations/text_embedding/google_generative_ai).

```python theme={null}
from langchain_google_genai import GoogleGenerativeAIEmbeddings

embeddings = GoogleGenerativeAIEmbeddings(model="models/gemini-embedding-001")
vector = embeddings.embed_query("What are embeddings?")
print(vector[:5])
```

### LLMs

Access the same Gemini models using the ([legacy](/oss/python/concepts/text_llms)) LLM
interface with the `GoogleGenerativeAI` class.

See a [usage example](/oss/python/integrations/llms/google_ai).

```python theme={null}
from langchain_google_genai import GoogleGenerativeAI

llm = GoogleGenerativeAI(model="gemini-2.5-flash")
result = llm.invoke("Sing a ballad of LangChain.")
print(result)
```

## Google Cloud

Access Gemini models, Vertex AI Model Garden and other Google Cloud services via Vertex AI and specific cloud integrations.

Vertex AI models require the `langchain-google-vertexai` package. Other services might require additional packages like `langchain-google-community`, `langchain-google-cloud-sql-pg`, etc.

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-vertexai
  # pip install langchain-google-community[...] # For other services
  ```

  ```bash uv theme={null}
  uv add langchain-google-vertexai
  # uv add langchain-google-community[...] # For other services
  ```
</CodeGroup>

Google Cloud integrations typically use Application Default Credentials (ADC). Refer to the [Google Cloud authentication documentation](https://cloud.google.com/docs/authentication) for setup instructions (e.g., using `gcloud auth application-default login`).

### Chat Models

#### Vertex AI

Access chat models like Gemini via the Vertex AI platform.

See a [usage example](/oss/python/integrations/chat/google_vertex_ai_palm).

```python theme={null}
from langchain_google_vertexai import ChatVertexAI
```

#### Anthropic on Vertex AI Model Garden

See a [usage example](/oss/python/integrations/llms/google_vertex_ai_palm).

```python theme={null}
from langchain_google_vertexai.model_garden import ChatAnthropicVertex
```

#### Llama on Vertex AI Model Garden

```python theme={null}
from langchain_google_vertexai.model_garden_maas.llama import VertexModelGardenLlama
```

#### Mistral on Vertex AI Model Garden

```python theme={null}
from langchain_google_vertexai.model_garden_maas.mistral import VertexModelGardenMistral
```

#### Gemma local from Hugging Face

> Local Gemma model loaded from HuggingFace. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaChatLocalHF
```

#### Gemma local from Kaggle

> Local Gemma model loaded from Kaggle. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaChatLocalKaggle
```

#### Gemma on Vertex AI Model Garden

> Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaChatVertexAIModelGarden
```

#### Vertex AI image captioning

> Implementation of the Image Captioning model as a chat. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.vision_models import VertexAIImageCaptioningChat
```

#### Vertex AI image editor

> Given an image and a prompt, edit the image. Currently only supports mask-free editing. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.vision_models import VertexAIImageEditorChat
```

#### Vertex AI image generator

> Generates an image from a prompt. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.vision_models import VertexAIImageGeneratorChat
```

#### Vertex AI visual QnA

> Chat implementation of a visual QnA model. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.vision_models import VertexAIVisualQnAChat
```

### LLMs

You can also use the ([legacy](/oss/python/concepts/text_llms)) string-in, string-out LLM
interface.

#### Vertex AI Model Garden

Access Gemini, and hundreds of OSS models via Vertex AI Model Garden service. Requires `langchain-google-vertexai`.

See a [usage example](/oss/python/integrations/llms/google_vertex_ai_palm#vertex-model-garden).

```python theme={null}
from langchain_google_vertexai import VertexAIModelGarden
```

#### Gemma local from Hugging Face

> Local Gemma model loaded from HuggingFace. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaLocalHF
```

#### Gemma local from Kaggle

> Local Gemma model loaded from Kaggle. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaLocalKaggle
```

#### Gemma on Vertex AI Model Garden

> Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.gemma import GemmaVertexAIModelGarden
```

#### Vertex AI image captioning

> Implementation of the Image Captioning model as an LLM. Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.vision_models import VertexAIImageCaptioning
```

### Embedding Models

#### Vertex AI

Generate embeddings using models deployed on Vertex AI. Requires `langchain-google-vertexai`.

See a [usage example](/oss/python/integrations/text_embedding/google_vertex_ai_palm).

```python theme={null}
from langchain_google_vertexai import VertexAIEmbeddings
```

### Document Loaders

Load documents from various Google Cloud sources.

#### AlloyDB for PostgreSQL

> [Google Cloud AlloyDB](https://cloud.google.com/alloydb) is a fully managed PostgreSQL-compatible database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-alloydb-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-alloydb-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_alloydb).

```python theme={null}
from langchain_google_alloydb_pg import AlloyDBLoader # AlloyDBEngine also available
```

#### BigQuery

> [Google Cloud BigQuery](https://cloud.google.com/bigquery) is a serverless data warehouse.

Install with BigQuery dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[bigquery]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[bigquery]
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/document_loaders/google_bigquery).

```python theme={null}
from langchain_google_community import BigQueryLoader
```

#### Bigtable

> [Google Cloud Bigtable](https://cloud.google.com/bigtable/docs) is a fully managed NoSQL Big Data database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-bigtable
  ```

  ```bash uv theme={null}
  uv add langchain-google-bigtable
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_bigtable).

```python theme={null}
from langchain_google_bigtable import BigtableLoader
```

#### Cloud SQL for MySQL

> [Google Cloud SQL for MySQL](https://cloud.google.com/sql) is a fully-managed MySQL database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-mysql
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-mysql
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_cloud_sql_mysql).

```python theme={null}
from langchain_google_cloud_sql_mysql import MySQLLoader # MySQLEngine also available
```

#### Cloud SQL for SQL Server

> [Google Cloud SQL for SQL Server](https://cloud.google.com/sql) is a fully-managed SQL Server database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-mssql
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-mssql
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_cloud_sql_mssql).

```python theme={null}
from langchain_google_cloud_sql_mssql import MSSQLLoader # MSSQLEngine also available
```

#### Cloud SQL for PostgreSQL

> [Google Cloud SQL for PostgreSQL](https://cloud.google.com/sql) is a fully-managed PostgreSQL database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_cloud_sql_pg).

```python theme={null}
from langchain_google_cloud_sql_pg import PostgresLoader # PostgresEngine also available
```

#### Cloud Storage

> [Cloud Storage](https://en.wikipedia.org/wiki/Google_Cloud_Storage) is a managed service for storing unstructured data.

Install with GCS dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[gcs]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[gcs]
  ```
</CodeGroup>

Load from a directory or a specific file:

See [directory usage example](/oss/python/integrations/document_loaders/google_cloud_storage_directory).

```python theme={null}
from langchain_google_community import GCSDirectoryLoader
```

See [file usage example](/oss/python/integrations/document_loaders/google_cloud_storage_file).

```python theme={null}
from langchain_google_community import GCSFileLoader
```

#### Cloud Vision loader

Load data using Google Cloud Vision API.

Install with Vision dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[vision]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[vision]
  ```
</CodeGroup>

```python theme={null}
from langchain_google_community.vision import CloudVisionLoader
```

#### El Carro for Oracle Workloads

> Google [El Carro Oracle Operator](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator) runs Oracle databases in Kubernetes.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-el-carro
  ```

  ```bash uv theme={null}
  uv add langchain-google-el-carro
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_el_carro).

```python theme={null}
from langchain_google_el_carro import ElCarroLoader
```

#### Firestore (Native Mode)

> [Google Cloud Firestore](https://cloud.google.com/firestore/docs/) is a NoSQL document database.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-firestore
  ```

  ```bash uv theme={null}
  uv add langchain-google-firestore
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_firestore).

```python theme={null}
from langchain_google_firestore import FirestoreLoader
```

#### Firestore (Datastore Mode)

> [Google Cloud Firestore in Datastore mode](https://cloud.google.com/datastore/docs).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-datastore
  ```

  ```bash uv theme={null}
  uv add langchain-google-datastore
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_datastore).

```python theme={null}
from langchain_google_datastore import DatastoreLoader
```

#### Memorystore for Redis

> [Google Cloud Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis) is a fully managed Redis service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-memorystore-redis
  ```

  ```bash uv theme={null}
  uv add langchain-google-memorystore-redis
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_memorystore_redis).

```python theme={null}
from langchain_google_memorystore_redis import MemorystoreDocumentLoader
```

#### Spanner

> [Google Cloud Spanner](https://cloud.google.com/spanner/docs) is a fully managed, globally distributed relational database service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-spanner
  ```

  ```bash uv theme={null}
  uv add langchain-google-spanner
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/document_loaders/google_spanner).

```python theme={null}
from langchain_google_spanner import SpannerLoader
```

#### Speech-to-Text

> [Google Cloud Speech-to-Text](https://cloud.google.com/speech-to-text) transcribes audio files.

Install with Speech-to-Text dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[speech]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[speech]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/document_loaders/google_speech_to_text).

```python theme={null}
from langchain_google_community import SpeechToTextLoader
```

### Document Transformers

Transform documents using Google Cloud services.

#### Document AI

> [Google Cloud Document AI](https://cloud.google.com/document-ai/docs/overview) is a Google Cloud
> service that transforms unstructured data from documents into structured data, making it easier
> to understand, analyze, and consume.

We need to set up a [`GCS` bucket and create your own OCR processor](https://cloud.google.com/document-ai/docs/create-processor)
The `GCS_OUTPUT_PATH` should be a path to a folder on GCS (starting with `gs://`)
and a processor name should look like `projects/PROJECT_NUMBER/locations/LOCATION/processors/PROCESSOR_ID`.
We can get it either programmatically or copy from the `Prediction endpoint` section of the `Processor details`
tab in the Google Cloud Console.

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[docai]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[docai]
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/document_transformers/google_docai).

```python theme={null}
from langchain_core.document_loaders.blob_loaders import Blob
from langchain_google_community import DocAIParser
```

#### Google Translate

> [Google Translate](https://translate.google.com/) is a multilingual neural machine
> translation service developed by Google to translate text, documents and websites
> from one language into another.

The `GoogleTranslateTransformer` allows you to translate text and HTML with the [Google Cloud Translation API](https://cloud.google.com/translate).

First, we need to install the `langchain-google-community` with translate dependencies.

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[translate]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[translate]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/document_transformers/google_translate).

```python theme={null}
from langchain_google_community import GoogleTranslateTransformer
```

### Vector Stores

Store and search vectors using Google Cloud databases and Vertex AI Vector Search.

#### AlloyDB for PostgreSQL

> [Google Cloud AlloyDB](https://cloud.google.com/alloydb) is a fully managed relational database service that offers high performance, seamless integration, and impressive scalability on Google Cloud. AlloyDB is 100% compatible with PostgreSQL.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-alloydb-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-alloydb-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_alloydb).

```python theme={null}
from langchain_google_alloydb_pg import AlloyDBVectorStore # AlloyDBEngine also available
```

#### BigQuery Vector Search

> [Google Cloud BigQuery](https://cloud.google.com/bigquery),
> BigQuery is a serverless and cost-effective enterprise data warehouse in Google Cloud.
>
> [Google Cloud BigQuery Vector Search](https://cloud.google.com/bigquery/docs/vector-search-intro)
> BigQuery vector search lets you use GoogleSQL to do semantic search, using vector indexes for fast but approximate results, or using brute force for exact results.

> It can calculate Euclidean or Cosine distance. With LangChain, we default to use Euclidean distance.

We need to install several python packages.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-cloud-bigquery
  ```

  ```bash uv theme={null}
  uv add google-cloud-bigquery
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_bigquery_vector_search).

```python theme={null}
# Note: BigQueryVectorSearch might be in langchain or langchain_community depending on version
# Check imports in the usage example.
from langchain.vectorstores import BigQueryVectorSearch # Or langchain_community.vectorstores
```

#### Memorystore for Redis

> Vector store using [Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-memorystore-redis
  ```

  ```bash uv theme={null}
  uv add langchain-google-memorystore-redis
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_memorystore_redis).

```python theme={null}
from langchain_google_memorystore_redis import RedisVectorStore
```

#### Spanner

> Vector store using [Cloud Spanner](https://cloud.google.com/spanner/docs).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-spanner
  ```

  ```bash uv theme={null}
  uv add langchain-google-spanner
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_spanner).

```python theme={null}
from langchain_google_spanner import SpannerVectorStore
```

#### Firestore (Native Mode)

> Vector store using [Firestore](https://cloud.google.com/firestore/docs/).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-firestore
  ```

  ```bash uv theme={null}
  uv add langchain-google-firestore
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_firestore).

```python theme={null}
from langchain_google_firestore import FirestoreVectorStore
```

#### Cloud SQL for MySQL

> Vector store using [Cloud SQL for MySQL](https://cloud.google.com/sql).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-mysql
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-mysql
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_cloud_sql_mysql).

```python theme={null}
from langchain_google_cloud_sql_mysql import MySQLVectorStore # MySQLEngine also available
```

#### Cloud SQL for PostgreSQL

> Vector store using [Cloud SQL for PostgreSQL](https://cloud.google.com/sql).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/vectorstores/google_cloud_sql_pg).

```python theme={null}
from langchain_google_cloud_sql_pg import PostgresVectorStore # PostgresEngine also available
```

#### Vertex AI Vector Search

> [Google Cloud Vertex AI Vector Search](https://cloud.google.com/vertex-ai/docs/vector-search/overview) from Google Cloud,
> formerly known as `Vertex AI Matching Engine`, provides the industry's leading high-scale
> low latency vector database. These vector databases are commonly
> referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service.

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-vertexai
  ```

  ```bash uv theme={null}
  uv add langchain-google-vertexai
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/vectorstores/google_vertex_ai_vector_search).

```python theme={null}
from langchain_google_vertexai import VectorSearchVectorStore
```

##### With DataStore Backend

> Vector search using Datastore for document storage.

See [usage example](/oss/python/integrations/vectorstores/google_vertex_ai_vector_search/#optional--you-can-also-create-vectore-and-store-chunks-in-a-datastore).

```python theme={null}
from langchain_google_vertexai import VectorSearchVectorStoreDatastore
```

##### With GCS Backend

> Alias for `VectorSearchVectorStore` storing documents/index in GCS.

```python theme={null}
from langchain_google_vertexai import VectorSearchVectorStoreGCS
```

### Retrievers

Retrieve information using Google Cloud services.

#### Vertex AI Search

> Build generative AI powered search engines using [Vertex AI Search](https://cloud.google.com/generative-ai-app-builder/docs/introduction).
> from Google Cloud allows developers to quickly build generative AI powered search engines for customers and employees.

See a [usage example](/oss/python/integrations/retrievers/google_vertex_ai_search).

Note: `GoogleVertexAISearchRetriever` is deprecated. Use the components below from `langchain-google-community`.

Install the `google-cloud-discoveryengine` package for underlying access.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-cloud-discoveryengine langchain-google-community
  ```

  ```bash uv theme={null}
  uv add google-cloud-discoveryengine langchain-google-community
  ```
</CodeGroup>

##### VertexAIMultiTurnSearchRetriever

```python theme={null}
from langchain_google_community import VertexAIMultiTurnSearchRetriever
```

##### VertexAISearchRetriever

```python theme={null}
# Note: The example code shows VertexAIMultiTurnSearchRetriever, confirm if VertexAISearchRetriever is separate or related.
# Assuming it might be related or a typo in the original doc:
from langchain_google_community import VertexAISearchRetriever # Verify class name if needed
```

##### VertexAISearchSummaryTool

```python theme={null}
from langchain_google_community import VertexAISearchSummaryTool
```

#### Document AI Warehouse

> Search, store, and manage documents using [Document AI Warehouse](https://cloud.google.com/document-ai-warehouse).

Note: `GoogleDocumentAIWarehouseRetriever` (from `langchain`) is deprecated. Use `DocumentAIWarehouseRetriever` from `langchain-google-community`.

Requires installation of relevant Document AI packages (check specific docs).

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community # Add specific docai dependencies if needed
  ```

  ```bash uv theme={null}
  uv add langchain-google-community # Add specific docai dependencies if needed
  ```
</CodeGroup>

```python theme={null}
from langchain_google_community.documentai_warehouse import DocumentAIWarehouseRetriever
```

### Tools

Integrate agents with various Google services.

#### Text-to-Speech

> [Google Cloud Text-to-Speech](https://cloud.google.com/text-to-speech) is a Google Cloud service that enables developers to
> synthesize natural-sounding speech with 100+ voices, available in multiple languages and variants.
> It applies DeepMind's groundbreaking research in WaveNet and Google's powerful neural networks
> to deliver the highest fidelity possible.

Install required packages:

<CodeGroup>
  ```bash pip theme={null}
  pip install google-cloud-text-to-speech langchain-google-community
  ```

  ```bash uv theme={null}
  uv add google-cloud-text-to-speech langchain-google-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_cloud_texttospeech).

```python theme={null}
from langchain_google_community import TextToSpeechTool
```

#### Google Drive

Tools for interacting with Google Drive.

Install required packages:

<CodeGroup>
  ```bash pip theme={null}
  pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```

  ```bash uv theme={null}
  uv add google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_drive).

```python theme={null}
from langchain_googledrive.utilities.google_drive import GoogleDriveAPIWrapper
from langchain_googledrive.tools.google_drive.tool import GoogleDriveSearchTool
```

#### Google Finance

Query financial data. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_finance).

```python theme={null}
from langchain_community.tools.google_finance import GoogleFinanceQueryRun
from langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper
```

#### Google Jobs

Query job listings. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_jobs).

```python theme={null}
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
# Note: Utilities might be shared, e.g., GoogleFinanceAPIWrapper was listed, verify correct utility
# from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper # If exists
```

#### Google Lens

Perform visual searches. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_lens).

```python theme={null}
from langchain_community.tools.google_lens import GoogleLensQueryRun
from langchain_community.utilities.google_lens import GoogleLensAPIWrapper
```

#### Google Places

Search for places information. Requires `googlemaps` package and a Google Maps API key.

<CodeGroup>
  ```bash pip theme={null}
  pip install googlemaps langchain # Requires base langchain
  ```

  ```bash uv theme={null}
  uv add googlemaps langchain # Requires base langchain
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_places).

```python theme={null}
# Note: GooglePlacesTool might be in langchain or langchain_community depending on version
from langchain.tools import GooglePlacesTool # Or langchain_community.tools
```

#### Google Scholar

Search academic papers. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_scholar).

```python theme={null}
from langchain_community.tools.google_scholar import GoogleScholarQueryRun
from langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper
```

#### Google Search

Perform web searches using Google Custom Search Engine (CSE). Requires `GOOGLE_API_KEY` and `GOOGLE_CSE_ID`.

Install `langchain-google-community`:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community
  ```

  ```bash uv theme={null}
  uv add langchain-google-community
  ```
</CodeGroup>

Wrapper:

```python theme={null}
from langchain_google_community import GoogleSearchAPIWrapper
```

Tools:

```python theme={null}
from langchain_community.tools import GoogleSearchRun, GoogleSearchResults
```

Agent Loading:

```python theme={null}
from langchain_community.agent_toolkits.load_tools import load_tools
tools = load_tools(["google-search"])
```

See [detailed notebook](/oss/python/integrations/tools/google_search).

#### Google Trends

Query Google Trends data. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_trends).

```python theme={null}
from langchain_community.tools.google_trends import GoogleTrendsQueryRun
from langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper
```

### Toolkits

Collections of tools for specific Google services.

#### Gmail

> [Google Gmail](https://en.wikipedia.org/wiki/Gmail) is a free email service provided by Google.
> This toolkit works with emails through the `Gmail API`.

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[gmail]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[gmail]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/gmail).

```python theme={null}
# Load the whole toolkit
from langchain_google_community import GmailToolkit

# Or use individual tools
from langchain_google_community.gmail.create_draft import GmailCreateDraft
from langchain_google_community.gmail.get_message import GmailGetMessage
from langchain_google_community.gmail.get_thread import GmailGetThread
from langchain_google_community.gmail.search import GmailSearch
from langchain_google_community.gmail.send_message import GmailSendMessage
```

### MCP Toolbox

[MCP Toolbox](https://github.com/googleapis/genai-toolbox) provides a simple and efficient way to connect to your databases, including those on Google Cloud like [Cloud SQL](https://cloud.google.com/sql/docs) and [AlloyDB](https://cloud.google.com/alloydb/docs/overview). With MCP Toolbox, you can seamlessly integrate your database with LangChain to build powerful, data-driven applications.

#### Installation

To get started, [install the Toolbox server and client](https://github.com/googleapis/genai-toolbox/releases/).

[Configure](https://googleapis.github.io/genai-toolbox/getting-started/configure/) a `tools.yaml` to define your tools, and then execute toolbox to start the server:

```bash theme={null}
toolbox --tools-file "tools.yaml"
```

Then, install the Toolbox client:

<CodeGroup>
  ```bash pip theme={null}
  pip install toolbox-langchain
  ```

  ```bash uv theme={null}
  uv add toolbox-langchain
  ```
</CodeGroup>

#### Getting Started

Here is a quick example of how to use MCP Toolbox to connect to your database:

```python theme={null}
from toolbox_langchain import ToolboxClient

async with ToolboxClient("http://127.0.0.1:5000") as client:

    tools = client.load_toolset()
```

See [usage example and setup instructions](/oss/python/integrations/tools/toolbox).

### Memory

Store conversation history using Google Cloud databases.

#### AlloyDB for PostgreSQL

> Chat memory using [AlloyDB](https://cloud.google.com/alloydb).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-alloydb-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-alloydb-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_alloydb).

```python theme={null}
from langchain_google_alloydb_pg import AlloyDBChatMessageHistory # AlloyDBEngine also available
```

#### Cloud SQL for PostgreSQL

> Chat memory using [Cloud SQL for PostgreSQL](https://cloud.google.com/sql).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-pg
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-pg
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_sql_pg).

```python theme={null}
from langchain_google_cloud_sql_pg import PostgresChatMessageHistory # PostgresEngine also available
```

#### Cloud SQL for MySQL

> Chat memory using [Cloud SQL for MySQL](https://cloud.google.com/sql).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-mysql
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-mysql
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_sql_mysql).

```python theme={null}
from langchain_google_cloud_sql_mysql import MySQLChatMessageHistory # MySQLEngine also available
```

#### Cloud SQL for SQL Server

> Chat memory using [Cloud SQL for SQL Server](https://cloud.google.com/sql).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-cloud-sql-mssql
  ```

  ```bash uv theme={null}
  uv add langchain-google-cloud-sql-mssql
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_sql_mssql).

```python theme={null}
from langchain_google_cloud_sql_mssql import MSSQLChatMessageHistory # MSSQLEngine also available
```

#### Spanner

> Chat memory using [Cloud Spanner](https://cloud.google.com/spanner/docs).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-spanner
  ```

  ```bash uv theme={null}
  uv add langchain-google-spanner
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_spanner).

```python theme={null}
from langchain_google_spanner import SpannerChatMessageHistory
```

#### Memorystore for Redis

> Chat memory using [Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-memorystore-redis
  ```

  ```bash uv theme={null}
  uv add langchain-google-memorystore-redis
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_memorystore_redis).

```python theme={null}
from langchain_google_memorystore_redis import MemorystoreChatMessageHistory
```

#### Bigtable

> Chat memory using [Cloud Bigtable](https://cloud.google.com/bigtable/docs).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-bigtable
  ```

  ```bash uv theme={null}
  uv add langchain-google-bigtable
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_bigtable).

```python theme={null}
from langchain_google_bigtable import BigtableChatMessageHistory
```

#### Firestore (Native Mode)

> Chat memory using [Firestore](https://cloud.google.com/firestore/docs/).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-firestore
  ```

  ```bash uv theme={null}
  uv add langchain-google-firestore
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_firestore).

```python theme={null}
from langchain_google_firestore import FirestoreChatMessageHistory
```

#### Firestore (Datastore Mode)

> Chat memory using [Firestore in Datastore mode](https://cloud.google.com/datastore/docs).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-datastore
  ```

  ```bash uv theme={null}
  uv add langchain-google-datastore
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_firestore_datastore).

```python theme={null}
from langchain_google_datastore import DatastoreChatMessageHistory
```

#### El Carro: The Oracle Operator for Kubernetes

> Chat memory using Oracle databases run via [El Carro](https://github.com/GoogleCloudPlatform/elcarro-oracle-operator).

Install the python package:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-el-carro
  ```

  ```bash uv theme={null}
  uv add langchain-google-el-carro
  ```
</CodeGroup>

See [usage example](/oss/python/integrations/memory/google_el_carro).

```python theme={null}
from langchain_google_el_carro import ElCarroChatMessageHistory
```

### Callbacks

Track LLM/Chat model usage.

#### Vertex AI callback handler

> Callback Handler that tracks `VertexAI` usage info.

Requires `langchain-google-vertexai`.

```python theme={null}
from langchain_google_vertexai.callbacks import VertexAICallbackHandler
```

### Evaluators

Evaluate model outputs using Vertex AI.

Requires `langchain-google-vertexai`.

#### VertexPairWiseStringEvaluator

> Pair-wise evaluation using Vertex AI models.

```python theme={null}
from langchain_google_vertexai.evaluators.evaluation import VertexPairWiseStringEvaluator
```

#### VertexStringEvaluator

> Evaluate a single prediction string using Vertex AI models.

```python theme={null}
# Note: Original doc listed VertexPairWiseStringEvaluator twice. Assuming this class exists.
from langchain_google_vertexai.evaluators.evaluation import VertexStringEvaluator # Verify class name if needed
```

## Other Google Products

Integrations with various Google services beyond the core Cloud Platform.

### Document Loaders

#### Google Drive

> [Google Drive](https://en.wikipedia.org/wiki/Google_Drive) file storage. Currently supports Google Docs.

Install with Drive dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[drive]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[drive]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/document_loaders/google_drive).

```python theme={null}
from langchain_google_community import GoogleDriveLoader
```

### Vector Stores

#### ScaNN (Local Index)

> [Google ScaNN](https://github.com/google-research/google-research/tree/master/scann)
> (Scalable Nearest Neighbors) is a python package.
>
> `ScaNN` is a method for efficient vector similarity search at scale.

> `ScaNN` includes search space pruning and quantization for Maximum Inner
> Product Search and also supports other distance functions such as
> Euclidean distance. The implementation is optimized for x86 processors
> with AVX2 support. See its [Google Research github](https://github.com/google-research/google-research/tree/master/scann)
> for more details.

Install the `scann` package:

<CodeGroup>
  ```bash pip theme={null}
  pip install scann langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add scann langchain-community # Requires langchain-community
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/vectorstores/scann).

```python theme={null}
from langchain_community.vectorstores import ScaNN
```

### Retrievers

#### Google Drive

Retrieve documents from Google Drive.

Install required packages:

<CodeGroup>
  ```bash pip theme={null}
  pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```

  ```bash uv theme={null}
  uv add google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/retrievers/google_drive).

```python theme={null}
from langchain_googledrive.retrievers import GoogleDriveRetriever
```

### Tools

#### Google Drive

Tools for interacting with Google Drive.

Install required packages:

<CodeGroup>
  ```bash pip theme={null}
  pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```

  ```bash uv theme={null}
  uv add google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_drive).

```python theme={null}
from langchain_googledrive.utilities.google_drive import GoogleDriveAPIWrapper
from langchain_googledrive.tools.google_drive.tool import GoogleDriveSearchTool
```

#### Google Finance

Query financial data. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_finance).

```python theme={null}
from langchain_community.tools.google_finance import GoogleFinanceQueryRun
from langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper
```

#### Google Jobs

Query job listings. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_jobs).

```python theme={null}
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
# Note: Utilities might be shared, e.g., GoogleFinanceAPIWrapper was listed, verify correct utility
# from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper # If exists
```

#### Google Lens

Perform visual searches. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_lens).

```python theme={null}
from langchain_community.tools.google_lens import GoogleLensQueryRun
from langchain_community.utilities.google_lens import GoogleLensAPIWrapper
```

#### Google Places

Search for places information. Requires `googlemaps` package and a Google Maps API key.

<CodeGroup>
  ```bash pip theme={null}
  pip install googlemaps langchain # Requires base langchain
  ```

  ```bash uv theme={null}
  uv add googlemaps langchain # Requires base langchain
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_places).

```python theme={null}
# Note: GooglePlacesTool might be in langchain or langchain_community depending on version
from langchain.tools import GooglePlacesTool # Or langchain_community.tools
```

#### Google Scholar

Search academic papers. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_scholar).

```python theme={null}
from langchain_community.tools.google_scholar import GoogleScholarQueryRun
from langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper
```

#### Google Search

Perform web searches using Google Custom Search Engine (CSE). Requires `GOOGLE_API_KEY` and `GOOGLE_CSE_ID`.

Install `langchain-google-community`:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community
  ```

  ```bash uv theme={null}
  uv add langchain-google-community
  ```
</CodeGroup>

Wrapper:

```python theme={null}
from langchain_google_community import GoogleSearchAPIWrapper
```

Tools:

```python theme={null}
from langchain_community.tools import GoogleSearchRun, GoogleSearchResults
```

Agent Loading:

```python theme={null}
from langchain_community.agent_toolkits.load_tools import load_tools
tools = load_tools(["google-search"])
```

See [detailed notebook](/oss/python/integrations/tools/google_search).

#### Google Trends

Query Google Trends data. Requires `google-search-results` package and SerpApi key.

<CodeGroup>
  ```bash pip theme={null}
  pip install google-search-results langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add google-search-results langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/google_trends).

```python theme={null}
from langchain_community.tools.google_trends import GoogleTrendsQueryRun
from langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper
```

### Toolkits

#### Gmail

> [Google Gmail](https://en.wikipedia.org/wiki/Gmail) is a free email service provided by Google.
> This toolkit works with emails through the `Gmail API`.

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[gmail]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[gmail]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/tools/gmail).

```python theme={null}
# Load the whole toolkit
from langchain_google_community import GmailToolkit

# Or use individual tools
from langchain_google_community.gmail.create_draft import GmailCreateDraft
from langchain_google_community.gmail.get_message import GmailGetMessage
from langchain_google_community.gmail.get_thread import GmailGetThread
from langchain_google_community.gmail.search import GmailSearch
from langchain_google_community.gmail.send_message import GmailSendMessage
```

### Chat Loaders

#### Gmail

> Load chat history from Gmail threads.

Install with Gmail dependencies:

<CodeGroup>
  ```bash pip theme={null}
  pip install langchain-google-community[gmail]
  ```

  ```bash uv theme={null}
  uv add langchain-google-community[gmail]
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/chat_loaders/gmail).

```python theme={null}
from langchain_google_community import GMailLoader
```

## 3rd Party Integrations

Access Google services via third-party APIs.

### SearchApi

> [SearchApi](https://www.searchapi.io/) provides API access to Google search, YouTube, etc. Requires `langchain-community`.

See [usage examples and authorization instructions](/oss/python/integrations/tools/searchapi).

```python theme={null}
from langchain_community.utilities import SearchApiAPIWrapper
```

### SerpApi

> [SerpApi](https://serpapi.com/) provides API access to Google search results. Requires `langchain-community`.

See a [usage example and authorization instructions](/oss/python/integrations/tools/serpapi).

```python theme={null}
from langchain_community.utilities import SerpAPIWrapper
```

### Serper.dev

> [Google Serper](https://serper.dev/) provides API access to Google search results. Requires `langchain-community`.

See a [usage example and authorization instructions](/oss/python/integrations/tools/google_serper).

```python theme={null}
from langchain_community.utilities import GoogleSerperAPIWrapper
```

### YouTube

#### YouTube Search Tool

> Search YouTube videos without the official API. Requires `youtube_search` package.

<CodeGroup>
  ```bash pip theme={null}
  pip install youtube_search langchain # Requires base langchain
  ```

  ```bash uv theme={null}
  uv add youtube_search langchain # Requires base langchain
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/tools/youtube).

```python theme={null}
# Note: YouTubeSearchTool might be in langchain or langchain_community
from langchain.tools import YouTubeSearchTool # Or langchain_community.tools
```

#### YouTube Audio Loader

Download audio from YouTube videos. Requires `yt_dlp`, `pydub`, `librosa`.

<CodeGroup>
  ```bash theme={null}
  pip install yt_dlp pydub librosa langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add yt_dlp pydub librosa langchain-community # Requires langchain-community
  ```
</CodeGroup>

See [usage example and authorization instructions](/oss/python/integrations/document_loaders/youtube_audio).

```python theme={null}
from langchain_community.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoader
# Often used with whisper parsers:
# from langchain_community.document_loaders.parsers import OpenAIWhisperParser, OpenAIWhisperParserLocal
```

#### YouTube Transcripts Loader

Load video transcripts. Requires `youtube-transcript-api`.

<CodeGroup>
  ```bash theme={null}
  pip install youtube-transcript-api langchain-community # Requires langchain-community
  ```

  ```bash uv theme={null}
  uv add youtube-transcript-api langchain-community # Requires langchain-community
  ```
</CodeGroup>

See a [usage example](/oss/python/integrations/document_loaders/youtube_transcript).

```python theme={null}
from langchain_community.document_loaders import YoutubeLoader
```
